/* ================================================================
   BOULIET ORIGINALS — LOBBY / GAME DISCOVERY
   Loaded after the core stylesheets so it can refine the navbar.
================================================================ */

/* ══════════════════════════════════════════════════════════════
   TOP BAR — game switcher
══════════════════════════════════════════════════════════════ */
.top-navbar {
    background: linear-gradient(180deg, rgba(12, 17, 46, 0.96), rgba(7, 11, 36, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 44px -38px #000;
}

.games-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 24px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid rgba(120, 140, 255, 0.14);
    background: rgba(9, 13, 38, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 28px -24px #000;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}
.games-tabs::-webkit-scrollbar { display: none; }

.games-tabs .game-tab {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: #8b94ad;
    font-size: 12.5px;
    font-weight: 600;
    gap: 7px;
    line-height: 1;
    transition: color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
}
.games-tabs .game-tab i { font-size: 12.5px; opacity: 0.85; }
.games-tabs .game-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: transparent;
    transform: translateY(-1px);
}
.games-tabs .game-tab.active {
    color: #1a0e00;
    background: linear-gradient(135deg, #f0c040, #f97316);
    border-color: transparent;
    box-shadow: 0 8px 20px -12px rgba(240, 192, 64, 0.9);
}
.games-tabs .game-tab.active i { opacity: 1; }

.game-tab.originals-nav-btn {
    color: #f0c040;
    border-color: rgba(240, 192, 64, 0.32);
    background: rgba(240, 192, 64, 0.08);
}
.game-tab.originals-nav-btn:hover {
    color: #ffd76a;
    background: rgba(240, 192, 64, 0.16);
    border-color: rgba(240, 192, 64, 0.5);
}
.game-tab.originals-nav-btn i { font-size: 12.5px; }

@media (max-width: 1500px) {
    .games-tabs { margin-left: 14px; gap: 2px; }
    .games-tabs .game-tab { padding: 7px 9px; font-size: 12px; gap: 5px; }
    .games-tabs .game-tab i { font-size: 12px; }
}

@media (max-width: 1260px) {
    .games-tabs .game-tab span { display: none; }
    .games-tabs .game-tab { padding: 8px 11px; }
}

/* The lobby is a full-screen surface: no top bar until a game opens */
body.lobby-open .top-navbar { display: none !important; }
body.lobby-open .lobby-screen { margin-top: 0; padding-top: 64px; }
@media (max-width: 768px) {
    body.lobby-open .lobby-screen { padding-top: 44px; }
}

/* ── Lobby shell ──────────────────────────────────────────────── */
.lobby-screen {
    position: relative;
    min-height: 100vh;
    margin-top: 64px;
    padding: 54px 24px 80px;
    background:
        radial-gradient(900px 480px at 12% -8%, rgba(240, 192, 64, 0.10), transparent 62%),
        radial-gradient(760px 420px at 92% 2%, rgba(37, 99, 235, 0.13), transparent 58%),
        var(--bg-void, #080b0f);
    overflow: hidden;
    isolation: isolate;
}

.lobby-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 78%);
    pointer-events: none;
    z-index: -1;
}

.lobby-inner {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
}

.lobby-head { text-align: center; margin-bottom: 30px; }

.lobby-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    border: 1px solid rgba(240, 192, 64, 0.3);
    background: rgba(240, 192, 64, 0.08);
    color: #f0c040;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.lobby-eyebrow i { font-size: 10px; }

.lobby-title {
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.06;
    margin: 0 0 12px;
    color: var(--text-primary, #e6edf3);
}
.lobby-title em {
    font-style: normal;
    background: linear-gradient(135deg, #f0c040 0%, #f97316 68%, #fb923c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lobby-sub {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-secondary, #8b949e);
    font-size: 14px;
    line-height: 1.6;
}

.lobby-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    margin-top: 20px;
    color: var(--text-secondary, #8b949e);
    font-size: 12px;
}
.lobby-stats span { display: inline-flex; align-items: center; gap: 7px; }
.lobby-stats i { color: #f0c040; font-size: 12px; }

/* ── Filter chips ─────────────────────────────────────────────── */
.lobby-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 26px;
}
.lobby-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(22, 27, 34, 0.75);
    color: var(--text-secondary, #8b949e);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.lobby-chip:hover {
    color: #e6edf3;
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}
.lobby-chip.active {
    color: #1a0e00;
    border-color: transparent;
    background: linear-gradient(135deg, #f0c040, #f97316);
    box-shadow: 0 6px 18px -6px rgba(240, 192, 64, 0.55);
}

/* ── Cards grid ───────────────────────────────────────────────── */
.originals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
    gap: 18px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: #0d1117;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    padding: 0;
    font-family: inherit;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}
.game-card:hover,
.game-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(240, 192, 64, 0.45);
    box-shadow: 0 26px 46px -22px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(240, 192, 64, 0.18);
    outline: none;
}
.game-card:active { transform: translateY(-2px) scale(0.995); }

.game-card-art {
    position: relative;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}
.game-card-art::after {
    content: "";
    position: absolute;
    inset: auto -20% -60% -20%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent 70%);
    opacity: 0.55;
    z-index: -1;
}


/* Per-game art gradients */
.game-card[data-game="dice"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #a78bfa 0%, #7c3aed 42%, #2e1065 100%);
}
.game-card[data-game="mines"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #5eead4 0%, #0f766e 45%, #062f2b 100%);
}
.game-card[data-game="plinko"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #7dd3fc 0%, #0369a1 45%, #082f49 100%);
}
.game-card[data-game="wheel"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #fcd34d 0%, #b45309 48%, #3b1d05 100%);
}
.game-card[data-game="crash"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #5eead4 0%, #0e7490 46%, #082f49 100%);
}
.game-card[data-game="blackjack"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #a5b4fc 0%, #4338ca 46%, #1e1b4b 100%);
}
.game-card[data-game="hilo"] .game-card-art {
    background: radial-gradient(130% 115% at 22% 0%, #fcd34d 0%, #c2410c 48%, #3b1d05 100%);
}

/* Drawn card artwork */
.game-art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}
.game-art svg {
    display: block;
    width: 116%;
    height: 116%;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.45));
    transition: transform 0.35s ease;
}
.game-card:hover .game-art svg { transform: translateY(-5px) scale(1.04); }

.game-card-body {
    padding: 13px 15px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.98));
}
.game-card-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #e6edf3);
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}
.game-card-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-hint, #6b7280);
}

.rtp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(4, 8, 12, 0.5);
    border: 1px solid rgba(126, 226, 184, 0.3);
    color: #7ee2b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

.game-card-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #1a0e00;
    background: linear-gradient(135deg, #f0c040, #f97316);
    box-shadow: 0 4px 12px -3px rgba(240, 192, 64, 0.65);
    z-index: 2;
}
.game-card-flag.live::before {
    content: "●";
    margin-right: 4px;
    font-size: 8px;
    vertical-align: 1px;
    animation: lobbyLivePulse 1.4s ease-in-out infinite;
}
@keyframes lobbyLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.game-card[hidden] { display: none; }

/* ── Lobby footer note ────────────────────────────────────────── */
.lobby-foot {
    margin-top: 34px;
    text-align: center;
    color: var(--text-hint, #6b7280);
    font-size: 12px;
    line-height: 1.7;
}
.lobby-foot i { color: #f0c040; margin-right: 6px; }
.lobby-foot a { color: #8b949e; text-decoration: underline; }
.lobby-foot a:hover { color: #f0c040; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lobby-screen {
        margin-top: 0;
        padding: 118px 16px 64px;
    }
    .originals-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .game-card-art { height: 112px; }
    .game-card-art i { font-size: 40px; }
    .game-card-name { font-size: 14px; }
    .game-card-body { padding: 10px 12px 12px; }
    .lobby-sub { font-size: 13px; }
    .lobby-chips { margin: 20px 0; }
    .lobby-chip { padding: 7px 13px; font-size: 12px; }
}

@media (max-width: 420px) {
    .originals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lobby-stats { gap: 8px 16px; font-size: 11px; }
}
