:root {
    --bg-dark: #0f0f0f;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #e50914;
    --accent-hover: #ff1f2d;
    --nav-bg: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding-top: 70px;
    line-height: 1.6;
}

/* Navigation / Header */
#ethnicity-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.8);
    gap: 15px;
}

.header-branding {
    display: flex;
    gap: 10px;
    margin-right: 15px;
}

.header-branding img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.1));
}

#ethnicity-section label {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

#ethnicity-section select {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

#ethnicity-section button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#ethnicity-section button:hover {
    background-color: var(--accent-hover);
}

h1 {
    text-align: center;
    margin: 30px 0;
    font-size: 2rem;
    letter-spacing: 1px;
    color: var(--accent);
    text-transform: uppercase;
}

/* Grid Layout for Models */
#model-tables {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.model-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Model Card Design */
.model-cell {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.model-cell:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
}

.avatar-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.model-cell:hover .avatar {
    transform: scale(1.05);
}

.model-details {
    padding: 15px;
    text-align: center;
    background: linear-gradient(to top, #111, var(--card-bg));
}

.username {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 5px;
}

.username:hover {
    color: var(--accent);
}

.gender {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* External Players Buttons Overlay */
.player-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
}

.model-cell:hover .player-overlay {
    opacity: 1;
}

.player-overlay a {
    background-color: rgba(0,0,0,0.7);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.player-overlay a:hover {
    background-color: var(--accent);
}

.player-overlay img {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #ethnicity-section {
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    body {
        padding-top: 140px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .model-table {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}
