/* ==========================================================================
   HypeX RPG panel — tema „Los Santos la apus” (încărcată după panel.css).
   Culorile vin din banner: cerul violet, apusul roz-portocaliu, roșul HypeX.
   Bannerul pe toată lățimea se topește în fundal, bara de sus plutește peste
   marginea lui, meniul și cardurile sunt din sticlă mată.
   ========================================================================== */
:root {
    --bg: #0b0911;
    --surface: rgba(23, 17, 33, 0.78);
    --surface-2: rgba(34, 25, 47, 0.82);
    --surface-3: #2b2039;
    --border: rgba(255, 255, 255, 0.075);
    --text: #f4eff9;
    --muted: #a99fbc;
    --radius: 14px;
    --sun-1: #e10600;
    --sun-2: #ff5a36;
    --sun-3: #ff9a4a;
    --sun-4: #e8558f;
    --sun-5: #9b5cff;
    --sunset: linear-gradient(90deg, var(--sun-1), var(--sun-2) 30%, var(--sun-3) 50%, var(--sun-4) 75%, var(--sun-5));
    --glass-shadow: 0 14px 40px rgba(5, 3, 10, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html { scrollbar-color: #3a2c4d transparent; }
body {
    overflow-x: clip;
    background:
        radial-gradient(1400px 700px at 12% -8%, rgba(155, 92, 255, 0.20), transparent 62%),
        radial-gradient(1300px 650px at 92% -6%, rgba(255, 122, 61, 0.17), transparent 60%),
        radial-gradient(1000px 800px at 50% 115%, rgba(225, 6, 0, 0.10), transparent 65%),
        linear-gradient(180deg, #171024 0%, #0e0a16 38%, #0a0810 100%);
    background-attachment: fixed;
}
/* Luminile orașului: puncte foarte discrete pe fundal (doar CSS, fără imagini). */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 196, 120, 0.7), transparent 60%),
        radial-gradient(1px 1px at 70% 60%, rgba(255, 150, 120, 0.6), transparent 60%),
        radial-gradient(1px 1px at 40% 80%, rgba(200, 160, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 85% 20%, rgba(255, 210, 160, 0.6), transparent 60%);
    background-size: 220px 220px, 300px 300px, 260px 260px, 340px 340px;
}
::selection { background: rgba(232, 85, 143, 0.45); color: #fff; }

/* ---------- Bannerul: se topește în pagină ----------
   Două straturi din aceeași poză:
   ::before = copia mărită și foarte încețoșată, pe toată lățimea; prelungește culorile apusului spre margini
              și în jos, sub bara de sus, și dispare treptat (mască) în fundal;
   ::after  = poza clară, întreagă (3:1, fără zoom), lată cel mult 1800 px (nu se întinde pe ecranele foarte
              late), cu margini care devin transparente (mască), deci se contopește cu stratul încețoșat. */
.site-banner {
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    height: clamp(140px, calc(min(100vw, 1800px) / 3), 600px);
    border-radius: 0; box-shadow: none; background: none;
    overflow: visible; isolation: isolate;
    animation: banner-in 1.2s ease both;
}
.site-banner::before {
    content: ""; position: absolute; left: -4%; right: -4%; top: -8%; bottom: -45%; z-index: -1; pointer-events: none;
    background: url("/static/img/banner-hypex.webp") center 40% / cover no-repeat;
    filter: blur(46px) saturate(1.3) brightness(0.62);
    opacity: .9;
    -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
}
.site-banner::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 0; pointer-events: none;
    width: min(100vw, 1800px); transform: translateX(-50%);
    background: url("/static/img/banner-hypex.webp") center / cover no-repeat;
    -webkit-mask-image:
        linear-gradient(180deg, #000 64%, transparent 100%),
        linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(180deg, #000 64%, transparent 100%),
        linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-composite: intersect;
}
@keyframes banner-in { from { opacity: 0; transform: scale(1.02); } }

/* ---------- Bara de sus: sticlă peste marginea bannerului ---------- */
.topbar {
    margin-top: calc(-1 * clamp(34px, 3.4vw, 54px));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: rgba(18, 13, 27, 0.72);
    backdrop-filter: blur(16px) saturate(1.35); -webkit-backdrop-filter: blur(16px) saturate(1.35);
    box-shadow: 0 16px 40px rgba(5, 3, 10, 0.55);
}
.topbar::after {
    content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px;
    background: var(--sunset); box-shadow: 0 0 14px rgba(255, 90, 54, 0.55);
}
.search input { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); border-radius: 10px; }
.search input:focus { border-color: var(--sun-4); box-shadow: 0 0 0 3px rgba(232, 85, 143, 0.18); }
.dropdown-menu, .search-results {
    background: rgba(20, 15, 30, 0.96); backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.09); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

/* ---------- Meniul din stânga și cardurile: sticlă ---------- */
.sidebar, .card, .footer {
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
}
.sidebar { border-radius: 16px; }
.card { border-radius: var(--radius); }
.footer { border-radius: 16px; margin-bottom: 14px; }
.nav-group > summary { color: #b9aed0; }
.nav-link:hover { background: rgba(255, 255, 255, 0.05); }
.table tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* Titlurile paginilor: o linie de apus sub ele */
.page-head h1 { position: relative; padding-bottom: 6px; }
.page-head h1::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: var(--sunset);
}

/* ---------- Butoane ---------- */
.btn {
    background: linear-gradient(135deg, var(--sun-1), var(--sun-2));
    box-shadow: 0 6px 18px rgba(225, 6, 0, 0.32);
    border-radius: 10px;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover {
    background: linear-gradient(135deg, var(--sun-1), var(--sun-2));
    filter: brightness(1.12); box-shadow: 0 8px 24px rgba(255, 90, 54, 0.42); transform: translateY(-1px);
}
.btn:active { transform: none; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); box-shadow: none; filter: none; }

/* ---------- Acasă ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(600px 220px at 100% 0%, rgba(255, 154, 74, 0.20), transparent 70%),
        radial-gradient(500px 240px at 0% 100%, rgba(155, 92, 255, 0.18), transparent 70%),
        linear-gradient(120deg, rgba(225, 6, 0, 0.22), rgba(23, 17, 33, 0.82) 60%);
    border-color: rgba(255, 90, 54, 0.28);
}
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sunset); }
.hero h1 {
    font-size: 30px; font-weight: 800; letter-spacing: .01em;
    background: linear-gradient(90deg, #ffffff 0%, #ffd9c7 55%, #ff9a7a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.connect-addr { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.1); color: #ffd9c7; }

.stat-grid .card { position: relative; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.stat-grid .card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--sunset); opacity: .85; }
.stat-grid .card:hover { transform: translateY(-2px); border-color: rgba(232, 85, 143, 0.35); }
.stat-grid .card:nth-child(1) .stat-label .icon { color: #ff6a4a; }
.stat-grid .card:nth-child(2) .stat-label .icon { color: #ff9a4a; }
.stat-grid .card:nth-child(3) .stat-label .icon { color: #e8558f; }
.stat-value { font-weight: 800; }

/* ---------- Numărătoarea până la deschidere (Acasă) ---------- */
.launch {
    position: relative; overflow: hidden; text-align: center;
    padding: 30px 24px 26px;
    background:
        radial-gradient(700px 260px at 50% -40%, rgba(255, 154, 74, 0.32), transparent 70%),
        radial-gradient(500px 260px at 0% 120%, rgba(155, 92, 255, 0.24), transparent 70%),
        radial-gradient(500px 260px at 100% 120%, rgba(232, 85, 143, 0.22), transparent 70%),
        linear-gradient(180deg, rgba(40, 18, 36, 0.92), rgba(20, 14, 30, 0.9));
    border-color: rgba(255, 122, 61, 0.35);
}
.launch::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sunset); }
.launch-glow {
    position: absolute; left: 50%; top: 58%; width: 520px; height: 160px; transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(255, 90, 54, 0.28), transparent); filter: blur(10px); pointer-events: none;
    animation: launch-breathe 4s ease-in-out infinite;
}
@keyframes launch-breathe { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.08); } }
.launch-kicker {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px;
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffd9c7;
}
.launch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun-2); box-shadow: 0 0 10px var(--sun-2); animation: launch-blink 1.2s ease-in-out infinite; }
@keyframes launch-blink { 50% { opacity: .3; } }
.launch-title {
    position: relative; margin: 14px 0 4px; font-size: clamp(30px, 5vw, 52px); font-weight: 900; letter-spacing: .06em; line-height: 1.05;
    background: linear-gradient(90deg, #ffffff 0%, #ffd9c7 35%, #ff9a4a 65%, #ff5a7a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 18px rgba(255, 90, 54, 0.35));
}
.launch-when { position: relative; color: #e9d8f5; font-weight: 600; letter-spacing: .04em; }
.launch-timer { position: relative; display: flex; justify-content: center; gap: clamp(8px, 2vw, 18px); margin: 22px 0 16px; }
.launch-unit {
    min-width: clamp(68px, 13vw, 118px); padding: 14px 8px 10px; border-radius: 14px;
    background: rgba(10, 6, 16, 0.55); border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.35);
}
.launch-unit b {
    display: block; font-size: clamp(30px, 6vw, 56px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
    color: #fff; text-shadow: 0 0 18px rgba(255, 122, 61, 0.55);
}
.launch-unit b.tick { animation: launch-tick .35s ease; }
@keyframes launch-tick { from { transform: translateY(-6px); opacity: .4; } }
.launch-unit span { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.launch-cta { position: relative; color: #ffd9c7; font-size: 14px; }
.launch-live { position: relative; margin-top: 18px; font-size: 22px; font-weight: 800; color: #7fe3a5; }
.launch.is-live { border-color: rgba(67, 209, 122, 0.4); }

/* ---------- Pagina facțiunii: taburi + membri pe rank-uri ---------- */
.faction-head { display: block; padding-bottom: 0; }
.faction-head-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.faction-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px -4px 0; border-top: 1px solid var(--border); padding-top: 6px; }
.faction-tabs a { position: relative; padding: 10px 14px 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted); text-decoration: none; border-radius: 8px 8px 0 0; transition: color .15s, background .15s; }
.faction-tabs a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.faction-tabs a.active { color: var(--text); }
.faction-tabs a.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--fc, var(--accent)), #ff9a4a); }
.faction-tabs .faction-tab-cta { margin-left: auto; align-self: center; padding: 7px 16px; border-radius: 8px; color: #fff;
    background: linear-gradient(135deg, var(--accent), #ff5a36); }
.faction-tabs .faction-tab-cta:hover { color: #fff; filter: brightness(1.1); background: linear-gradient(135deg, var(--accent), #ff5a36); }

.stat-grid.faction-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .stat-grid.faction-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.faction-summary .stat-value small { font-size: 15px; color: var(--muted); font-weight: 600; }

.rank-group { overflow: hidden; border-left: 3px solid color-mix(in srgb, var(--fc, var(--accent)) 70%, transparent); }
.rank-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--fc, var(--accent)) 16%, transparent), transparent 70%); }
.rank-head h2 { margin: 0; font-size: 16px; letter-spacing: .02em; }
.rank-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-weight: 800; font-size: 14px;
    color: #fff; background: color-mix(in srgb, var(--fc, var(--accent)) 55%, #1a1422); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.rank-num-icon { font-size: 15px; background: linear-gradient(135deg, #f2b51c, #ff7a3d); }
.rank-table .role, .table .role-tester { margin-left: 6px; }
.role-tester { background: rgba(59, 130, 246, 0.22); color: #8fbaff; }
.rank-chip { padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    background: rgba(242, 181, 28, 0.18); color: #f6cc5c; }
.rank-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rank-group.is-empty { opacity: .6; }
.rank-group.is-empty .rank-head { padding-top: 10px; padding-bottom: 10px; background: none; }
.rank-group.is-empty .rank-num { width: 26px; height: 26px; font-size: 13px; }
.rank-group.is-empty h2 { font-size: 15px; }
.rank-table th.col-player { width: 38%; }
.rank-table td { vertical-align: middle; }
.rank-table .status-dot { margin-right: 6px; }
.rank-table .clan-tag { font-weight: 800; text-decoration: none; margin-right: 1px; }
.rank-table .clan-tag:hover { text-decoration: underline; }
.rank-table .fw-warn { color: #ff8a5c; font-weight: 700; }
.rank-table .is-online { color: #7fe3a5; font-weight: 700; }

/* ---------- Mobil ---------- */
@media (max-width: 960px) {
    .sidebar { border-radius: 0; background: rgba(16, 12, 24, 0.96); }
}
@media (max-width: 640px) {
    .topbar { margin-top: -22px; border-radius: 12px; }
    .hero h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-banner { animation: none; }
    .btn, .stat-grid .card { transition: none; }
}
