/* ==========================================================================
   W3 Games - premium dark design system
   Loaded after bootstrap.min.css. Sections:
   1 Fonts   2 Tokens   3 Base   4 Buttons   5 Navbar   6 Hero   7 Game cards
   8 Sections   9 Footer   10 Auth   11 Panel (admin/developer)   12 Tables
   13 Forms   14 Status pills   15 Play page   16 Misc   17 Responsive
   ========================================================================== */

/* 1 Fonts ---------------------------------------------------------------- */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-var.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Outfit";
    src: url("../fonts/outfit-var.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

/* 2 Tokens --------------------------------------------------------------- */
:root {
    --w3-bg: #070a14;
    --w3-bg-2: #0b1020;
    --w3-surface: #0f1527;
    --w3-surface-2: #151c33;
    --w3-surface-3: #1b2442;
    --w3-line: rgba(148, 163, 255, 0.13);
    --w3-line-strong: rgba(148, 163, 255, 0.26);
    --w3-text: #e8ecff;
    --w3-muted: #9aa6c9;
    --w3-faint: #6b7799;
    --w3-primary: #7c5cff;
    --w3-primary-2: #5b8cff;
    --w3-accent: #22d3ee;
    --w3-success: #34d399;
    --w3-warning: #fbbf24;
    --w3-danger: #fb7185;
    --w3-grad: linear-gradient(135deg, #7c5cff 0%, #5b8cff 55%, #22d3ee 100%);
    --w3-grad-soft: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(34, 211, 238, .12));
    --w3-radius: 16px;
    --w3-radius-sm: 10px;
    --w3-shadow: 0 18px 50px -18px rgba(0, 0, 0, .7);
    --w3-glow: 0 10px 40px -10px rgba(124, 92, 255, .55);
    --w3-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --w3-display: "Outfit", "Inter", system-ui, sans-serif;

    --bs-body-bg: var(--w3-bg);
    --bs-body-color: var(--w3-text);
    --bs-body-font-family: var(--w3-font);
    --bs-body-font-size: .95rem;
    --bs-border-color: var(--w3-line);
    --bs-link-color: #9db4ff;
    --bs-link-hover-color: #c4d2ff;
    --bs-link-color-rgb: 157, 180, 255;
    --bs-link-hover-color-rgb: 196, 210, 255;
    --bs-secondary-color: var(--w3-muted);
    --bs-tertiary-bg: var(--w3-surface-2);
    --bs-border-radius: var(--w3-radius-sm);
}

/* 3 Base ----------------------------------------------------------------- */
html { scroll-behavior: smooth; color-scheme: dark; }
body {
    background: var(--w3-bg);
    color: var(--w3-text);
    font-family: var(--w3-font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--w3-display);
    letter-spacing: -.01em;
    font-weight: 700;
}
.text-muted, .text-body-secondary { color: var(--w3-muted) !important; }
a { text-decoration: none; }
a:hover { text-decoration: none; }
::selection { background: rgba(124, 92, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--w3-accent); outline-offset: 2px; }
code { color: #c4b5fd; background: rgba(124, 92, 255, .12); padding: .1rem .4rem; border-radius: 6px; font-size: .85em; }
hr { border-color: var(--w3-line); opacity: 1; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #27315a; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

.text-grad {
    background: var(--w3-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--w3-accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--w3-grad); border-radius: 2px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 3000;
    background: var(--w3-primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 4 Buttons -------------------------------------------------------------- */
.btn { font-weight: 600; border-radius: 12px; padding: .55rem 1.1rem; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn-lg { padding: .8rem 1.6rem; border-radius: 14px; font-size: 1rem; }
.btn-sm { padding: .35rem .8rem; border-radius: 9px; font-size: .82rem; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
    background: var(--w3-grad); border: 0; box-shadow: var(--w3-glow);
}
.btn-primary:hover, .btn-primary:focus { background: var(--w3-grad); filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 14px 44px -10px rgba(124, 92, 255, .7); }
.btn-primary:active { background: var(--w3-grad) !important; }
.btn-outline-light, .btn-ghost {
    color: var(--w3-text); background: rgba(255, 255, 255, .04); border: 1px solid var(--w3-line-strong);
}
.btn-outline-light:hover, .btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(157, 180, 255, .5); color: #fff; }
.btn-outline-info { --bs-btn-color: var(--w3-accent); --bs-btn-border-color: rgba(34, 211, 238, .45); --bs-btn-hover-bg: rgba(34, 211, 238, .14); --bs-btn-hover-border-color: var(--w3-accent); --bs-btn-hover-color: #a5f3fc; }
.btn-outline-danger { --bs-btn-color: var(--w3-danger); --bs-btn-border-color: rgba(251, 113, 133, .45); --bs-btn-hover-bg: rgba(251, 113, 133, .15); --bs-btn-hover-border-color: var(--w3-danger); --bs-btn-hover-color: #fecdd3; }
.btn-success { --bs-btn-bg: #10b981; --bs-btn-border-color: #10b981; --bs-btn-hover-bg: #0ea371; --bs-btn-hover-border-color: #0ea371; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 12px; }

/* 5 Navbar --------------------------------------------------------------- */
.site-nav {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(7, 10, 20, .72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .25s, background .25s;
}
.site-nav.is-scrolled { border-bottom-color: var(--w3-line); background: rgba(7, 10, 20, .88); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; font-family: var(--w3-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: var(--w3-grad); box-shadow: var(--w3-glow); color: #fff; font-size: 1.15rem;
}
.brand b { background: var(--w3-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav .nav-link { color: var(--w3-muted); font-weight: 500; padding: .5rem .9rem !important; border-radius: 10px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #fff; background: rgba(255, 255, 255, .06); }
.navbar-toggler { border: 1px solid var(--w3-line-strong); color: #fff; padding: .4rem .6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(124, 92, 255, .35); }
.user-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .25rem .8rem .25rem .25rem; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--w3-line-strong); color: #fff; }
.user-chip:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--w3-grad); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.dropdown-menu { background: var(--w3-surface-2); border: 1px solid var(--w3-line-strong); border-radius: 14px; padding: .4rem; box-shadow: var(--w3-shadow); --bs-dropdown-link-hover-bg: rgba(124, 92, 255, .16); --bs-dropdown-link-color: var(--w3-text); --bs-dropdown-link-hover-color: #fff; --bs-dropdown-divider-bg: var(--w3-line); }
.dropdown-item { border-radius: 9px; padding: .5rem .8rem; font-size: .9rem; }

/* Flash messages */
.flash { border: 1px solid; border-radius: 14px; padding: .85rem 1.1rem; display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.25rem; animation: rise .35s ease both; }
.flash i { font-size: 1.15rem; margin-top: .05rem; }
.flash ul { margin: 0; padding-left: 1.1rem; }
.flash-success { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.flash-danger { background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .35); color: #fecdd3; }
.flash .btn-close { margin-left: auto; filter: invert(1) grayscale(1); opacity: .6; }

/* 6 Hero ----------------------------------------------------------------- */
.hero { position: relative; padding: 5.5rem 0 4rem; isolation: isolate; text-align: center; }
.hero::before {
    content: ""; position: absolute; inset: -120px 0 0; z-index: -2;
    background:
        radial-gradient(600px 320px at 15% 10%, rgba(124, 92, 255, .38), transparent 70%),
        radial-gradient(560px 320px at 85% 0%, rgba(34, 211, 238, .26), transparent 70%),
        radial-gradient(700px 400px at 50% 100%, rgba(91, 140, 255, .16), transparent 70%);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(var(--w3-line) 1px, transparent 1px), linear-gradient(90deg, var(--w3-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}
.hero-pill { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem .9rem .35rem .4rem; border-radius: 999px; border: 1px solid var(--w3-line-strong); background: rgba(255, 255, 255, .05); font-size: .82rem; color: var(--w3-muted); margin-bottom: 1.5rem; }
.hero-pill b { background: var(--w3-grad); color: #fff; border-radius: 999px; padding: .12rem .6rem; font-size: .72rem; letter-spacing: .06em; }
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.8rem); line-height: 1.04; font-weight: 800; margin-bottom: 1.25rem; }
.hero .lead { color: var(--w3-muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 640px; margin: 0 auto; }
.hero-search { max-width: 640px; margin: 2rem auto 0; display: flex; gap: .5rem; padding: .45rem; border-radius: 18px; background: rgba(15, 21, 39, .85); border: 1px solid var(--w3-line-strong); box-shadow: var(--w3-shadow); backdrop-filter: blur(10px); }
.hero-search i { align-self: center; padding-left: .8rem; color: var(--w3-faint); font-size: 1.1rem; }
.hero-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; padding: .6rem .6rem; font-size: 1rem; }
.hero-search input:focus { outline: none; }
.hero-search input::placeholder { color: var(--w3-faint); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 3.5rem; border-radius: var(--w3-radius); overflow: hidden; background: var(--w3-line); border: 1px solid var(--w3-line); }
.stat-strip div { background: rgba(11, 16, 32, .9); padding: 1.1rem .75rem; }
.stat-strip b { display: block; font-family: var(--w3-display); font-size: 1.7rem; line-height: 1.1; }
.stat-strip span { color: var(--w3-muted); font-size: .82rem; }

/* 7 Game cards ----------------------------------------------------------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
.chip { flex: none; padding: .45rem 1rem; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--w3-muted); background: var(--w3-surface); border: 1px solid var(--w3-line); transition: .18s; white-space: nowrap; }
.chip:hover { color: #fff; border-color: var(--w3-line-strong); background: var(--w3-surface-2); }
.chip.active { color: #fff; background: var(--w3-grad); border-color: transparent; box-shadow: var(--w3-glow); }
.chip small { opacity: .7; margin-left: .25rem; }

.game-card { position: relative; display: block; height: 100%; background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: var(--w3-radius); overflow: hidden; color: var(--w3-text); transition: transform .25s, border-color .25s, box-shadow .25s; }
.game-card:hover { transform: translateY(-5px); border-color: rgba(124, 92, 255, .6); box-shadow: 0 22px 50px -22px rgba(124, 92, 255, .55); color: var(--w3-text); }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--w3-surface-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.game-card:hover .thumb img { transform: scale(1.06); }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--w3-display); font-weight: 800; font-size: 3.2rem; color: rgba(255, 255, 255, .85); }
.thumb-g0 { background: linear-gradient(135deg, #7c5cff, #22d3ee); }
.thumb-g1 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
.thumb-g2 { background: linear-gradient(135deg, #10b981, #3b82f6); }
.thumb-g3 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.thumb-g4 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.thumb-g5 { background: linear-gradient(135deg, #f97316, #db2777); }
.thumb-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(to top, rgba(7, 10, 20, .75), rgba(7, 10, 20, .1)); opacity: 0; transition: opacity .25s; }
.game-card:hover .thumb-overlay { opacity: 1; }
.play-pill { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--w3-grad); color: #fff; font-size: 1.6rem; box-shadow: var(--w3-glow); transform: scale(.8); transition: transform .25s; }
.game-card:hover .play-pill { transform: scale(1); }
.thumb-tag { position: absolute; top: .65rem; left: .65rem; padding: .2rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; background: rgba(7, 10, 20, .75); backdrop-filter: blur(6px); border: 1px solid var(--w3-line-strong); color: #fff; }
.thumb-tag.is-featured { background: var(--w3-grad); border: 0; }
.game-card-body { padding: 1rem 1.1rem 1.1rem; }
.game-card-body h3 { font-size: 1.05rem; margin: 0 0 .3rem; color: #fff; }
.game-card-body p { color: var(--w3-muted); font-size: .85rem; margin: 0 0 .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.game-meta-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--w3-faint); }
.game-meta-row .dev { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; }
.game-meta-row .dev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age-badge { padding: .1rem .5rem; border: 1px solid var(--w3-line-strong); border-radius: 6px; font-size: .7rem; color: var(--w3-muted); }

.featured-card { display: grid; grid-template-columns: 1.25fr 1fr; background: var(--w3-surface); border: 1px solid var(--w3-line-strong); border-radius: 22px; overflow: hidden; box-shadow: var(--w3-shadow); }
.featured-card .thumb { aspect-ratio: auto; min-height: 320px; }
.featured-card .featured-body { padding: 2.25rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; background: radial-gradient(400px 260px at 100% 0%, rgba(124, 92, 255, .16), transparent 70%); }
.featured-card h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }

/* 8 Sections ------------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: .4rem 0 0; }
.section-head p { color: var(--w3-muted); margin: .35rem 0 0; }

.feature { height: 100%; padding: 1.6rem; background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: var(--w3-radius); transition: .25s; }
.feature:hover { border-color: var(--w3-line-strong); transform: translateY(-3px); }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; background: var(--w3-grad-soft); color: #b9a8ff; border: 1px solid var(--w3-line-strong); }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--w3-muted); font-size: .9rem; margin: 0; }
.step-no { font-family: var(--w3-display); font-size: 2.6rem; font-weight: 800; line-height: 1; background: var(--w3-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cta-band { position: relative; overflow: hidden; border-radius: 26px; padding: 3.5rem 2rem; text-align: center; border: 1px solid var(--w3-line-strong); background: radial-gradient(600px 300px at 20% 0%, rgba(124, 92, 255, .4), transparent 70%), radial-gradient(500px 300px at 90% 100%, rgba(34, 211, 238, .28), transparent 70%), var(--w3-surface); }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.cta-band p { color: var(--w3-muted); max-width: 560px; margin: .75rem auto 1.5rem; }

.empty-state { text-align: center; padding: 3.5rem 1.5rem; background: var(--w3-surface); border: 1px dashed var(--w3-line-strong); border-radius: var(--w3-radius); }
.empty-state .ico { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2rem; background: var(--w3-grad-soft); color: #b9a8ff; border: 1px solid var(--w3-line-strong); }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { color: var(--w3-muted); max-width: 420px; margin: 0 auto 1rem; }

/* 9 Footer --------------------------------------------------------------- */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--w3-line); background: linear-gradient(to bottom, transparent, rgba(124, 92, 255, .05)); }
.site-footer h6 { font-family: var(--w3-display); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer a { color: var(--w3-muted); display: block; padding: .2rem 0; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { border-top: 1px solid var(--w3-line); color: var(--w3-faint); font-size: .82rem; }

/* 10 Auth ---------------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { position: relative; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; border-right: 1px solid var(--w3-line); background: radial-gradient(520px 360px at 10% 0%, rgba(124, 92, 255, .5), transparent 70%), radial-gradient(520px 360px at 100% 100%, rgba(34, 211, 238, .3), transparent 70%), var(--w3-bg-2); }
.auth-side::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background-image: linear-gradient(var(--w3-line) 1px, transparent 1px), linear-gradient(90deg, var(--w3-line) 1px, transparent 1px); background-size: 48px 48px; }
.auth-side h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.1; font-weight: 800; }
.auth-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.auth-points li { display: flex; gap: .8rem; align-items: flex-start; color: var(--w3-muted); }
.auth-points i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .07); color: var(--w3-accent); border: 1px solid var(--w3-line-strong); }
.auth-points b { color: #fff; display: block; font-weight: 600; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box.wide { max-width: 720px; }
.auth-box h1 { font-size: 2rem; font-weight: 800; }
.auth-main .brand { margin-bottom: 2rem; display: none; }

/* 11 Panel (admin / developer) ------------------------------------------- */
.panel-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.25rem 1rem; background: var(--w3-bg-2); border-right: 1px solid var(--w3-line); display: flex; flex-direction: column; gap: 1.25rem; z-index: 1040; }
.sidebar .brand { padding: .25rem .5rem; }
.side-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--w3-faint); padding: 0 .75rem; margin-bottom: .4rem; }
.side-nav { display: grid; gap: .2rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: 12px; color: var(--w3-muted); font-weight: 500; font-size: .92rem; transition: .15s; position: relative; }
.side-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.side-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-link.active { background: var(--w3-grad-soft); color: #fff; border: 1px solid var(--w3-line-strong); }
.side-link.active i { color: var(--w3-accent); }
.side-link .count { margin-left: auto; background: var(--w3-primary); color: #fff; font-size: .7rem; padding: .05rem .5rem; border-radius: 999px; font-weight: 700; }
.side-foot { margin-top: auto; padding: .9rem; border-radius: 14px; background: var(--w3-surface); border: 1px solid var(--w3-line); }
.panel-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 1rem; padding: .85rem 1.75rem; background: rgba(7, 10, 20, .8); backdrop-filter: blur(14px); border-bottom: 1px solid var(--w3-line); }
.topbar .crumb { color: var(--w3-muted); font-size: .88rem; }
.topbar .crumb b { color: #fff; font-weight: 600; }
.panel-content { padding: 1.75rem; width: 100%; max-width: 1280px; margin: 0 auto; flex: 1; }
.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.page-head p { color: var(--w3-muted); margin: .25rem 0 0; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--w3-muted); margin-bottom: .6rem; }
.back-link:hover { color: #fff; }

.panel-card { background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: var(--w3-radius); padding: 1.4rem; height: 100%; }
.panel-card.flush { padding: 0; overflow: hidden; }
.panel-card h2, .panel-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.panel-card .card-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--w3-line); }
.panel-card .card-top h2 { margin: 0; }

.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.2rem; background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: var(--w3-radius); height: 100%; transition: .2s; }
.stat-card:hover { border-color: var(--w3-line-strong); transform: translateY(-2px); }
.stat-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 15px; font-size: 1.4rem; }
.ico-violet { background: rgba(124, 92, 255, .16); color: #b9a8ff; }
.ico-cyan { background: rgba(34, 211, 238, .14); color: #67e8f9; }
.ico-green { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.ico-amber { background: rgba(251, 191, 36, .14); color: #fcd34d; }
.ico-rose { background: rgba(251, 113, 133, .14); color: #fda4af; }
.stat-card .label { color: var(--w3-muted); font-size: .8rem; }
.stat-card .value { font-family: var(--w3-display); font-size: 1.75rem; font-weight: 700; line-height: 1.15; }

.action-tile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--w3-radius); border: 1px solid var(--w3-line); background: var(--w3-surface); color: var(--w3-text); transition: .2s; height: 100%; }
.action-tile:hover { border-color: rgba(124, 92, 255, .55); background: var(--w3-surface-2); color: #fff; transform: translateY(-2px); }
.action-tile b { display: block; }
.action-tile span { color: var(--w3-muted); font-size: .84rem; }
.action-tile .go { margin-left: auto; color: var(--w3-faint); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: .5rem; }
.bars .bar { flex: 1; min-width: 4px; border-radius: 6px 6px 2px 2px; background: var(--w3-grad); opacity: .85; min-height: 3px; transition: .2s; position: relative; }
.bars .bar:hover { opacity: 1; filter: brightness(1.2); }
.bars-axis { display: flex; justify-content: space-between; color: var(--w3-faint); font-size: .72rem; margin-top: .4rem; }

.meta-list { display: grid; gap: .65rem; margin: 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; border-bottom: 1px dashed var(--w3-line); padding-bottom: .55rem; }
.meta-list dt { color: var(--w3-muted); font-weight: 500; }
.meta-list dd { margin: 0; text-align: right; color: #fff; }

.version-item { border: 1px solid var(--w3-line); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: .9rem; background: var(--w3-bg-2); }

/* 12 Tables -------------------------------------------------------------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--w3-text); --bs-table-border-color: var(--w3-line); --bs-table-hover-bg: rgba(124, 92, 255, .07); --bs-table-hover-color: #fff; --bs-table-striped-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .9rem 1.1rem; background-color: transparent; }
.table thead th { font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--w3-faint); border-bottom: 1px solid var(--w3-line-strong); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-responsive { scrollbar-width: thin; }
.pagination { --bs-pagination-bg: var(--w3-surface); --bs-pagination-border-color: var(--w3-line); --bs-pagination-color: var(--w3-muted); --bs-pagination-hover-bg: var(--w3-surface-2); --bs-pagination-hover-color: #fff; --bs-pagination-hover-border-color: var(--w3-line-strong); --bs-pagination-active-bg: var(--w3-primary); --bs-pagination-active-border-color: var(--w3-primary); --bs-pagination-disabled-bg: var(--w3-surface); --bs-pagination-disabled-border-color: var(--w3-line); --bs-pagination-focus-bg: var(--w3-surface-2); --bs-pagination-focus-color: #fff; gap: .25rem; margin: 0; }
.pagination .page-link { border-radius: 10px !important; }
.pager-wrap { padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; border-top: 1px solid var(--w3-line); color: var(--w3-muted); font-size: .85rem; }
.pager-wrap p { margin: 0; }
.mini-thumb { width: 52px; height: 36px; border-radius: 8px; overflow: hidden; flex: none; }
.mini-thumb img, .mini-thumb div { width: 100%; height: 100%; object-fit: cover; }
.mini-thumb div { display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .9rem; }

/* 13 Forms --------------------------------------------------------------- */
.form-label { font-size: .82rem; font-weight: 600; color: #cbd5ff; margin-bottom: .4rem; }
.form-control, .form-select { background-color: rgba(7, 10, 20, .7); border: 1px solid var(--w3-line-strong); color: #fff; border-radius: 12px; padding: .7rem .95rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.form-control-sm, .form-select-sm { padding: .4rem .7rem; border-radius: 9px; }
.form-control:focus, .form-select:focus { background-color: rgba(7, 10, 20, .9); border-color: var(--w3-primary); color: #fff; box-shadow: 0 0 0 4px rgba(124, 92, 255, .22); }
.form-control::placeholder { color: var(--w3-faint); }
.form-control:disabled { background: var(--w3-surface-2); color: var(--w3-muted); }
.form-select option { background: var(--w3-surface-2); color: #fff; }
.form-text, small.text-muted { color: var(--w3-faint) !important; font-size: .78rem; }
.form-check-input { background-color: rgba(7, 10, 20, .8); border-color: var(--w3-line-strong); }
.form-check-input:checked { background-color: var(--w3-primary); border-color: var(--w3-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(124, 92, 255, .25); border-color: var(--w3-primary); }
input[type=file].form-control::file-selector-button { background: var(--w3-surface-3); color: #fff; border: 0; border-right: 1px solid var(--w3-line-strong); margin: -.7rem .9rem -.7rem -.95rem; padding: .7rem 1rem; cursor: pointer; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--w3-faint); pointer-events: none; }
.input-icon .form-control { padding-left: 2.6rem; }
.pass-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--w3-faint); padding: .4rem .6rem; }
.pass-toggle:hover { color: #fff; }
.form-card { background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: 20px; padding: 2rem; }
.form-section { font-family: var(--w3-display); font-size: 1.05rem; margin: .5rem 0 0; padding-bottom: .5rem; border-bottom: 1px solid var(--w3-line); }

/* 14 Status pills -------------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: capitalize; border: 1px solid transparent; white-space: nowrap; background: rgba(148, 163, 255, .12); color: #c7d2fe; border-color: rgba(148, 163, 255, .25); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-published, .status-active, .status-approved, .status-verified { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.status-pending, .status-pending_review, .status-in_review, .status-uploaded { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .3); }
.status-rejected, .status-suspended, .status-banned { background: rgba(251, 113, 133, .12); color: #fda4af; border-color: rgba(251, 113, 133, .3); }
.status-draft { background: rgba(148, 163, 184, .12); color: #cbd5e1; border-color: rgba(148, 163, 184, .28); }

/* 15 Play page ----------------------------------------------------------- */
.play-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
.game-shell { position: relative; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--w3-line-strong); box-shadow: 0 30px 80px -30px rgba(124, 92, 255, .45); }
.game-frame { display: block; width: 100%; height: min(72vh, 760px); min-height: 360px; border: 0; background: #000; }
.game-shell:fullscreen { border-radius: 0; border: 0; }
.game-shell:fullscreen .game-frame { height: 100vh; }
.game-loader { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(400px 260px at 50% 40%, rgba(124, 92, 255, .25), #05070f 70%); transition: opacity .4s; z-index: 2; }
.game-loader.is-done { opacity: 0; pointer-events: none; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--w3-accent); animation: spin .8s linear infinite; margin: 0 auto .9rem; }
.game-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: 14px; margin-top: 1rem; }
.rank-row { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px dashed var(--w3-line); font-size: .9rem; }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--w3-surface-3); }
.rank-row:nth-child(1) .rank-no { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1200; }
.rank-row:nth-child(2) .rank-no { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.rank-row:nth-child(3) .rank-no { background: linear-gradient(135deg, #fdba74, #c2410c); color: #200800; }
.rank-score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.control-key { display: inline-block; padding: .25rem .65rem; border-radius: 8px; background: var(--w3-surface-3); border: 1px solid var(--w3-line-strong); font-size: .8rem; margin: 0 .35rem .4rem 0; color: #dbe3ff; }
.tag-link { display: inline-block; padding: .25rem .75rem; border-radius: 999px; font-size: .8rem; background: rgba(124, 92, 255, .14); color: #c4b5fd; border: 1px solid rgba(124, 92, 255, .3); }
.tag-link:hover { color: #fff; background: rgba(124, 92, 255, .3); }

/* 16 Misc ---------------------------------------------------------------- */
.pending-card { text-align: center; max-width: 620px; margin: 2rem auto; padding: 3rem 2rem; background: var(--w3-surface); border: 1px solid var(--w3-line-strong); border-radius: 24px; }
.pending-card .big-ico { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 1.25rem; display: grid; place-items: center; font-size: 2.3rem; }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page h1 { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { animation: rise .6s ease both; }
.reveal-2 { animation-delay: .1s; }
.reveal-3 { animation-delay: .2s; }

/* 17 Responsive ---------------------------------------------------------- */
@media (max-width: 991.98px) {
    .navbar-collapse { margin-top: .75rem; padding: 1rem; background: var(--w3-surface); border: 1px solid var(--w3-line); border-radius: 16px; }
    .featured-card { grid-template-columns: 1fr; }
    .featured-card .thumb { min-height: 220px; aspect-ratio: 16 / 9; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-main .brand { display: inline-flex; }
    .panel-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .28s ease; box-shadow: var(--w3-shadow); }
    .sidebar.is-open { transform: none; }
    .sidebar-toggle { display: inline-grid; }
    .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(0, 0, 0, .6); }
    .topbar, .panel-content { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 767.98px) {
    .hero { padding: 3.5rem 0 2.5rem; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 2.5rem 0; }
    .form-card { padding: 1.25rem; }
    .game-frame { height: 62vh; }
    .featured-card .featured-body { padding: 1.5rem; }
    .cta-band { padding: 2.5rem 1.25rem; }
}
@media (max-width: 575.98px) {
    .hero-search { flex-wrap: wrap; }
    .hero-search .btn { width: 100%; }
    .hero-search i { display: none; }
    .hero-search input { padding-left: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Ratings and reviews --------------------------------------------------- */
.stars { color: #fbbf24; letter-spacing: .08em; white-space: nowrap; }
.card-rating { color: #fbbf24; font-weight: 600; font-size: .78rem; white-space: nowrap; }
.rating-summary { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; align-items: center; }
.rating-big { text-align: center; }
.rating-big b { display: block; font-family: var(--w3-display); font-size: 3rem; line-height: 1.1; }
.rating-big small { display: block; }
.rating-bar-row { display: grid; grid-template-columns: 46px 1fr 34px; gap: .6rem; align-items: center; font-size: .85rem; }
.rating-bar-row i { color: #fbbf24; font-size: .75rem; }
.rating-track { height: 8px; border-radius: 6px; background: var(--w3-surface-3); overflow: hidden; }
.rating-track div { height: 100%; background: #fbbf24; border-radius: 6px; }
.review-form { padding-top: 1.25rem; border-top: 1px solid var(--w3-line); }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 1.7rem; color: var(--w3-surface-3); cursor: pointer; transition: color .12s, transform .12s; line-height: 1; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #fbbf24; }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid var(--w3-accent); border-radius: 4px; }
.review-item { display: flex; gap: .9rem; padding: 1rem 0; border-top: 1px solid var(--w3-line); }
.review-item:first-child { border-top: 0; }
@media (max-width: 575.98px) { .rating-summary { grid-template-columns: 1fr; } }
