/* ============================================================
   ABYSSAL TIERS — Navy Tierlist Style
   ============================================================ */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --primary:        #a855f7;
    --primary-dark:   #7e22ce;
    --primary-deep:   #4B0082;
    --bg:             #1a151a;
    --bg-card:        rgba(26, 21, 26, 0.5);
    --bg-seventh:     #2C1E30;
    --text:           #ffffff;
    --text-muted:     #a78bba;
    --border:         rgba(216, 180, 254, 0.45);
    --border-active:  rgba(216, 180, 254, 0.9);
    /* legacy aliases */
    --primary-color:  #a855f7;
    --bg-dark:        #1a151a;
    --bg-light:       #2C1E30;
    --text-light:     #ffffff;
    --border-color:   rgba(216, 180, 254, 0.45);
    --border-purple:  rgba(216, 180, 254, 0.45);
    --text-muted:     #a78bba;
}

/* ── Base ──────────────────────────────────────────────────── */
html { height: 100%; font-family: 'Montserrat', sans-serif; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(75,0,130,.28) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(78,50,76,.22) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(46,8,84,.18) 0%, transparent 60%);
    z-index: -1; pointer-events: none;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes fadeIn   { from { opacity:0 } to { opacity:1 } }
@keyframes fadeUp   { from { opacity:0; transform:translateY(40px) } to { opacity:1; transform:translateY(0) } }
@keyframes navyRowIn{ from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:translateY(0) } }
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.5} }
@keyframes nameGradientFlow { 0%{background-position:0% center} 100%{background-position:200% center} }
@keyframes profileModalFadeIn {
    from { opacity:0; transform:scale(.92) translateY(-16px) }
    to   { opacity:1; transform:scale(1)   translateY(0) }
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 14px 20px;
    background: transparent;
    border-bottom: none;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 1400px;
    border: 2px solid rgba(216,180,254,.45);
    border-radius: 8px;
    background: rgba(26,21,26,.45);
    backdrop-filter: blur(14px);
    padding: 0 24px;
    height: 56px;
    gap: 0;
}

.navbar-brand {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none; flex-shrink: 0;
}
.navbar-brand-icon { width: 32px; height: 32px; object-fit: contain; }

/* Nav split: left list + logo center + right list */
.navbar-menu {
    display: flex; align-items: center;
    flex: 1; justify-content: space-between;
    padding: 0 32px;
}

.navbar-menu-left,
.navbar-menu-right {
    display: flex; align-items: center; gap: 0;
}
.nav-link {
    font-size: .82em; font-weight: 600;
    color: rgba(255,255,255,.55); text-decoration: none;
    cursor: pointer; transition: color .3s;
    padding: 18px 16px;
    position: relative; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .5px;
    border-bottom: none;
}
.nav-link:hover { color: #fff; }

/* Double underline animation — Navy style */
.nav-link::before,
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 10px; right: 0;
    height: 3px; width: 0;
    transition: width .45s ease;
    border-radius: 2px;
}
.nav-link::before { background: var(--primary); z-index: 1; }
.nav-link::after  { background: #4E324C; transition-delay: .08s; }
.nav-link:hover::before,
.nav-link:hover::after { width: 100%; left: 0; right: auto; }
.nav-link.active { color: #fff; pointer-events: none; }
.nav-link.active::before { width: 100%; left: 0; right: auto; }

/* ── Language switcher ─────────────────────────────────────── */
.lang-switch {
    position: relative;
    display: flex; align-items: center;
    margin-left: 6px;
}
.lang-switch__current {
    display: flex; align-items: center; gap: 4px;
    background: rgba(44,30,48,.6);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    color: var(--text-muted);
    font-size: .8em; font-weight: 700;
    cursor: pointer; transition: all .2s;
    font-family: 'Montserrat', sans-serif;
}
.lang-switch__current:hover { border-color: var(--primary); color: var(--primary); }
.lang-arrow { transition: transform .25s ease; flex-shrink: 0; }

.lang-switch__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px); right: 0;
    background: rgba(26,21,26,.97);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-width: 60px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    z-index: 200;
    animation: fadeIn .15s ease;
}
.lang-switch__dropdown.open { display: block; }
.lang-switch__dropdown button {
    display: block; width: 100%;
    padding: 8px 14px;
    background: transparent;
    border: none; border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .82em; font-weight: 700;
    cursor: pointer; text-align: center;
    transition: all .15s;
    font-family: 'Montserrat', sans-serif;
}
.lang-switch__dropdown button:last-child { border-bottom: none; }
.lang-switch__dropdown button:hover { background: rgba(168,85,247,.2); color: var(--primary); }

.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.navbar-search { position: relative; display: flex; align-items: center; }
.search-input {
    background: rgba(44,30,48,.7);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px 6px 32px;
    color: var(--text); font-size: .82em; width: 200px;
    transition: all .2s; font-family: 'Montserrat', sans-serif;
}
.search-input::placeholder { color: #555; }
.search-input:focus { outline: none; border-color: var(--primary); width: 240px; }
.search-btn {
    position: absolute; left: 10px;
    background: transparent; border: none;
    color: #555; cursor: pointer; font-size: .85em; pointer-events: none;
}

.info-btn {
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: .9em; font-weight: 700;
    padding: 4px 8px; border-radius: 50%;
    transition: color .2s; font-family: 'Montserrat', sans-serif;
}
.info-btn:hover { color: var(--primary); }

.queue-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 18px 16px;
    font-size: .82em; font-weight: 600;
    color: rgba(255,255,255,.55); text-decoration: none;
    cursor: pointer; transition: all .2s;
    position: relative; white-space: nowrap;
    text-transform: uppercase; letter-spacing: .5px;
    border-bottom: none;
    background: transparent;
    border: none;
    font-family: 'Montserrat', sans-serif;
}
.queue-btn:hover { color: #fff; }
.queue-btn svg {
    transition: transform .2s;
}
.queue-btn:hover svg { transform: scale(1.1); }

.discord-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: #5865F2; border-radius: 6px;
    color: white; text-decoration: none;
    transition: background .2s; flex-shrink: 0; margin-left: 6px;
}
.discord-btn:hover { background: #4752C4; }

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: 1600px; margin: 0 auto; padding: 24px 20px 30px; }

/* Search row below navbar, Navy-style */
.page-search-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 4px; gap: 10px;
}
.page-search-wrap {
    display: flex; align-items: center; gap: 10px;
}

/* Navy input style */
.navy-input {
    background: rgba(26,21,26,.1);
    border: 2px solid rgba(216,180,254,.5);
    border-radius: 6px;
    backdrop-filter: blur(4px);
    padding: 0 20px;
    min-height: 45px;
    min-width: 200px;
    color: #fff;
    font-weight: 500;
    font-size: .9em;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color .2s;
}
.navy-input::placeholder { color: rgba(216,180,254,.5); }
.navy-input:focus { border-color: rgba(216,180,254,.9); }

.navy-search-btn {
    display: flex; align-items: center; justify-content: center;
    min-height: 45px; min-width: 45px;
    background: rgba(26,21,26,.1);
    border: 2px solid rgba(216,180,254,.5);
    border-radius: 6px;
    color: rgba(216,180,254,.7);
    cursor: pointer;
    transition: all .2s;
    backdrop-filter: blur(4px);
}
.navy-search-btn:hover {
    background: rgba(168,85,247,.2);
    border-color: rgba(216,180,254,.9);
    color: #fff;
}

/* ── Gamemode nav ──────────────────────────────────────────── */
.gamemode-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 32px; padding: 0 4px 14px;
    margin-top: 28px; margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.gamemode-nav-item {
    display: flex; align-items: center; gap: 7px;
    font-size: .88em; font-weight: 600;
    color: #4a4a5a; cursor: pointer;
    transition: color .2s; user-select: none;
    white-space: nowrap; padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}
.gamemode-nav-item:hover { color: #888; }
.gamemode-nav-item:hover .gamemode-nav-icon { opacity: .7; }
.gamemode-nav-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.gamemode-nav-item.active .gamemode-nav-icon { opacity: 1; filter: brightness(1.3); }
.gamemode-nav-icon {
    width: 18px; height: 18px; object-fit: contain;
    opacity: .3; transition: opacity .2s; flex-shrink: 0;
}

/* ── Rankings header row (outside card) ────────────────────── */
.rankings-container { animation: fadeUp .5s ease both; margin-top: 24px; }

/* thead inside the table — always perfectly aligned */
.rankings-thead tr {
    background: linear-gradient(90deg, #4B0082, #7e22ce, #a855f7);
    border-radius: 6px;
}
.rankings-thead th {
    padding: 10px 18px;
    font-size: .72em; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: #fff; text-align: left;
}
.rh-rank   { width: 80px; text-align: center !important; }
.rh-player { max-width: 280px; min-width: 200px; }
.rh-region { width: 120px; text-align: center !important; }
.rh-tiers  { min-width: 500px; padding-left: 180px !important; }

/* ── Rankings table ────────────────────────────────────────── */
.rankings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
    border: none;
    overflow: visible;
    table-layout: fixed;
}

.rankings-table tbody tr {
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    cursor: pointer;
    position: relative; z-index: 0;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    animation: navyRowIn .4s ease both;
}
.rankings-table tbody tr:hover {
    background: rgba(75,0,130,.2);
    transform: scale(1.005);
    z-index: 10;
    border-color: var(--border-active);
}
.rankings-table td { padding: 14px 18px; vertical-align: middle; overflow: visible; }

/* Stagger */
.rankings-table tbody tr:nth-child(1)  { animation-delay:.00s }
.rankings-table tbody tr:nth-child(2)  { animation-delay:.05s }
.rankings-table tbody tr:nth-child(3)  { animation-delay:.10s }
.rankings-table tbody tr:nth-child(4)  { animation-delay:.15s }
.rankings-table tbody tr:nth-child(5)  { animation-delay:.20s }
.rankings-table tbody tr:nth-child(6)  { animation-delay:.25s }
.rankings-table tbody tr:nth-child(7)  { animation-delay:.30s }
.rankings-table tbody tr:nth-child(8)  { animation-delay:.35s }
.rankings-table tbody tr:nth-child(9)  { animation-delay:.40s }
.rankings-table tbody tr:nth-child(10) { animation-delay:.45s }

/* ── Rank number (parallelogram) ───────────────────────────── */
.rank-col { width: 80px; text-align: center; vertical-align: middle; }
.player-col { flex: 1; min-width: 250px; }
.region-col { width: 120px; text-align: center; }
.tier-col   { width: auto; min-width: 500px; text-align: left; }

.rank-number {
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    font-weight: 900; font-size: 1em;
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 44px;
    border-radius: 0;
}
.rank-number.rank-gold    { background: linear-gradient(90deg,#b45309,#fbbf24,#fef08a); color:#000; }
.rank-number.rank-silver  { background: linear-gradient(90deg,#6b7280,#d1d5db,#f9fafb); color:#000; }
.rank-number.rank-bronze  { background: linear-gradient(90deg,#92400e,#f97316,#fed7aa); color:#fff; }
.rank-number.rank-default { background: linear-gradient(90deg,#4B0082,#7e22ce,#a855f7); color:#fff; }

/* ── Player cell ───────────────────────────────────────────── */
.player-cell { padding: 12px 18px !important; }
.player-info { display: flex; align-items: center; gap: 12px; }
.player-head {
    width: 48px; height: 48px;
    border-radius: 6px; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border); padding: 2px;
    background: transparent;
}
.player-details { display: flex; flex-direction: column; gap: 3px; }
.player-name { 
    font-weight: 700; font-size: 1em; color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.player-rank-title {
    font-size: .8em; color: var(--text-muted); font-weight: 500;
    display: flex; align-items: center; gap: 5px;
}
.rank-title-icon {
    width: 16px; height: 16px; object-fit: contain; flex-shrink: 0;
}

/* ── Info modal rank list ──────────────────────────────────── */
.rank-info-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.rank-info-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(44,30,48,.3);
}
.rank-info-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.rank-info-icon img {
    width: 36px; height: 36px; object-fit: contain;
}
.rank-info-details { display: flex; flex-direction: column; gap: 2px; }
.rank-info-name { font-weight: 700; font-size: .88em; color: var(--text); }
.rank-info-desc { font-size: .75em; color: var(--text-muted); }

/* Animated gradient names top 3 */
.name-rank-1, .name-rank-2, .name-rank-3 {
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: nameGradientFlow 3s linear infinite;
}
.name-rank-1 { background-image: linear-gradient(90deg,#ffd700,#fff8a0,#ffd700,#ffb300,#ffd700); }
.name-rank-2 { background-image: linear-gradient(90deg,#c0c0c0,#ffffff,#c0c0c0,#a0a0a0,#c0c0c0); }
.name-rank-3 { background-image: linear-gradient(90deg,#cd7f32,#f0a860,#cd7f32,#a05a20,#cd7f32); }

/* ── Region badge ──────────────────────────────────────────── */
.region-cell { text-align: center; padding: 12px 18px !important; }
.region-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    font-weight: 700; font-size: .78em; color: #fff;
}
.region-badge.region-eu { background: linear-gradient(135deg,#166534,#4ade80); }
.region-badge.region-na { background: linear-gradient(135deg,#991b1b,#f87171); }
.region-badge.region-sa { background: linear-gradient(135deg,#92400e,#fbbf24); }
.region-badge.region-as { background: linear-gradient(135deg,#1e3a8a,#60a5fa); }
.region-badge.region-au { background: linear-gradient(135deg,#5b21b6,#c084fc); }

/* ── Tier icons (overall) ──────────────────────────────────── */
.tiers-cell { padding: 12px 18px 12px 40px !important; overflow: visible; }
.tiers-icons-container { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tier-icon-wrapper {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; min-width: 44px; position: relative;
}
.tier-icon-img {
    width: 36px; height: 36px; object-fit: contain;
    border-radius: 6px; padding: 5px;
    border: 2px solid var(--border);
    background: rgba(44,30,48,.5);
    transition: border-color .2s, transform .2s;
}
.tier-icon-wrapper:hover .tier-icon-img { border-color: var(--primary); transform: scale(1.08); }

.tier-icon-label {
    font-size: .65em; font-weight: 700;
    padding: 2px 6px; border-radius: 4px;
    text-transform: uppercase; min-width: 32px;
    text-align: center; color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    position: relative;
}
/* Tier colors */
/* T1 — Gold */
.tier-icon-label.tier-ht1 { background: #eab308; color: #000; }
.tier-icon-label.tier-lt1 { background: #eab308; color: #000; }
/* T2 — Silver */
.tier-icon-label.tier-ht2 { background: #9ca3af; color: #fff; }
.tier-icon-label.tier-lt2 { background: #9ca3af; color: #000; }
/* T3 — Copper */
.tier-icon-label.tier-ht3 { background: #b45309; color: #fff; }
.tier-icon-label.tier-lt3 { background: #b45309; color: #fff; }
/* T4 — Red Copper */
.tier-icon-label.tier-ht4 { background: #b91c1c; color: #fff; }
.tier-icon-label.tier-lt4 { background: #b91c1c; color: #fff; }
/* T5 — Gray */
.tier-icon-label.tier-ht5 { background: #4b5563; color: #fff; }
.tier-icon-label.tier-lt5 { background: #4b5563; color: #fff; }

.tier-icon-retired { background: #6b7280 !important; color:#fff !important; opacity:.85; }

.tier-icon-placeholder-wrapper { display:flex; flex-direction:column; align-items:center; gap:4px; }
.tier-icon-placeholder {
    width:36px; height:36px; border-radius:6px;
    border: 2px dashed rgba(216,180,254,.2);
    background: rgba(44,30,48,.2);
}
.tier-placeholder-box {
    font-size:.65em; color:rgba(255,255,255,.2);
    font-weight:700; min-width:32px; text-align:center;
}

/* ── Tier columns (gamemode view) ──────────────────────────── */
.tiers-columns-container { animation: fadeUp .5s ease both; margin-bottom: 40px; }
.tiers-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }

.tier-column {
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    overflow: hidden;
    animation: fadeUp .5s ease both;
}
.tier-column:nth-child(1) { animation-delay:.00s; border-color:rgba(251,191,36,.6); }
.tier-column:nth-child(2) { animation-delay:.08s; border-color:rgba(209,213,219,.5); }
.tier-column:nth-child(3) { animation-delay:.16s; border-color:rgba(249,115,22,.5); }
.tier-column:nth-child(4) { animation-delay:.24s; border-color:rgba(96,165,250,.5); }
.tier-column:nth-child(5) { animation-delay:.32s; border-color:rgba(74,222,128,.5); }

.tier-column-title {
    padding: 14px 18px; font-weight: 700; font-size: 1em;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border);
}
.tier-column-title.tier-1 { background: linear-gradient(90deg,#b45309,#fbbf24); color:#000; }
.tier-column-title.tier-2 { background: linear-gradient(90deg,#6b7280,#d1d5db); color:#000; }
.tier-column-title.tier-3 { background: linear-gradient(90deg,#92400e,#f97316); color:#fff; }
.tier-column-title.tier-default { background: rgba(44,30,48,.6); color:var(--text-muted); }
.tier-trophy-icon { width:22px; height:22px; object-fit:contain; }

.tier-players-list {
    padding: 12px; display: flex; flex-direction: column;
    gap: 6px; max-height: 560px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--primary-dark) transparent;
}

.tier-player-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 6px;
    background: rgba(44,30,48,.3);
    border: 1px solid transparent;
    transition: all .2s; cursor: pointer;
    animation: navyRowIn .35s ease both;
    min-width: 0;
}
.tier-player-item:hover {
    background: rgba(75,0,130,.2);
    border-color: var(--border);
    transform: translateX(3px);
}
.tier-player-retired { opacity: .75; }

.tier-player-avatar {
    width: 30px; height: 30px; border-radius: 5px;
    object-fit: cover; border: 1px solid var(--border); flex-shrink: 0;
}
.tier-player-name { 
    flex: 1; font-weight: 600; color: var(--text); font-size: .88em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.tier-player-region {
    font-size: .62em; padding: 2px 6px; border-radius: 10px;
    font-weight: 700; flex-shrink: 0;
}
.tier-player-tier {
    font-size: .72em; font-weight: 700;
    padding: 3px 8px; border-radius: 4px;
    background: rgba(168,85,247,.2);
    color: var(--primary);
    text-transform: uppercase;
    position: relative;
}

/* ── Tooltips ──────────────────────────────────────────────── */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    background: rgba(26,21,26,.95);
    border: 1px solid var(--border);
    color: #fff; padding: 6px 10px;
    border-radius: 6px; font-size: 11px;
    white-space: nowrap; z-index: 9999;
    pointer-events: none; margin-top: 5px;
}
[data-tooltip]:hover::before {
    content: '';
    position: absolute; top: 94%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--border);
    z-index: 9999; pointer-events: none;
}

/* ── Loading / No data ─────────────────────────────────────── */
.loading { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.no-data {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    border: 2px solid var(--border); border-radius: 8px;
    background: var(--bg-card); backdrop-filter: blur(8px);
}

/* ── Profile page container ─────────────────────────────────── */
.profile-container {
    position: relative;
    min-height: 100vh;
    background: transparent;
    padding: 80px 20px 40px;
    animation: fadeUp .5s ease both;
}

.profile-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 60vh; color: var(--text-muted);
    font-size: 1.2em; font-weight: 600;
}

.profile-content {
    max-width: 900px; margin: 0 auto;
    background: rgba(26,21,26,.95);
    border: 2px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    position: relative;
    overflow: hidden;
}

.profile-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(44,30,48,.6); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-muted);
    width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1em; transition: all .2s;
    z-index: 10;
}
.profile-close:hover { background: rgba(168,85,247,.2); color: var(--primary); transform: rotate(90deg); }

.profile-header {
    text-align: center; padding: 40px 30px 30px;
    background: linear-gradient(135deg, rgba(75,0,130,.15), rgba(168,85,247,.1));
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; margin-bottom: 16px;
    border: 3px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.profile-username {
    font-size: 2.2em; font-weight: 900;
    color: var(--text); margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: 1px;
}

.profile-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.5);
    font-size: .9em; font-weight: 600; margin-bottom: 12px;
}
.profile-badge img { width: 20px; height: 20px; object-fit: contain; }

.profile-region {
    font-size: 1em; color: var(--text-muted);
    margin-bottom: 16px; font-weight: 500;
}

.namemc-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.4);
    color: var(--text-muted); text-decoration: none;
    font-size: .85em; transition: all .2s;
}
.namemc-link:hover { border-color: var(--primary); color: var(--primary); }

.profile-sections {
    padding: 30px;
}

.profile-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: .8em; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.position-content {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 20px;
    background: rgba(44,30,48,.3);
    border-radius: 8px; border: 1px solid var(--border);
}

.position-rank {
    font-size: 2.5em; font-weight: 900;
    color: var(--primary); text-shadow: 0 0 20px rgba(168,85,247,.5);
}

.position-info {
    display: flex; align-items: center; gap: 10px;
}

.position-trophy-icon {
    width: 32px; height: 32px; object-fit: contain;
}

.position-text {
    font-size: 1.1em; color: var(--text); font-weight: 600;
}

.tiers-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(100px,1fr));
    gap: 16px; padding: 20px;
    background: rgba(44,30,48,.2);
    border-radius: 8px; border: 1px solid var(--border);
}

.tier-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 12px; border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.4);
    transition: all .2s; cursor: default;
}
.tier-item:hover { border-color: var(--primary); background: rgba(75,0,130,.15); }

.tier-gamemode-icon {
    width: 28px; height: 28px; object-fit: contain;
    transition: transform .2s;
}
.tier-item:hover .tier-gamemode-icon { transform: scale(1.1); }

.tier-label {
    font-size: .7em; font-weight: 700;
    color: var(--primary); text-transform: uppercase;
    text-align: center;
}

.tier-item-retired { opacity: .75; }
.tier-item-retired .tier-gamemode-icon { filter: grayscale(.5) brightness(.7); }

.tier-icon-placeholder-wrapper {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}

.tier-icon-placeholder {
    width: 28px; height: 28px; border-radius: 6px;
    border: 1px dashed rgba(216,180,254,.2);
    background: rgba(44,30,48,.2);
}

.tier-placeholder-box {
    font-size: .65em; color: rgba(255,255,255,.2);
    font-weight: 700; text-align: center;
}

.profile-error {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
}
.profile-error h2 { font-size: 1.5em; margin-bottom: 12px; }
.profile-error p { margin-bottom: 20px; }
.back-btn {
    padding: 10px 20px; background: var(--primary);
    color: white; border: none; border-radius: 6px;
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.back-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ── Profile modal ─────────────────────────────────────────── */
.profile-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
    z-index: 1000; align-items: center; justify-content: center;
    padding: 20px;
}
.profile-modal.active { display: flex; }

.profile-modal-content {
    position: relative;
    background: rgba(26,21,26,.95);
    border: 2px solid var(--border);
    border-radius: 12px; padding: 36px;
    max-width: 450px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    backdrop-filter: blur(12px);
    animation: profileModalFadeIn .3s ease;
}
.profile-modal-content::-webkit-scrollbar { display: none; }

.profile-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(44,30,48,.6); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-muted);
    width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1em; transition: all .2s;
}
.profile-modal-close:hover { background: rgba(168,85,247,.2); color: var(--primary); transform: rotate(90deg); }

.profile-modal-body { position: relative; }
.profile-modal-body .profile-header { text-align: center; margin-bottom: 20px; }
.profile-modal-body .profile-avatar {
    width: 110px; height: 110px; border-radius: 50%;
    object-fit: cover; margin-bottom: 14px;
    border: 2px solid var(--border);
}
.profile-modal-body .profile-username {
    font-size: 1.8em; font-weight: 900;
    color: var(--text); margin-bottom: 8px;
}
.profile-modal-body .profile-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.5);
    font-size: .8em; font-weight: 600; margin-bottom: 8px;
}
.profile-modal-body .profile-badge img { width: 18px; height: 18px; }
.profile-modal-body .profile-region {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .88em;
    margin-bottom: 10px;
    color: var(--text);
}
.profile-region-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: .9em;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Global position row */
.profile-position-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 8px 0 10px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(44,30,48,.4);
    width: fit-content; margin-left: auto; margin-right: auto;
}
.profile-position-label { font-size: .72em; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.profile-position-value { font-size: .9em; font-weight: 900; color: var(--primary); }

/* Tier empty message */
.tier-empty-msg {
    text-align: center; padding: 24px 12px;
    color: var(--text-muted); font-size: .8em;
    font-style: italic; line-height: 1.5;
}

/* Lang flag */
.lang-flag { width: 16px; height: 12px; object-fit: cover; border-radius: 2px; vertical-align: middle; }
.profile-modal-body .namemc-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.4);
    color: var(--text-muted); text-decoration: none;
    font-size: .8em; transition: all .2s;
}
.profile-modal-body .namemc-link:hover { border-color: var(--primary); color: var(--primary); }

.profile-modal-sections { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.profile-modal-sections .section-title {
    font-size: .75em; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px;
}
.profile-modal-sections .tiers-grid {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 10px;
}
.profile-modal-sections .tier-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 6px; border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(44,30,48,.4);
    transition: all .2s; cursor: default;
}
.profile-modal-sections .tier-item:hover { border-color: var(--primary); background: rgba(75,0,130,.15); }
.profile-modal-sections .tier-gamemode-icon { width: 32px; height: 32px; object-fit: contain; }
.profile-modal-sections .tier-label {
    font-size: .72em; font-weight: 700;
    color: var(--primary); text-transform: uppercase;
    position: relative;
}
.profile-modal-sections .tier-item-retired { opacity: .75; }
.profile-modal-sections .tier-item-retired .tier-gamemode-icon { filter: grayscale(.5) brightness(.7); }
.profile-modal-sections .tier-icon-placeholder-wrapper { display:flex; flex-direction:column; align-items:center; gap:4px; }
.profile-modal-sections .tier-icon-placeholder {
    width:32px; height:32px; border-radius:6px;
    border: 1px dashed rgba(216,180,254,.2);
}
.profile-modal-sections .tier-placeholder-box { font-size:.65em; color:rgba(255,255,255,.2); font-weight:700; }

.profile-modal-body .profile-loading,
.profile-modal-body .profile-error { text-align:center; padding:40px 20px; color:var(--text-muted); }

/* Rank colors for modal */
.profile-modal-content.rank-1 { border-color: rgba(251,191,36,.6); }
.profile-modal-content.rank-1 .profile-username {
    background-image: linear-gradient(90deg,#ffd700,#fff8a0,#ffd700,#ffb300,#ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: nameGradientFlow 3s linear infinite;
}
.profile-modal-content.rank-2 { border-color: rgba(209,213,219,.5); }
.profile-modal-content.rank-2 .profile-username {
    background-image: linear-gradient(90deg,#c0c0c0,#ffffff,#c0c0c0,#a0a0a0,#c0c0c0);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: nameGradientFlow 3s linear infinite;
}
.profile-modal-content.rank-3 { border-color: rgba(249,115,22,.5); }
.profile-modal-content.rank-3 .profile-username {
    background-image: linear-gradient(90deg,#cd7f32,#f0a860,#cd7f32,#a05a20,#cd7f32);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: nameGradientFlow 3s linear infinite;
}
.profile-modal-content.rank-default { border-color: var(--border); }
.profile-modal-content.rank-default .profile-username { color: var(--text); }

/* ── Info modal ────────────────────────────────────────────── */
.info-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
    z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
.info-modal.active { display: flex; }
.info-modal-content {
    background: rgba(26,21,26,.97);
    border: 2px solid var(--border);
    border-radius: 12px; padding: 32px;
    max-width: 600px; width: 100%;
    max-height: 85vh; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--primary-dark) transparent;
    animation: profileModalFadeIn .3s ease;
}
.info-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(44,30,48,.6); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-muted);
    width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1em; transition: all .2s;
}
.info-modal-close:hover { color: var(--primary); transform: rotate(90deg); }
.info-modal-header { margin-bottom: 20px; }
.info-modal-header h2 { font-size: 1.3em; font-weight: 800; color: var(--text); }
.info-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.info-tab {
    padding: 6px 16px; border-radius: 6px; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted);
    cursor: pointer; font-size: .85em; font-weight: 600;
    transition: all .2s; font-family: 'Montserrat', sans-serif;
}
.info-tab.active, .info-tab:hover { background: rgba(168,85,247,.2); color: var(--primary); border-color: var(--primary); }
.info-tab-content { display: none; }
.info-tab-content.active { display: block; animation: fadeIn .3s ease; }

/* Points Information Styles */
.points-info-list {
    display: flex; flex-direction: column; gap: 12px; margin-top: 16px;
}

.points-info-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px; border-radius: 8px;
    background: rgba(44,30,48,.3);
    border: 1px solid var(--border);
    transition: all .2s;
}

.points-info-item:hover {
    background: rgba(75,0,130,.2);
    border-color: var(--primary);
}

.points-tier-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 8px;
    flex-shrink: 0; font-weight: 700; font-size: 1.2em;
}

.points-tier-icon.tier-1 {
    background: linear-gradient(135deg, #eab308, #f59e0b);
    color: #000;
}

.points-tier-icon.tier-2 {
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
    color: #000;
}

.points-tier-icon.tier-3 {
    background: linear-gradient(135deg, #b45309, #f97316);
    color: #fff;
}

.points-tier-icon.tier-4 {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
}

.points-tier-icon.tier-5 {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    color: #fff;
}

.points-tier-icon-img {
    width: 28px; height: 28px; object-fit: contain;
}

.points-tier-info {
    flex: 1; display: flex; flex-direction: column; gap: 4px;
}

.points-tier-name {
    font-weight: 700; font-size: 1em; color: var(--text);
}

.points-values {
    display: flex; gap: 16px; align-items: center;
}

.points-value {
    font-size: .85em; color: var(--text-muted);
    font-weight: 500;
}

.points-value:first-child {
    color: var(--primary);
    font-weight: 600;
}

.points-note {
    margin-top: 20px; padding: 16px;
    background: rgba(44,30,48,.4);
    border-radius: 8px; border: 1px solid var(--border);
}

.points-note p {
    margin: 0; font-size: .85em; color: var(--text-muted);
    line-height: 1.5;
}

.points-note strong {
    color: var(--primary);
}

/* ── API status ────────────────────────────────────────────── */
.api-status { display: flex; align-items: center; gap: 6px; font-size: .8em; color: var(--text-muted); }
.status-indicator {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ef4444; animation: pulse 2s infinite;
}
.status-indicator.connected { background: #22c55e; animation: none; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
    text-align: center; padding: 32px 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 60px;
}
footer p { font-size: .72em; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tiers-columns { grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
    .tier-col { min-width: 400px; }
}
@media (max-width: 768px) {
    .navbar { padding: 0 12px; }
    .navbar-menu { gap: 14px; }
    .search-input { width: 150px; }
    .container { padding: 20px 12px; }
    .gamemode-nav { gap: 16px; flex-wrap: wrap; justify-content: flex-start; }
    .tiers-columns { grid-template-columns: 1fr 1fr; }
    .rankings-header-row { display: none; }
    .profile-modal-sections .tiers-grid { grid-template-columns: repeat(2,1fr); }
}
/* ── Queue Modal ───────────────────────────────────────────── */
.queue-modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn .3s ease;
}
.queue-modal.active { display: flex; }

.queue-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    max-width: 600px; width: 90%;
    max-height: 80vh; overflow-y: auto;
    position: relative;
    animation: profileModalFadeIn .3s ease;
}

.queue-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: transparent; border: none;
    color: var(--text-muted); font-size: 1.5em;
    cursor: pointer; transition: color .2s;
    width: 32px; height: 32px; display: flex;
    align-items: center; justify-content: center;
    border-radius: 6px;
}
.queue-modal-close:hover { color: #fff; background: rgba(255,255,255,.1); }

.queue-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.queue-modal-header h2 {
    color: var(--text); font-size: 1.5em;
    font-weight: 700; margin-bottom: 8px;
}
.queue-modal-header p {
    color: var(--text-muted); font-size: .9em;
}

.queue-modal-body {
    padding: 24px;
}

.queue-step {
    animation: fadeIn .3s ease;
}
.queue-step h3 {
    color: var(--text); font-size: 1.2em;
    font-weight: 600; margin-bottom: 16px;
    text-align: center;
}

/* Discord Dropdown */
.discord-dropdown {
    position: relative; width: 100%;
    margin-top: 16px;
}

.discord-dropdown-trigger {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 16px;
    background: rgba(44,30,48,.6);
    border: 2px solid var(--border);
    border-radius: 8px; cursor: pointer;
    transition: all .2s; font-family: 'Montserrat', sans-serif;
}

.discord-dropdown-trigger:hover {
    background: rgba(75,0,130,.2);
    border-color: var(--primary);
}

.discord-dropdown-trigger span {
    color: var(--text); font-size: .95em;
    font-weight: 500;
}

.discord-dropdown-arrow {
    transition: transform .2s; color: var(--text-muted);
    flex-shrink: 0;
}

.discord-dropdown.open .discord-dropdown-arrow {
    transform: rotate(180deg);
}

.discord-dropdown-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    max-height: 240px; overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.discord-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.discord-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.discord-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-dark); border-radius: 3px;
}

.discord-dropdown.open .discord-dropdown-menu {
    display: block;
    animation: fadeIn .2s ease;
}

.discord-dropdown-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; cursor: pointer;
    transition: background .2s; border-bottom: 1px solid transparent;
}

.discord-dropdown-item:hover {
    background: rgba(75,0,130,.2);
}

.discord-dropdown-item:last-child {
    border-bottom: none;
}

.discord-dropdown-item img {
    width: 24px; height: 24px; object-fit: contain;
    flex-shrink: 0;
}

.discord-dropdown-item span {
    color: var(--text); font-size: .9em;
    font-weight: 600; text-transform: uppercase;
}

/* Gamemode Grid (fallback) */
.gamemode-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
    gap: 12px; margin-top: 16px;
}
.gamemode-option {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 16px 12px;
    background: rgba(44,30,48,.6);
    border: 2px solid transparent;
    border-radius: 8px; cursor: pointer;
    transition: all .2s; text-align: center;
}
.gamemode-option:hover {
    background: rgba(75,0,130,.2);
    border-color: var(--border);
    transform: translateY(-2px);
}
.gamemode-option.selected {
    background: rgba(168,85,247,.2);
    border-color: var(--primary);
}
.gamemode-option img {
    width: 32px; height: 32px; object-fit: contain;
}
.gamemode-option span {
    color: var(--text); font-size: .85em;
    font-weight: 600; text-transform: uppercase;
}

/* Discord Auth */
.discord-auth-btn {
    display: flex; align-items: center; gap: 10px;
    margin: 24px auto 0;
    padding: 12px 24px;
    background: #5865F2; color: white;
    border: none; border-radius: 8px;
    font-size: 1em; font-weight: 600;
    cursor: pointer; transition: all .2s;
    font-family: 'Montserrat', sans-serif;
}
.discord-auth-btn:hover {
    background: #4752C4; transform: translateY(-2px);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block; color: var(--text);
    font-weight: 600; margin-bottom: 8px;
    font-size: .9em;
}
.queue-select {
    width: 100%; padding: 10px 14px;
    background: rgba(44,30,48,.6);
    border: 2px solid var(--border);
    border-radius: 6px; color: var(--text);
    font-size: .9em; font-family: 'Montserrat', sans-serif;
    transition: border-color .2s;
}
.queue-select:focus {
    outline: none; border-color: var(--primary);
}

.queue-submit-btn {
    width: 100%; padding: 12px 24px;
    background: linear-gradient(90deg,var(--primary),var(--primary-dark));
    color: white; border: none; border-radius: 8px;
    font-size: 1em; font-weight: 600;
    cursor: pointer; transition: all .2s;
    font-family: 'Montserrat', sans-serif;
    margin-top: 16px;
}
.queue-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168,85,247,.3);
}

/* ── Waitlist Modal ─────────────────────────────────────────── */
.waitlist-modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn .3s ease;
}
.waitlist-modal.active { display: flex; }

.waitlist-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    max-width: 800px; width: 90%;
    max-height: 80vh; overflow-y: auto;
    position: relative;
    animation: profileModalFadeIn .3s ease;
}

.waitlist-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: transparent; border: none;
    color: var(--text-muted); font-size: 1.5em;
    cursor: pointer; transition: color .2s;
    width: 32px; height: 32px; display: flex;
    align-items: center; justify-content: center;
    border-radius: 6px;
}
.waitlist-modal-close:hover { color: #fff; background: rgba(255,255,255,.1); }

.waitlist-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
}
.waitlist-header h2 {
    color: var(--text); font-size: 1.5em;
    font-weight: 700; margin-bottom: 12px;
}
.waitlist-status {
    display: flex; align-items: center; gap: 8px;
}

.waitlist-body {
    padding: 24px;
}

/* No Testers Message */
.no-testers-message {
    text-align: center; padding: 40px 20px;
}
.error-icon {
    font-size: 4em; margin-bottom: 16px;
}
.no-testers-message h3 {
    color: #ef4444; font-size: 1.5em;
    font-weight: 700; margin-bottom: 16px;
}
.no-testers-message p {
    color: var(--text-muted); margin-bottom: 8px;
    line-height: 1.6;
}
.last-session {
    margin-top: 24px; padding: 16px;
    background: rgba(44,30,48,.6);
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Queue Display */
.queue-header-info h3 {
    color: #22c55e; font-size: 1.3em;
    font-weight: 700; margin-bottom: 12px;
}
.queue-update-info, .queue-leave-info {
    color: var(--text-muted); font-size: .85em;
    margin-bottom: 8px;
}

.queue-list-container {
    margin: 24px 0;
}
.queue-list-container h4 {
    color: var(--text); font-size: 1.1em;
    font-weight: 600; margin-bottom: 12px;
}

.queue-list {
    background: rgba(44,30,48,.3);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 12px;
    max-height: 300px; overflow-y: auto;
}
.queue-item {
    display: flex; align-items: center;
    gap: 12px; padding: 8px 12px;
    border-radius: 6px; margin-bottom: 4px;
    background: rgba(26,21,26,.5);
    transition: all .2s;
}
.queue-item:hover {
    background: rgba(75,0,130,.2);
}
.queue-position {
    font-weight: 700; color: var(--primary);
    min-width: 30px; text-align: center;
}
.queue-player-info {
    flex: 1; display: flex; align-items: center;
    gap: 8px;
}
.queue-player-avatar {
    width: 24px; height: 24px; border-radius: 4px;
    object-fit: cover; border: 1px solid var(--border);
}
.queue-player-name {
    color: var(--text); font-weight: 600;
    font-size: .9em;
}

/* Active Testers */
.active-testers-container {
    margin-top: 24px;
}
.active-testers-container h4 {
    color: var(--text); font-size: 1.1em;
    font-weight: 600; margin-bottom: 12px;
}
.testers-list {
    display: flex; flex-direction: column; gap: 8px;
}
.tester-item {
    display: flex; align-items: center;
    gap: 10px; padding: 10px 12px;
    background: rgba(44,30,48,.6);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.tester-avatar {
    width: 28px; height: 28px; border-radius: 6px;
    object-fit: cover; border: 2px solid #22c55e;
}
.tester-name {
    color: #22c55e; font-weight: 600;
    font-size: .95em;
}

/* Queue Full Message */
.queue-full-message {
    text-align: center; padding: 40px 20px;
}
.full-icon {
    font-size: 4em; margin-bottom: 16px;
}
.queue-full-message h3 {
    color: #ef4444; font-size: 1.5em;
    font-weight: 700; margin-bottom: 12px;
}
.queue-full-message p {
    color: var(--text-muted); font-size: 1em;
}

@media (max-width: 768px) {
    .queue-modal-content, .waitlist-modal-content {
        width: 95%; margin: 20px;
    }
    .gamemode-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px,1fr));
        gap: 8px;
    }
    .queue-modal-header, .queue-modal-body, .waitlist-header, .waitlist-body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .tiers-columns { grid-template-columns: 1fr; }
    .gamemode-nav-item span { display: none; }
    .gamemode-nav { gap: 10px; }
}
