* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eaeaea;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}

body.game-open {
    overflow: hidden;
}

body.classroom-calculator-mode {
    background: #edf5f2;
    color: #163b3a;
}

body.classroom-calculator-mode > :not(.education-calculator) {
    display: none !important;
}

.education-calculator {
    display: none;
    min-height: 100vh;
    padding: 32px 22px 44px;
    background: radial-gradient(circle at 8% 10%, rgba(242, 178, 82, 0.28), transparent 30%), linear-gradient(135deg, #edf5f2 0%, #dcebe7 100%);
}

body.classroom-calculator-mode .education-calculator { display: block; }
.education-calculator-inner { width: min(1120px, 100%); margin: 0 auto; }
.education-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.education-kicker { margin-bottom: 8px; color: #d06b32; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.education-hero h1 { max-width: 680px; color: #163b3a; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: 0.98; }
.education-hero p { max-width: 440px; color: #496766; font-size: 1.05rem; line-height: 1.6; }
.education-layout { display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.education-panel, .lesson-panel { border: 1px solid rgba(22, 59, 58, 0.14); border-radius: 14px; background: rgba(255, 255, 255, 0.76); box-shadow: 0 18px 44px rgba(22, 59, 58, 0.12); }
.education-panel { padding: 22px; }
.calculator-screen { width: 100%; min-height: 82px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(22, 59, 58, 0.18); border-radius: 10px; background: #163b3a; color: #f8fbf8; font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.calculator-keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.calculator-key { min-height: 54px; border: 1px solid rgba(22, 59, 58, 0.13); border-radius: 9px; background: #fff; color: #163b3a; font-size: 1.08rem; font-weight: 800; cursor: pointer; }
.calculator-key:hover, .calculator-key:focus-visible { border-color: #d06b32; background: #fff4e7; outline: none; }
.calculator-key.operator { background: #f2b252; }
.calculator-key.equals { background: #d06b32; color: #fff; }
.calculator-key.clear { background: #dcebe7; }
.lesson-panel { padding: 26px; }
.lesson-panel h2 { margin-bottom: 10px; color: #163b3a; font-family: Georgia, 'Times New Roman', serif; font-size: 1.9rem; }
.lesson-panel > p { margin-bottom: 20px; color: #496766; line-height: 1.55; }
.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lesson-card { padding: 15px; border-left: 4px solid #f2b252; background: rgba(220, 235, 231, 0.7); }
.lesson-card strong { display: block; margin-bottom: 5px; color: #163b3a; }
.lesson-card span { color: #496766; font-size: 0.92rem; line-height: 1.45; }
.education-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; color: #496766; font-size: 0.9rem; }

.stats-view { padding: 8px 0 40px; }
.stats-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.stats-hero h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.stats-hero p { margin-top: 6px; color: rgba(234, 234, 234, 0.68); }
.stats-scope { display: inline-block; margin-top: 12px; padding: 6px 10px; border: 1px solid rgba(233, 69, 96, 0.32); border-radius: 999px; color: #ffb3bf; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; }
.stats-hero-actions { display: flex; align-items: center; gap: 12px; width: 100%; }
.stats-refresh { min-width: 112px; min-height: 48px; padding: 11px 18px; border: 1px solid rgba(233, 69, 96, 0.42); border-radius: 10px; background: rgba(16, 24, 43, 0.86); color: #fff; cursor: pointer; font-weight: 700; }
.stats-refresh:disabled { opacity: 0.6; cursor: wait; }
.stats-admin { min-height: 48px; padding: 11px 16px; border: 1px solid rgba(255, 196, 92, 0.45); border-radius: 10px; background: rgba(48, 36, 58, 0.9); color: #ffe7ad; cursor: pointer; font-weight: 800; }
.stats-admin-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); }
.stats-admin-modal[hidden] { display: none; }
.stats-admin-panel { width: min(760px, 100%); max-height: min(760px, 90vh); overflow: auto; padding: 24px; border: 1px solid rgba(255,196,92,.4); border-radius: 14px; background: #16213e; color: #fff; }
.stats-admin-panel h2 { margin-bottom: 16px; }
.stats-admin-form, .stats-admin-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats-admin-panel input, .stats-admin-panel select { min-height: 44px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: #0f3460; color: #fff; }
.stats-admin-panel button { min-height: 44px; padding: 9px 14px; border: 0; border-radius: 8px; background: #e94560; color: #fff; cursor: pointer; font-weight: 800; }
.stats-admin-close { float: right; background: transparent !important; font-size: 1.4rem; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.admin-metric { padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.06); }
.admin-metric small { display: block; color: rgba(255,255,255,.65); }
.admin-metric strong { display: block; margin-top: 6px; font-size: 1.5rem; }
.admin-status { min-height: 24px; margin-top: 10px; color: #ffd27c; }
@media (max-width: 600px) { .admin-metric-grid { grid-template-columns: 1fr; } }
.stats-updated { margin-top: 8px; color: rgba(234, 234, 234, 0.56); font-size: 0.78rem; }
.stats-range { flex: 1; min-width: 190px; min-height: 48px; padding: 11px 16px; border: 1px solid rgba(233, 69, 96, 0.42); border-radius: 10px; background: rgba(16, 24, 43, 0.86); color: #fff; font-weight: 700; }
.stats-tabs { display: inline-flex; gap: 6px; margin-bottom: 18px; padding: 5px; border: 1px solid rgba(233, 69, 96, 0.24); border-radius: 12px; background: rgba(10, 14, 25, 0.48); }
.stats-tab { padding: 9px 14px; border: 0; border-radius: 8px; background: transparent; color: rgba(234, 234, 234, 0.68); cursor: pointer; font-weight: 700; }
.stats-tab.active, .stats-tab:hover { background: rgba(233, 69, 96, 0.2); color: #fff; }
.stats-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats-card, .stats-panel { border: 1px solid rgba(233, 69, 96, 0.22); border-radius: 12px; background: linear-gradient(145deg, rgba(22, 33, 62, 0.92), rgba(15, 52, 96, 0.7)); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18); }
.stats-card { padding: 18px; }
.stats-card-label { color: rgba(234, 234, 234, 0.66); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.stats-card-value { display: block; margin-top: 8px; color: #fff; font-size: 2rem; }
.stats-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 18px; }
.stats-panel { padding: 20px; }
.stats-panel h3 { margin-bottom: 16px; color: #fff; font-size: 1.15rem; }
.stats-chart { min-height: 250px; display: flex; align-items: end; gap: 10px; padding: 18px 6px 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.stats-bar-wrap { flex: 1; min-width: 0; height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; }
.stats-bar { width: min(42px, 70%); min-height: 3px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, #ff8095, #e94560); transition: height 0.35s ease; }
.stats-bar-value, .stats-bar-label { color: rgba(234, 234, 234, 0.72); font-size: 0.75rem; }
.stats-bar-label { white-space: nowrap; }
.stats-ranking { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stats-ranking-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.stats-ranking-row:last-child { border-bottom: 0; }
.stats-rank-number { color: #ff8095; font-weight: 800; }
.stats-game-name { overflow: hidden; color: #f4f4f4; text-overflow: ellipsis; white-space: nowrap; }
.stats-game-total { color: #fff; font-weight: 800; }
.stats-empty { color: rgba(234, 234, 234, 0.62); text-align: center; padding: 32px 10px; }
@media (max-width: 900px) { .stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .stats-hero { align-items: stretch; flex-direction: column; } .stats-hero-actions { gap: 10px; } .stats-range { min-width: 0; } .stats-summary, .stats-layout { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
    .education-hero, .education-footer { align-items: flex-start; flex-direction: column; }
    .education-layout, .lesson-grid { grid-template-columns: 1fr; }
}

.catalog-loading {
    grid-column: 1 / -1;
    display: grid;
    min-height: clamp(230px, 32vh, 330px);
    place-items: center;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(115, 214, 196, 0.17);
    border-radius: 18px;
    background: radial-gradient(ellipse at 50% 15%, rgba(42, 170, 155, 0.18), transparent 46%), linear-gradient(145deg, #121e2c, #111923 72%);
    text-align: center;
}
.catalog-loading-content { display: grid; justify-items: center; gap: 12px; }
.catalog-loading-mark { position: relative; display: grid; width: 82px; height: 82px; place-items: center; }
.catalog-loading-mark::before, .catalog-loading-mark::after { position: absolute; inset: 2px; border: 2px solid transparent; border-top-color: #73d6c4; border-right-color: rgba(115, 214, 196, 0.38); border-radius: 50%; content: ""; animation: catalogOrbit 1.15s linear infinite; }
.catalog-loading-mark::after { inset: 10px; border-top-color: #ff91a4; border-right-color: rgba(255, 145, 164, 0.35); animation-duration: 1.7s; animation-direction: reverse; }
.catalog-loading-icon { z-index: 1; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; background: linear-gradient(145deg, rgba(47, 86, 103, 0.95), rgba(26, 46, 61, 0.95)); color: #eafffa; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28); animation: catalogBob 1.8s ease-in-out infinite; }
.catalog-loading-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catalog-loading-title { color: #f0f7f6; font-size: 0.98rem; font-weight: 800; }
.catalog-loading-subtitle { color: #91a7b6; font-size: 0.78rem; }
.catalog-loading-track { width: 128px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.catalog-loading-track::before { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #73d6c4, #ff91a4); content: ""; animation: catalogProgress 1.4s ease-in-out infinite; }
@keyframes catalogOrbit { to { transform: rotate(360deg); } }
@keyframes catalogBob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes catalogProgress { from { transform: translateX(-120%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .catalog-loading-mark::before, .catalog-loading-mark::after, .catalog-loading-icon, .catalog-loading-track::before { animation-duration: 3s; } }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.header {
    background: rgba(10, 14, 25, 0.94);
    color: #eaeaea;
    padding: 14px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.38);
    animation: slideDown 0.6s ease-out;
    position: sticky;
    top: 0;
    z-index: 1600;
    overflow: visible;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(233, 69, 96, 0.18);
}

.header::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    position: relative;
    min-width: 170px;
}

.logo-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

.logo-header-row h1 {
    margin: 0;
    font-size: 2.05em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar {
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1999;
    min-width: 0;
}

.mobile-menu-toggle, .mobile-search-toggle { display: none; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid rgba(233, 69, 96, 0.35); border-radius: 10px; background: rgba(10, 18, 36, 0.7); color: #fff; cursor: pointer; font-size: 1.25rem; }

.topbar-nav {
    min-width: 0;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar {
    display: none;
}

.shell-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 16px;
    font-size: 0.95rem;
    background: transparent;
    color: rgba(234, 234, 234, 0.78);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.shell-nav-btn:hover,
.shell-nav-btn.active {
    color: #ffffff;
    background: rgba(233, 69, 96, 0.16);
    border-color: rgba(233, 69, 96, 0.38);
    box-shadow: 0 10px 24px rgba(233, 69, 96, 0.12);
}

.shell-nav-btn.shell-nav-accent {
    background: transparent;
    border-color: transparent;
    color: rgba(234, 234, 234, 0.78);
    box-shadow: none;
}

.header-collapse-toggle {
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(233, 69, 96, 0.35);
    border-radius: 999px;
    background: rgba(10, 18, 36, 0.7);
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    justify-self: end;
    z-index: 3;
}

.topbar-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 52px;
    position: relative;
}

.topbar-search input {
    width: 0;
    padding: 12px 16px;
    border: 1px solid rgba(233, 69, 96, 0.18);
    border-radius: 14px;
    font-size: 0.98rem;
    background: rgba(20, 29, 47, 0.95);
    color: #eaeaea;
    transition: width 0.28s ease, padding 0.28s ease, opacity 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
}

.topbar-search input::placeholder {
    color: rgba(234, 234, 234, 0.45);
}

.topbar-search::before {
    content: none;
}

.topbar-search-icon { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: rgba(234, 234, 234, 0.78); pointer-events: none; transition: opacity 0.2s ease; }
.topbar-search:hover,
.topbar-search:focus-within {
    min-width: min(340px, 100%);
}

.topbar-search:hover::before,
.topbar-search:focus-within::before {
    opacity: 0;
}

.topbar-search:hover .topbar-search-icon,
.topbar-search:focus-within .topbar-search-icon { opacity: 0; }
.topbar-search:hover input,
.topbar-search:focus-within input {
    width: min(340px, 100%);
    opacity: 1;
    pointer-events: auto;
    padding-left: 16px;
    padding-right: 42px;
}

.topbar-search input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.18);
    transform: translateY(-1px);
}

.header-utility-group { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 12px; }
.soundboard-button {
    padding: 16px 24px;
    font-size: 1.05em;
    background: linear-gradient(135deg, #0f3460 0%, #1a1a1a 100%);
    color: #eaeaea;
    border: 2px solid #e94560;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 130px;
    min-height: 48px;
    line-height: 1.2;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.soundboard-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(233, 69, 96, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.soundboard-button:hover::before {
    width: 300px;
    height: 300px;
}

.soundboard-button:hover {
    background: linear-gradient(135deg, #e94560 0%, #ff5a75 100%);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.6);
    transform: translateY(-3px);
}
.soundboard-button {
    min-height: 48px;
    line-height: 1.2;
}

.soundboard-button:active {
    transform: translateY(0);
}

.gc-logo {
    width: 56px;
    height: 46px;
    border-radius: 10px;
    background: #34A853;
    display: inline-block;
    position: relative;
    box-shadow: 0 4px 16px rgba(52, 168, 83, 0.4);
    animation: float 3s ease-in-out infinite, pulse 2s ease-in-out infinite;
}

.gc-logo::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    right: 6px;
    bottom: 10px;
    border-radius: 6px;
    background: #f4d03f;
    transition: transform 0.3s ease;
}

.gc-logo::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 12px;
    right: 10px;
    bottom: 14px;
    border-radius: 4px;
    background: #2b6a3a;
    transition: transform 0.3s ease;
}

.gc-logo:hover::before {
    transform: scale(1.05);
}

.gc-logo:hover::after {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(52, 168, 83, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(52, 168, 83, 0.7);
    }
}

.header p {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    display: flex;
    max-width: 100%;
    width: 100%;
    background: #16213e;
    margin: 0;
    overflow: hidden;
    min-height: calc(100vh - 86px);
    margin-top: -1px;
}

body.workspace-shell-view .container {
    min-height: calc(100vh - 86px);
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #16213e 0%, #0f3460 100%);
    border-right: 1px solid rgba(233, 69, 96, 0.2);
    padding: 20px;
    min-height: calc(100vh - 86px);
    position: sticky;
    top: 6px;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideInLeft 0.6s ease-out;
    transition: width 0.28s ease, padding 0.28s ease;
    flex: 0 0 220px;
    border-top: 8px solid #16213e;
}

.sidebar-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(233, 69, 96, 0.35);
    border-radius: 999px;
    background: rgba(10, 18, 36, 0.55);
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 2;
}

body.home-shell-view .sidebar-toggle {
    display: none;
}

body.home-shell-view .sidebar {
    padding-top: 8px;
    border-top: 8px solid #16213e;
}

body.home-shell-view .sidebar h3 {
    margin-top: 0;
    padding-top: 0;
}

body.workspace-shell-view .sidebar {
    display: none;
}

body.stats-shell-view .sidebar {
    display: none;
}

body.workspace-shell-view .header-collapse-toggle {
    display: inline-flex;
}

body.workspace-shell-view .main-content {
    padding: 12px;
}

.header.header-collapsed {
    grid-template-columns: 1fr;
    padding: 6px 14px;
    gap: 0;
    justify-items: end;
}

.header.header-collapsed::after {
    display: none;
}

.header.header-collapsed .logo-container,
.header.header-collapsed .topbar-nav,
.header.header-collapsed .header-utility-group {
    display: none;
}

.header.header-collapsed + .container {
    min-height: calc(100vh - 40px);
}

.header.header-collapsed + .container .main-content {
    padding: 4px;
}

.header.header-collapsed + .container .workspace-frame-wrap {
    min-height: calc(100vh - 24px);
    border-radius: 12px;
}

.header.header-collapsed + .container #workspaceFrame {
    min-height: calc(100vh - 24px);
}

.sidebar.collapsed {
    width: 40px;
    flex-basis: 40px;
    padding-left: 6px;
    padding-right: 6px;
}

.sidebar.collapsed .sidebar-body {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.sidebar-body {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar h3 {
    font-size: 1.2em;
    text-transform: uppercase;
    color: #eaeaea;
    margin: 15px 0 10px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin: 8px 0;
}

.sidebar-list button {
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.6) 0%, rgba(15, 52, 96, 0.3) 100%);
    color: #eaeaea;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-list button::before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(233, 69, 96, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.sidebar-list button:hover {
    background: linear-gradient(135deg, #e94560 0%, #ff5a75 100%);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.sidebar-list button:hover::before {
    left: 0;
}

.sidebar-list button.active {
    background: linear-gradient(135deg, #e94560 0%, #ff5a75 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.5);
}

.request-games-sidebar-btn {
    width: 100%;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(233, 69, 96, 0.45);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.25) 0%, rgba(15, 52, 96, 0.5) 100%);
    color: #eaeaea;
    font-size: 0.95em;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.35;
}

.request-games-sidebar-btn:hover {
    background: linear-gradient(135deg, #e94560 0%, #ff5a75 100%);
    border-color: #e94560;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.35);
}

.main-content {
    flex: 1;
    padding: 28px;
    animation: slideInRight 0.6s ease-out;
    overflow-x: hidden;
    overflow-y: auto;
}

.home-ad-banner {
    position: relative;
    margin: 0 0 24px 0;
    border: 1px solid rgba(233, 69, 96, 0.28);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    background: rgba(10, 18, 36, 0.55);
}

.home-ad-banner[hidden] {
    display: none !important;
}

.home-ad-banner img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: contain;
    max-height: none;
}

.incognito-welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 5500;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 7, 14, 0.78);
    backdrop-filter: blur(10px);
}

.incognito-welcome-overlay[hidden] { display: none; }
.incognito-welcome-backdrop { position: absolute; inset: 0; }
.incognito-welcome-card {
    position: relative;
    width: min(560px, 100%);
    overflow: hidden;
    padding: 32px;
    border: 1px solid rgba(255, 145, 164, 0.35);
    border-radius: 24px;
    background: radial-gradient(ellipse at top right, rgba(233, 69, 96, 0.2), transparent 48%), linear-gradient(145deg, #17233b, #0e192b);
    color: #eef2f8;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.incognito-welcome-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #e8edf5;
    font-size: 1.4rem;
    cursor: pointer;
}

.incognito-welcome-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 145, 164, 0.35);
    border-radius: 18px;
    background: rgba(255, 145, 164, 0.1);
    color: #ff91a4;
}

.incognito-welcome-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.incognito-welcome-eyebrow { margin: 0 0 8px; color: #ff91a4; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.incognito-welcome-card h2 { margin: 0; color: #fff; font-size: clamp(1.7rem, 5vw, 2.25rem); letter-spacing: -0.04em; }
.incognito-welcome-intro { margin: 12px 0 22px; color: #b9c5d7; font-size: 0.98rem; line-height: 1.6; }
.incognito-welcome-features { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.incognito-welcome-features li { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; background: rgba(6, 13, 25, 0.38); }
.incognito-welcome-features svg { width: 21px; height: 21px; flex: 0 0 21px; margin-top: 2px; fill: none; stroke: #ff91a4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.incognito-welcome-features strong { display: block; margin-bottom: 3px; color: #f5f7fb; font-size: 0.92rem; }
.incognito-welcome-features span { display: block; color: #aebbd0; font-size: 0.84rem; line-height: 1.45; }
.incognito-welcome-note { margin: 16px 0 0; padding: 11px 13px; border-left: 3px solid #8999b3; border-radius: 0 10px 10px 0; background: rgba(255, 255, 255, 0.045); color: #aebbd0; font-size: 0.78rem; line-height: 1.5; }
.incognito-welcome-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.incognito-welcome-actions button { min-height: 43px; padding: 10px 16px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 11px; background: rgba(255, 255, 255, 0.06); color: #e9eef6; font: inherit; font-size: 0.88rem; font-weight: 750; cursor: pointer; }
.incognito-welcome-actions .primary { border-color: transparent; background: linear-gradient(135deg, #e94560, #ff7b96); color: #fff; box-shadow: 0 10px 24px rgba(233, 69, 96, 0.25); }
.incognito-welcome-actions button:hover { filter: brightness(1.12); }

@media (max-width: 560px) {
    .incognito-welcome-card { padding: 27px 20px 20px; border-radius: 19px; }
    .incognito-welcome-actions { flex-direction: column-reverse; }
    .incognito-welcome-actions button { width: 100%; }
}

.home-ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.page-view[hidden] {
    display: none !important;
}

.workspace-view {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 110px);
}

.workspace-frame-wrap {
    position: relative;
    flex: 1;
    min-height: calc(100vh - 110px);
    border: 1px solid rgba(233, 69, 96, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(12, 18, 32, 0.96) 0%, rgba(15, 52, 96, 0.92) 100%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

#workspaceFrame {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 110px);
    border: none;
    display: block;
    background: #0d1526;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #eaeaea;
    font-weight: 600;
    animation: slideUp 0.6s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 12px;
}

.category-description {
    max-width: 760px;
    margin: -16px 0 24px;
    color: rgba(234, 234, 234, 0.78);
    font-size: 0.98rem;
    line-height: 1.65;
}

.game-guide-promo {
    margin: -16px 0 26px;
    color: rgba(234, 234, 234, 0.78);
    font-size: 0.92rem;
    line-height: 1.6;
}

.game-guide-promo a,
.game-details-guide-link {
    color: #ff9caa;
    font-weight: 700;
    text-underline-offset: 3px;
}

.game-details-guide-link {
    display: inline-block;
    margin: 0 0 18px;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e94560 0%, transparent 100%);
    border-radius: 2px;
    animation: slideRight 0.6s ease-out 0.3s backwards;
}

@keyframes slideRight {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    animation: slideUp 0.6s ease-out 0.2s backwards;
    width: 100%;
    overflow: hidden;
}

.section-games-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.games-grid { row-gap: 12px; overflow: visible; }
.featured-games-section, .new-games-section { min-width: 0; margin: 0 !important; }
.featured-games-section > h3, .new-games-section > h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: #e94560;
    font-size: 1.12rem;
}
.section-heading-icon { width: 19px; height: 19px; flex: 0 0 19px; color: #ff8095; }
.new-games-track {
    display: flex;
    gap: 14px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 128, 149, 0.58) rgba(255, 255, 255, 0.06);
    -webkit-overflow-scrolling: touch;
}
.new-games-track .game-card {
    flex: 0 0 clamp(148px, 18vw, 205px);
    scroll-snap-align: start;
}
.new-games-carousel { position: relative; min-width: 0; }
.new-games-track { scroll-behavior: auto; scroll-snap-type: none; }
.carousel-arrow {
    position: absolute;
    z-index: 8;
    top: 50%;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(10, 16, 29, 0.88);
    color: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.38);
    cursor: pointer;
}
.carousel-arrow:hover:not(:disabled) { border-color: #ff8095; background: #263650; }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }
.carousel-arrow svg { width: 19px; height: 19px; stroke: currentColor; }
.carousel-arrow.previous { left: 8px; }
.carousel-arrow.next { right: 8px; }
.section-games-grid .game-card { min-width: 0; }
.category-icon { width: 19px; height: 19px; flex: 0 0 19px; stroke: currentColor; }
.category-btn { display: flex; align-items: center; gap: 11px; }
.game-fallback-icon { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(236, 242, 252, 0.88); background: radial-gradient(circle, rgba(255, 128, 149, 0.18), transparent 64%); }
.game-fallback-icon svg { width: 30%; max-width: 68px; height: auto; }
.player-count-icon { width: 13px; height: 13px; stroke: currentColor; flex: 0 0 13px; }
.mini-count-icon { width: 15px; height: 15px; stroke: currentColor; }
.mobile-menu-toggle svg, .mobile-search-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.games-grid > .game-card { order: 4; }
.games-grid > .frequently-played-section { order: 0; }
.games-grid > .recommended-games-section { order: 1; }
.games-grid > .popular-games-section { order: 2; }
.games-grid > .popular-divider { order: 2; }
.games-grid > .new-games-section { order: 3; }
.games-grid > .new-games-divider { order: 3; }

.game-card {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(233, 69, 96, 0.2);
    position: relative;
    aspect-ratio: 1;
    animation: cardPop 0.6s ease-out backwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardPop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.025);
    box-shadow: 0 16px 40px rgba(233, 69, 96, 0.5), 0 0 24px rgba(233, 69, 96, 0.2);
    border-color: #e94560;
}

.game-play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease; z-index: 3; pointer-events: none; }
.game-play-overlay span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: rgba(233, 69, 96, 0.92); color: #fff; font-size: 1.7rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.game-card:hover .game-play-overlay, .game-card:focus-within .game-play-overlay { opacity: 1; }
@media (hover: none), (pointer: coarse) { .game-play-overlay { opacity: 1; } .game-card:hover { transform: none; } }
.game-badge { position: absolute; top: 10px; left: 10px; z-index: 4; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 999px; background: rgba(233, 69, 96, 0.92); color: #fff; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.game-badge.broken { background: rgba(92, 96, 112, 0.96); border-color: rgba(255, 255, 255, 0.32); }
.game-badge.fixed { background: rgba(16, 185, 129, 0.92); border-color: rgba(255, 255, 255, 0.28); }
.game-badge.updated { background: rgba(37, 128, 171, 0.94); border-color: rgba(174, 226, 249, 0.6); }
.game-badge.fixed { background: rgba(16, 185, 129, 0.92); border-color: rgba(255, 255, 255, 0.28); }
.game-badge.fixed { background: rgba(16, 185, 129, 0.92); border-color: rgba(255, 255, 255, 0.28); }
.game-badge.fixed { background: rgba(16, 185, 129, 0.92); border-color: rgba(255, 255, 255, 0.28); }
.player-count { position: absolute; top: 8px; right: 8px; z-index: 4; display: none; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.78); color: #fff; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
body.silent-player-refresh .games-grid,
body.silent-player-refresh .game-card { animation: none !important; }
.info-fab-wrap { display: none; position: fixed; right: 22px; bottom: 22px; z-index: 2500; }
body.home-shell-view:not(.game-open) .info-fab-wrap { display: block; }
.info-fab { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid rgba(255, 145, 164, 0.5); border-radius: 50%; background: #17233b; color: var(--camouflage-accent, #ff91a4); cursor: pointer; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; }
.info-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42); }
.info-fab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.info-fab svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.incognito-modal { position: fixed; inset: 0; z-index: 6000; display: none; align-items: center; justify-content: center; padding: 18px; }
.incognito-modal.open { display: flex; }
.incognito-backdrop { position: absolute; inset: 0; background: rgba(3, 7, 14, 0.78); backdrop-filter: blur(8px); }
.incognito-panel { position: relative; display: flex; flex-direction: column; width: min(720px, 100%); max-height: min(88vh, 820px); overflow: hidden; border: 1px solid rgba(255, 145, 164, 0.32); border-radius: 22px; background: linear-gradient(145deg, #17233b 0%, #0e192b 100%); color: #eef2f8; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62); }
.incognito-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.incognito-heading { display: flex; align-items: center; gap: 14px; }
.incognito-heading-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border: 1px solid rgba(255, 145, 164, 0.28); border-radius: 15px; background: rgba(255, 145, 164, 0.1); color: var(--camouflage-accent, #ff91a4); }
.incognito-heading-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.incognito-header h2 { margin: 0; color: #fff; font-size: 1.35rem; }
.incognito-header p { margin: 5px 0 0; color: #aebbd0; font-size: 0.9rem; line-height: 1.45; }
.incognito-close { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #e8edf5; font-size: 1.5rem; cursor: pointer; }
.incognito-form { overflow-y: auto; padding: 20px 26px 8px; }
.incognito-section { margin: 0 0 16px; padding: 17px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px; background: rgba(6, 13, 25, 0.36); }
.incognito-section h3 { margin: 0 0 5px; color: #fff; font-size: 1rem; }
.incognito-section-description { margin: 0 0 15px; color: #aebbd0; font-size: 0.84rem; line-height: 1.45; }
.incognito-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.incognito-field { display: grid; gap: 6px; min-width: 0; }
.incognito-field.full-width { grid-column: 1 / -1; }
.incognito-field label { color: #dce4ef; font-size: 0.84rem; font-weight: 700; }
.incognito-field input:not([type="checkbox"]):not([type="color"]),
.incognito-field select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid rgba(173, 190, 219, 0.2); border-radius: 10px; outline: none; background: rgba(4, 10, 20, 0.64); color: #fff; font: inherit; font-size: 0.9rem; }
.incognito-field select option { background: #17233b; color: #fff; }
.incognito-field input:focus { border-color: var(--camouflage-accent, #ff91a4) !important; box-shadow: 0 0 0 3px rgba(255, 145, 164, 0.2); }
.incognito-field small { color: #91a0b6; font-size: 0.77rem; line-height: 1.4; }
.incognito-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #e5ebf4; font-size: 0.88rem; font-weight: 650; }
.incognito-toggle input { width: 19px; height: 19px; accent-color: var(--camouflage-accent, #ff91a4); }
.incognito-color-row { display: flex; align-items: center; gap: 10px; }
.incognito-color-row input[type="color"] { width: 48px; height: 42px; padding: 3px; border: 1px solid rgba(173, 190, 219, 0.2); border-radius: 10px; background: rgba(4, 10, 20, 0.64); cursor: pointer; }
.incognito-status { min-height: 22px; margin: 0 26px; color: #aebbd0; font-size: 0.84rem; }
.incognito-status.error { color: #ff9b9b; }
.incognito-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 26px 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.incognito-footer-group { display: flex; gap: 9px; margin-left: auto; }
.incognito-action { min-height: 42px; padding: 10px 15px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: #e9eef6; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.incognito-action.primary { border-color: transparent; background: var(--camouflage-accent, #e94560); color: #fff; }
.incognito-action:hover { filter: brightness(1.12); }
body.incognito-modal-open { overflow: hidden; }
@media (max-width: 560px) {
    .incognito-modal { padding: 8px; }
    .incognito-panel { max-height: 94vh; border-radius: 18px; }
    .incognito-header { padding: 18px 16px 14px; }
    .incognito-form { padding: 14px 14px 4px; }
    .incognito-section { padding: 14px; }
    .incognito-fields { grid-template-columns: 1fr; }
    .incognito-field.full-width { grid-column: auto; }
    .incognito-footer { padding: 12px 14px 16px; }
    .incognito-status { margin: 0 14px; }
}

.privacy-footer {
    padding: 28px 20px;
    text-align: center;
    color: rgba(234, 234, 234, 0.7);
}

.privacy-footer a {
    color: #ff5a75;
    text-decoration: none;
}

.privacy-footer a:hover {
    text-decoration: underline;
}

body.game-open .privacy-footer {
    display: none;
}

.game-card:active {
    transform: translateY(-8px) scale(1.01);
}

.game-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.game-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 52, 96, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.game-card:hover .game-info {
    opacity: 1;
}

.game-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 0;
    color: #eaeaea;
    text-align: center;
    animation: titleSlideUp 0.4s ease-out 0.2s backwards;
}

@keyframes titleSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-description {
    display: none;
}

.game-button {
    width: 88%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e94560 0%, #ff5a75 100%);
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
    animation: buttonSlideUp 0.4s ease-out 0.3s backwards;
    display: block;
}

@keyframes buttonSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.game-button:hover::after {
    width: 300px;
    height: 300px;
}

.game-button:hover {
    transform: translateY(-2px) scale(0.96);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.6);
    background: linear-gradient(135deg, #ff5a75 0%, #ff7094 100%);
}

.game-button:active {
    transform: translateY(0) scale(0.95);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    grid-column: 1 / -1;
    animation: fadeIn 0.4s ease-out;
}

.empty-state h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    animation: slideUp 0.6s ease-out;
}

.game-experience {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    grid-template-columns: minmax(0, 1fr) 0;
    grid-template-rows: minmax(0, 1fr) 0;
    gap: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
    background: #0f3460;
}

.game-experience.active {
    display: grid;
    animation: fadeIn 0.3s ease-out;
}

.game-experience.ads-visible:not(.game-fullscreen):not(.ai-mode) {
    grid-template-columns: minmax(0, 1fr) 160px;
    grid-template-rows: minmax(0, 1fr) 90px;
    gap: 6px;
}

#gameModal {
    display: none;
    position: relative;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #1a1a2e;
}

#gameModal.active {
    display: flex;
    flex-direction: column;
}

#gameModal.active #gameFrame {
    display: block !important;
}

.game-play-area {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #1a1a2e;
}

.game-toolbar {
    position: relative;
    z-index: 2;
    display: grid;
    flex: 0 0 32px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, #111a2a, #172236 50%, #111a2a);
    color: #f4f7fc;
}

.game-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: max-content;
    min-width: 0;
    height: 25px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.game-toolbar .fullscreen-button {
    position: static;
    top: auto;
    right: auto;
    width: max-content;
    height: 25px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    box-shadow: none;
    backdrop-filter: none;
}

.game-toolbar-button:hover,
.game-toolbar-button:focus-visible {
    border-color: rgba(255, 145, 164, 0.6);
    background: rgba(233, 69, 96, 0.18);
    outline: none;
}

.game-toolbar-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.game-toolbar-title {
    overflow: hidden;
    padding: 0 8px;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-toolbar-plays {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    color: rgba(231, 238, 249, 0.9);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.game-toolbar-plays-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: #ff9c71;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.game-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.game-details-dialog {
    width: min(680px, calc(100vw - 28px));
    max-height: min(88vh, 780px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: #111a2a;
    color: #f4f7fc;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.game-details-dialog[open] {
    display: flex;
    flex-direction: column;
}

.game-details-dialog::backdrop {
    background: rgba(5, 9, 17, 0.78);
    backdrop-filter: blur(4px);
}

.game-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-details-eyebrow {
    margin-bottom: 4px;
    color: #ff9c71;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-details-header h2 {
    font-size: 1.35rem;
    line-height: 1.25;
}

.game-details-close {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.game-details-content {
    min-height: 0;
    padding: 20px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.game-details-content h3 {
    margin: 22px 0 8px;
    color: #fff;
    font-size: 1rem;
}

.game-details-content h3:first-child { margin-top: 0; }
.game-details-content p { margin: 0 0 13px; color: #c6d0df; line-height: 1.7; }
.game-details-meta { color: #ffb59f !important; font-size: 0.86rem; }

.game-experience.game-fullscreen .game-toolbar {
    display: none;
}

.game-experience.ai-mode .game-toolbar-button.fullscreen-button {
    display: none;
}

.game-ad-slot {
    position: relative;
    display: none;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: rgba(12, 18, 32, 0.94);
}

.game-experience.ads-visible .game-ad-slot {
    display: flex;
}

#div-side-ad {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
}

#div-bottom-ad {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 90px;
    justify-self: center;
}

.ad-preview-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.ad-preview-label span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
    font-weight: 500;
}

.game-experience .adsbygoogle {
    display: block;
    width: 100%;
}

.game-experience.game-fullscreen #div-side-ad,
.game-experience.game-fullscreen #div-bottom-ad,
.game-experience.ai-mode #div-side-ad,
.game-experience.ai-mode #div-bottom-ad {
    display: none;
}

.game-experience.game-fullscreen,
.game-experience.ai-mode {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
}

.game-loading-overlay {
    position: absolute;
    inset: 0 0 32px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    background: rgba(10, 14, 25, 0.78);
    backdrop-filter: blur(6px);
    z-index: 2001;
    pointer-events: none;
}

.game-loading-overlay.visible {
    display: flex;
}

.game-loading-spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.14);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.game-loading-text {
    color: #f4f4f4;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    text-align: center;
}

#soundboardModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    align-items: flex-start;
    justify-content: flex-start;
    transition: background 0.3s ease;
    backdrop-filter: blur(0px);
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#youtubeModal,
#liveSportModal,
#musicModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    backdrop-filter: blur(0px);
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.soundboard-panel{
    width:100%;
    min-height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    padding-top:72px;
    padding-bottom:24px;
    box-sizing:border-box;
}

#soundboardModal.active {
    display: flex !important;
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px) !important;
}

#youtubeModal.active,
#liveSportModal.active,
#musicModal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px) !important;
}

#soundboardFrame,
#liveSportFrame,
#musicFrame {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

.soundboard-close,
.youtube-close,
.livesport-close,
.music-close {
    position: fixed;
    top: 18px;
    z-index: 2001;
    padding: 6px 10px;
    background: rgba(15, 52, 96, 0.18);
    color: rgba(234, 234, 234, 0.92);
    border: 1px solid rgba(233, 69, 96, 0.45);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: none;
    backdrop-filter: blur(6px);
    opacity: 0.9;
}

.soundboard-close,
.livesport-close,
.music-close {
    left: 18px;
}

.youtube-close {
    right: 18px;
}

.ai-game-close {
    right: 18px;
    left: auto;
}

.modal-action {
    position: absolute;
    z-index: 2003;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 33, 62, 0.15);
    color: #e94560;
    border: 2px solid #e94560;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    padding: 0;
}

.close-button {
    top: 20px;
    left: 20px;
}

.fullscreen-button {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 15px;
    background: rgba(12, 18, 29, 0.72);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.fullscreen-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.modal-action.fullscreen-button:hover,
.modal-action.fullscreen-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 145, 164, 0.72);
    background: rgba(233, 69, 96, 0.82);
    color: #fff;
    box-shadow: 0 10px 28px rgba(233, 69, 96, 0.28);
}

.fullscreen-button:hover svg {
    transform: scale(1.08);
}
.fullscreen-button[aria-pressed="true"] { border-color: rgba(255, 145, 164, 0.55); color: #ffe0e6; }

#gameModal.ai-mode .close-button {
    left: auto;
    right: 20px;
}

#gameModal.ai-mode .fullscreen-button {
    right: 72px;
}

#gameModal.ai-mode .modal-action {
    display: none;
}

#gameModal.ai-mode .ai-game-close {
    display: block !important;
}

.modal-action:hover {
    background: rgba(233, 69, 96, 0.25);
    color: #e94560;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.modal-action:active {
    transform: translateY(0);
}

.esc-hint {
    display: none;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#gameModal #gameFrame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    background: #1a1a2e;
    transform: scale(1) !important;
    transform-origin: top left !important;
    display: none;
    min-width: 0;
    min-height: 0;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .header {
        grid-template-columns: auto 1fr auto auto;
        padding: 8px 10px;
        gap: 8px;
    }

    .mobile-menu-toggle, .mobile-search-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .mobile-menu-toggle { order: 3; }
    .mobile-search-toggle { order: 4; }
    .topbar-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 8px 10px; flex-direction: column; align-items: stretch; background: rgba(10, 14, 25, 0.98); border-bottom: 1px solid rgba(233, 69, 96, 0.25); }
    .topbar-nav.mobile-menu-open { display: flex; }
    .topbar-nav .shell-nav-btn { min-height: 44px; text-align: left; }

    .logo-container {
        min-width: 0;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #0f3460;
        min-height: auto;
        max-height: none;
        position: static;
        top: auto;
        padding: 46px 10px 10px;
        flex-basis: auto;
    }

    .sidebar.collapsed {
        width: 100%;
        flex-basis: auto;
        padding: 8px 10px;
    }

    body.home-shell-view .sidebar-toggle { display: inline-flex; }

    .topbar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .section-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .main-content {
        padding: 12px;
    }

    .topbar-search {
        min-width: 0;
    }

    .topbar-search input {
        width: 0;
    }

    .topbar-search.mobile-search-open { position: absolute; top: 100%; left: 10px; right: 10px; padding: 8px 0; background: rgba(10, 14, 25, 0.98); }
    .topbar-search.mobile-search-open input { width: 100%; opacity: 1; pointer-events: auto; padding-left: 16px; padding-right: 16px; }
    .topbar-search.mobile-search-open::before { display: none; }

    .topbar-search:hover,
    .topbar-search:focus-within {
        min-width: 100%;
    }

    .topbar-search:hover input,
    .topbar-search:focus-within input {
        width: 100%;
    }

    .workspace-frame-wrap,
    #workspaceFrame {
        min-height: 62vh;
    }

    .header.header-collapsed {
        padding: 6px 10px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .header p {
        font-size: 1.1em;
    }

    .section-title {
        font-size: 1.8em;
    }

    .game-experience.ads-visible:not(.game-fullscreen):not(.ai-mode) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 72px 72px;
        gap: 4px;
    }

    #div-side-ad { grid-column: 1; grid-row: 2; min-height: 72px; }
    #div-bottom-ad { grid-row: 3; width: 100%; min-height: 72px; }
    .game-toolbar { flex-basis: 36px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); height: 36px; padding: 0 5px; }
    .game-toolbar-button, .game-toolbar .fullscreen-button { height: 27px; gap: 4px; padding: 0 6px; font-size: 0.7rem; }
    .game-toolbar-button svg { width: 14px; height: 14px; flex-basis: 14px; }
    .game-toolbar-title { font-size: 0.86rem; }
    .game-toolbar-plays { gap: 4px; font-size: 0.74rem; }
    .game-toolbar-plays-icon { width: 13px; height: 13px; flex-basis: 13px; }
    .game-loading-overlay { bottom: 36px; }
}

@media (max-width: 420px) {
    .game-toolbar-controls { gap: 3px; }
    .game-toolbar-button, .game-toolbar .fullscreen-button { gap: 0; padding: 0 4px; }
    .game-toolbar-button span { display: none; }
    .game-toolbar-title { font-size: 0.8rem; }
    .game-toolbar-plays { font-size: 0.68rem; }
    .game-details-header { padding: 15px 16px; }
    .game-details-content { padding: 17px 16px 20px; }
}

@media (min-width: 480px) and (max-width: 768px) { .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 901px) {
    .games-grid {
        grid-template-columns: repeat(var(--game-columns, 5), minmax(0, 1fr));
    }

    .section-games-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

:focus-visible {
    outline: 2px solid #ff91a4;
    outline-offset: 3px;
    box-shadow: var(--focus-ring);
}

.header {
    padding: 12px 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
    animation: none;
}

.header::after { display: none; }
.gc-logo { animation: none; }
.topbar-nav { display: flex; align-items: center; gap: 10px; }
.nav-link-group { display: flex; align-items: center; gap: 3px; }
.nav-link-divider { width: 1px; height: 24px; flex: 0 0 1px; background: rgba(173, 190, 219, 0.2); }
.nav-utility-group .shell-nav-btn { font-size: 0.88rem; }
.shell-nav-btn { transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.shell-nav-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: transparent; box-shadow: none; }
.shell-nav-btn.active { color: #fff; background: rgba(233, 69, 96, 0.2); border-color: rgba(255, 115, 139, 0.55); box-shadow: inset 0 -2px #ff738b; }

.sidebar { background: linear-gradient(180deg, rgba(22, 33, 62, 0.98), rgba(15, 36, 65, 0.98)); }
.sidebar h3 { color: #b9c8df; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.sidebar-list button { min-height: 46px; border-radius: 12px; font-size: 1rem; transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease; }
.sidebar-list button:hover { transform: translateX(2px); background: rgba(255, 255, 255, 0.08); }
.sidebar-list button.active { position: relative; background: rgba(233, 69, 96, 0.19); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 115, 139, 0.34); }
.sidebar-list button.active::after { position: absolute; top: 8px; bottom: 8px; left: 0; width: 3px; border-radius: 4px; background: #ff738b; content: ""; }

.section-title { margin-bottom: 24px; font-size: clamp(1.65rem, 3vw, 2rem); }
.section-title::after { width: 52px; height: 3px; }
.games-grid { gap: clamp(10px, 1.2vw, 16px); }
.section-games-grid { gap: 12px; }
.game-card { border-color: var(--surface-border); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; animation-duration: 0.35s; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 5px 18px rgba(233, 69, 96, 0.12); border-color: rgba(255, 115, 139, 0.6); }
.game-thumbnail, .game-thumbnail img { border-radius: 15px; }
.game-info { top: auto; bottom: 0; min-height: 66px; padding: 12px 10px; border-radius: 0 0 15px 15px; background: linear-gradient(180deg, transparent, rgba(5, 10, 19, 0.92)); opacity: 1; backdrop-filter: none; }
.game-title { font-size: clamp(0.95rem, 1.6vw, 1.15rem); line-height: 1.25; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75); }
.game-button { display: none; }
.game-card:hover .game-info, .game-card:focus-within .game-info { inset: 0; min-height: 0; padding: 20px; border-radius: 15px; background: linear-gradient(145deg, rgba(10, 17, 31, 0.9), rgba(15, 52, 96, 0.92)); }
.game-card:hover .game-title, .game-card:focus-within .game-title { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.game-card:hover .game-button, .game-card:focus-within .game-button { display: block; }
.game-card:hover .game-badge, .game-card:hover .player-count, .game-card:focus-within .game-badge, .game-card:focus-within .player-count { opacity: 0; }
.game-badge, .player-count { top: 12px; z-index: 5; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.player-count { right: 12px; background: rgba(9, 15, 27, 0.76); backdrop-filter: blur(8px); }

.stats-card, .stats-panel, .stats-chart-container, .stats-ranking-container {
    border-color: var(--surface-border);
    background: linear-gradient(145deg, rgba(23, 34, 56, 0.96), rgba(14, 23, 40, 0.96));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}
.stats-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-chart { position: relative; overflow: hidden; border-bottom-color: rgba(173, 190, 219, 0.2); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(173, 190, 219, 0.08) calc(25% - 1px), rgba(173, 190, 219, 0.08) 25%); }
.stats-bar { box-shadow: 0 0 18px rgba(233, 69, 96, 0.18); }
.stats-ranking-row { margin: 0 -8px; padding: 10px 8px; border: 0; border-radius: 10px; transition: background 0.18s ease; }
.stats-ranking-row:hover { background: rgba(255, 255, 255, 0.06); }
.stats-ranking-row:nth-child(1) .stats-rank-number { color: #ffd166; }
.stats-ranking-row:nth-child(2) .stats-rank-number { color: #d5deea; }
.stats-ranking-row:nth-child(3) .stats-rank-number { color: #e7a77c; }
.privacy-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin: 24px 20px 12px; padding: 20px; border: 1px solid var(--surface-border); border-radius: 16px; background: rgba(14, 22, 38, 0.82); color: #b9c8df; }
.privacy-footer a { color: #ff91a4; text-decoration: none; }
.privacy-footer a:hover { color: #fff; text-decoration: underline; }
.cookie-consent { position: fixed; z-index: 4001; right: 20px; bottom: 20px; left: 20px; display: flex; width: min(920px, calc(100% - 40px)); align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 17px 19px; border: 1px solid rgba(255, 145, 164, 0.26); border-radius: 16px; background: radial-gradient(ellipse at 0% 0%, rgba(233, 69, 96, 0.13), transparent 42%), linear-gradient(135deg, rgba(20, 30, 48, 0.98), rgba(11, 19, 33, 0.98)); color: #f3f5fa; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.06); backdrop-filter: blur(18px); animation: cookieConsentIn 0.28s ease-out both; }
.cookie-consent[hidden] { display: none; }
@keyframes cookieConsentIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.cookie-consent-copy { min-width: 0; }
.cookie-consent-copy strong { display: block; margin-bottom: 4px; font-size: 0.94rem; }
.cookie-consent-copy p { margin: 0; color: #b9c6d9; font-size: 0.82rem; line-height: 1.5; }
.cookie-consent-copy a { color: #ffb1be; text-decoration: underline; text-underline-offset: 2px; }
.cookie-consent-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.cookie-consent-actions button { min-width: 94px; min-height: 40px; padding: 0 15px; border: 1px solid rgba(195, 209, 229, 0.2); border-radius: 10px; background: rgba(255, 255, 255, 0.055); color: #e7edf7; font: inherit; font-size: 0.82rem; font-weight: 750; cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.cookie-consent-actions button:hover { transform: translateY(-1px); border-color: rgba(195, 209, 229, 0.45); background: rgba(255, 255, 255, 0.1); }
.cookie-consent-actions [data-cookie-consent="accept"] { border-color: transparent; background: #e94560; color: #fff; box-shadow: 0 6px 16px rgba(233, 69, 96, 0.22); }
.cookie-consent-actions [data-cookie-consent="accept"]:hover { background: #ff6078; }
@media (max-width: 768px) {
    .cookie-consent { right: 10px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 10px; width: auto; align-items: stretch; flex-direction: column; gap: 12px; padding: 15px; }
    .cookie-consent-actions { justify-content: flex-end; }
}
@media (max-width: 420px) {
    .cookie-consent { right: 8px; left: 8px; padding: 13px; }
    .cookie-consent-actions button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .cookie-consent { animation: none; } }
#settingsModal .panel { border: 1px solid rgba(255, 115, 139, 0.4); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48); }
#settingsModal .panel h3 { margin-bottom: 24px; }
#settingsModal .form-group { margin-bottom: 22px; }

.mobile-bottom-nav, .mobile-more-menu { display: none; }

@media (max-width: 768px) {
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .header { grid-template-columns: 1fr auto; min-height: 66px; padding: 8px 14px; gap: 8px; }
    .logo-header-row { gap: 9px; }
    .logo-header-row h1 { font-size: 1.55rem; }
    .gc-logo { width: 46px; height: 40px; }
    .topbar-nav, .mobile-menu-toggle, .mobile-search-toggle, .header-collapse-toggle { display: none !important; }
    .topbar-search { display: none !important; }
    .topbar-search.mobile-search-open { display: flex !important; }
    .sidebar { padding: 12px 12px 10px; overflow: visible; }
    body.home-shell-view .sidebar-toggle { display: none; }
    .sidebar-body { overflow: visible; }
    .sidebar-body h3 { margin: 0 0 8px; }
    .sidebar-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
    .sidebar-list::-webkit-scrollbar { display: none; }
    .sidebar-list li { flex: 0 0 auto; }
    .sidebar-list button { min-height: 40px; padding: 8px 12px; white-space: nowrap; }
    .sidebar-list button.active::after { top: auto; right: 10px; bottom: 0; left: 10px; width: auto; height: 3px; }
    .request-games-sidebar-btn { display: none; }
    .main-content { width: 100%; min-width: 0; padding: 14px 12px 24px; }
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .section-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .new-games-track { gap: 10px; }
    .new-games-track .game-card { flex-basis: 142px; }
    .carousel-arrow { width: 34px; height: 34px; }
    .section-games-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 2px 2px 10px; -webkit-overflow-scrolling: touch; }
    .section-games-grid .game-card { flex: 0 0 142px; scroll-snap-align: start; }
    .game-card { min-width: 0; border-radius: 14px; }
    .game-thumbnail, .game-thumbnail img { border-radius: 13px; }
    .game-info { min-height: 54px; padding: 9px 7px; }
    .game-title { font-size: 0.9rem; }
    .game-badge { top: 8px; left: 8px; padding: 4px 7px; font-size: 0.62rem; }
    .player-count { top: 8px; right: 8px; padding: 4px 6px; font-size: 0.62rem; }
    .privacy-footer { margin: 20px 12px 8px; padding: 16px; gap: 10px 12px; font-size: 0.88rem; }
    .stats-summary { grid-template-columns: 1fr; }
    .stats-layout { grid-template-columns: 1fr; }
    .mobile-bottom-nav { position: fixed; z-index: 3000; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(173, 190, 219, 0.16); background: rgba(10, 15, 27, 0.96); backdrop-filter: blur(18px); }
    .mobile-bottom-nav a, .mobile-bottom-nav button { display: flex; min-width: 0; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 12px; background: transparent; color: #aebbd0; font: inherit; font-size: 0.68rem; font-weight: 650; text-decoration: none; cursor: pointer; }
    .mobile-bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
    .mobile-bottom-nav .active, .mobile-bottom-nav [aria-expanded="true"] { color: #ff91a4; background: rgba(233, 69, 96, 0.12); }
    .mobile-more-menu { position: fixed; z-index: 2999; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); display: none; width: min(230px, calc(100vw - 20px)); padding: 8px; border: 1px solid var(--surface-border); border-radius: 16px; background: rgba(13, 21, 37, 0.98); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42); }
    .mobile-more-menu.open { display: grid; }
    .mobile-more-menu a { padding: 11px 12px; border-radius: 10px; color: #e7edf7; font-size: 0.92rem; text-decoration: none; }
    .mobile-more-menu a:hover, .mobile-more-menu a.active { background: rgba(233, 69, 96, 0.16); color: #fff; }
    .info-fab-wrap { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); }
    body.game-open { padding-bottom: 0; }
    body.game-open .mobile-bottom-nav, body.game-open .mobile-more-menu { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

:root {
    --surface: #131c2c;
    --surface-border: rgba(169, 187, 211, 0.13);
    --focus-ring: 0 0 0 3px rgba(233, 69, 96, 0.3);
    --home-accent: #e94560;
    --home-accent-strong: #ff91a4;
    --home-text: #f3f6fa;
    --home-muted: #a3afc1;
}

body:not(.classroom-calculator-mode) {
    background: #0a101b;
    color: var(--home-text);
    animation: none;
}

.header {
    min-height: 76px;
    padding: 10px clamp(18px, 3vw, 42px);
    background: rgba(10, 16, 27, 0.94);
    border-bottom-color: rgba(169, 187, 211, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.logo-header-row h1 {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #f5f7fa;
    font-size: 1.8rem;
    letter-spacing: -0.045em;
}

.shell-nav-btn { color: #aeb9c9; }
.shell-nav-btn:hover { color: #f4f7fa; background: rgba(255, 255, 255, 0.055); }
.shell-nav-btn.active { color: #ffe0e6; background: rgba(233, 69, 96, 0.1); border-color: rgba(233, 69, 96, 0.25); box-shadow: inset 0 -2px var(--home-accent); }
.nav-link-divider { background: rgba(169, 187, 211, 0.13); }

.container {
    gap: clamp(20px, 2.6vw, 38px);
    background: transparent;
    margin-top: 0;
    padding: 10px clamp(16px, 2.8vw, 42px) 0;
}
body.home-shell-view .container { overflow: visible; }

.sidebar {
    width: 228px;
    flex-basis: 228px;
    min-height: calc(100vh - 108px);
    max-height: calc(100vh - 108px);
    top: 86px;
    padding: 18px 12px;
    border: 1px solid rgba(169, 187, 211, 0.1);
    border-radius: 18px;
    background: #101927;
    animation: none;
}

body.home-shell-view .sidebar { top: 86px; align-self: flex-start; margin-top: 0; padding-top: 18px; border-top: 1px solid rgba(169, 187, 211, 0.1); }
body.home-shell-view .sidebar h3 { margin: 2px 10px 14px; color: #8391a5; letter-spacing: 0.12em; }
.sidebar-list li { margin: 3px 0; }
.sidebar-list button {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #aab6c7;
    font-size: 0.9rem;
}
.sidebar-list button:hover { transform: none; background: rgba(255, 255, 255, 0.055); color: #f4f7fa; }
.sidebar-list button.active {
    background: rgba(233, 69, 96, 0.1);
    color: #ffe0e6;
    box-shadow: inset 0 0 0 1px rgba(233, 69, 96, 0.17);
}
.sidebar-list button.active::after { background: var(--home-accent); }
.sidebar-list button.active .category-icon { color: var(--home-accent); }

.main-content { min-width: 0; padding: 0 0 36px; animation: none; }
.home-hero {
    position: relative;
    display: flex;
    min-height: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    overflow: visible;
    margin: 0 0 34px;
    padding: clamp(14px, 1.5vw, 18px) clamp(20px, 3vw, 30px);
    border: 1px solid rgba(233, 69, 96, 0.15);
    border-radius: 24px;
    background: radial-gradient(ellipse at 82% 20%, rgba(80, 129, 149, 0.2), transparent 36%), linear-gradient(115deg, #17283a 0%, #132236 54%, #152a37 100%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.home-hero::after {
    position: absolute;
    top: -110px;
    right: 20%;
    width: 290px;
    height: 290px;
    border: 1px solid rgba(255, 145, 164, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255, 145, 164, 0.025), 0 0 0 72px rgba(255, 145, 164, 0.02);
    content: "";
    pointer-events: none;
    clip-path: inset(110px 0 0);
}

.home-hero-copy { position: relative; z-index: 1; max-width: 630px; }
.home-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--home-accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.home-hero-eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--home-accent); box-shadow: 0 0 12px rgba(233, 69, 96, 0.55); content: ""; }
.home-hero h1 { max-width: 590px; margin: 0; color: #f5f7fa; font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 750; letter-spacing: -0.055em; line-height: 1.07; }
.home-hero h1 span { color: var(--home-accent-strong); }
.home-hero-description { max-width: 500px; margin: 8px 0 14px; color: #b1bece; font-size: clamp(0.94rem, 1.2vw, 1.04rem); line-height: 1.5; }
.home-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.home-browse-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 0 17px; border: 1px solid rgba(255, 128, 149, 0.24); border-radius: 11px; background: var(--home-accent); color: #0a2223; font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; }
.home-browse-button:hover { transform: translateY(-1px); background: #ff8095; box-shadow: 0 8px 20px rgba(233, 69, 96, 0.2); }
.home-browse-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-hero-note { color: #99a9bc; font-size: 0.82rem; }
.home-discord-link { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(126, 139, 255, 0.34); border-radius: 10px; background: rgba(88, 101, 242, 0.14); color: #dce0ff; font-size: 0.82rem; font-weight: 750; text-decoration: none; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.home-discord-link:hover { transform: translateY(-1px); border-color: rgba(155, 164, 255, 0.72); background: rgba(88, 101, 242, 0.24); }
.home-discord-link svg { width: 18px; height: 18px; fill: currentColor; }
.home-hero.is-discord-intro { min-height: 270px; align-items: center; overflow: hidden; padding: clamp(22px, 4vw, 42px); border-color: rgba(133, 145, 255, 0.32); background: radial-gradient(ellipse at 86% 22%, rgba(88, 101, 242, 0.28), transparent 38%), linear-gradient(118deg, #121d31 0%, #17233c 58%, #222b4d 100%); }
.home-hero.is-discord-intro::after { display: none; }
.home-hero.is-discord-intro > :not(.home-hero-discord-intro) { display: none; }
.home-hero-discord-intro { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 32px; }
.home-hero-discord-intro[hidden] { display: none; }
.home-hero-discord-copy { max-width: 630px; }
.home-hero-discord-eyebrow { margin: 0 0 13px; color: #aeb5ff; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.home-hero-discord-copy h1 { margin: 0; color: #f7f8ff; font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; line-height: 1.04; }
.home-hero-discord-copy h1 span { color: #aeb5ff; }
.home-hero-discord-copy p { max-width: 480px; margin: 12px 0 19px; color: #c1c9da; font-size: 0.98rem; line-height: 1.6; }
.home-hero-discord-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.home-hero-discord-join { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 11px; background: #5865f2; color: #fff; font-size: 0.9rem; font-weight: 800; text-decoration: none; box-shadow: 0 9px 24px rgba(35, 44, 148, 0.3); transition: transform 0.18s ease, background 0.18s ease; }
.home-hero-discord-join:hover { transform: translateY(-2px); background: #6975ff; }
.home-hero-discord-join svg { width: 20px; height: 20px; fill: currentColor; }
.home-hero-discord-continue { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #bec8db; font: inherit; font-size: 0.83rem; font-weight: 700; cursor: pointer; }
.home-hero-discord-continue:hover { color: #fff; }
.home-hero-discord-qr { width: 184px; flex: 0 0 184px; padding: 11px 11px 9px; border: 1px solid rgba(255, 255, 255, 0.46); border-radius: 17px; background: #fff; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3); transform: rotate(2deg); }
.home-hero-discord-qr img { display: block; width: 100%; aspect-ratio: 1; }
.home-hero-discord-qr figcaption { margin-top: 6px; color: #30364a; font-size: 0.68rem; font-weight: 800; text-align: center; }
@media (max-width: 600px) {
    .home-hero.is-discord-intro { padding: 21px 18px; }
    .home-hero-discord-intro { align-items: flex-start; gap: 15px; }
    .home-hero-discord-qr { width: 124px; flex-basis: 124px; padding: 7px 7px 6px; border-radius: 12px; }
    .home-hero-discord-qr figcaption { font-size: 0.58rem; }
    .home-hero-discord-copy h1 { font-size: clamp(1.7rem, 7vw, 2.35rem); }
    .home-hero-discord-copy p { margin: 9px 0 14px; font-size: 0.86rem; line-height: 1.45; }
    .home-hero-discord-actions { align-items: flex-start; gap: 5px; }
    .home-hero-discord-join { min-height: 42px; padding: 0 12px; font-size: 0.82rem; }
    .home-hero-discord-continue { min-height: 38px; padding: 0 4px; font-size: 0.76rem; }
}
@media (max-width: 380px) {
    .home-hero-discord-intro { flex-direction: column-reverse; align-items: stretch; }
    .home-hero-discord-qr { width: 100px; flex-basis: auto; align-self: flex-end; }
    .home-hero-discord-qr figcaption { font-size: 0.55rem; }
}
.home-hero-share { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 9px; }
.home-hero-share-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.home-hero-share-label { margin-right: 2px; color: #b1bece; font-size: 0.76rem; font-weight: 700; }
.home-hero-share-button { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(205, 221, 239, 0.2); border-radius: 11px; background: rgba(8, 18, 30, 0.58); color: #f5f7fa; cursor: pointer; text-decoration: none; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.home-hero-share-button:hover { transform: translateY(-2px); border-color: rgba(255, 145, 164, 0.7); background: rgba(233, 69, 96, 0.15); }
.home-hero-share-button svg { width: 19px; height: 19px; }
.home-hero-share-button[data-share-platform="whatsapp"] { color: #45df83; }
.home-hero-share-button[data-share-platform="x"] { color: #fff; }
.home-hero-share-button[data-share-platform="facebook"] { color: #8ab4ff; }
.home-hero-share-button[data-share-platform="reddit"] { color: #ff8068; }
.home-hero-share-button[data-share-platform="telegram"] { color: #72c4ef; }
.home-hero-share-button[data-share-platform="discord"] { color: #aeb8ff; }
.home-hero-share-button[data-share-platform="copy"] { color: #c4d2e2; }
.home-hero-share-status { min-height: 1em; color: #b7f3ce; font-size: 0.78rem; }
@media (max-width: 480px) { .home-hero-share { gap: 9px; } .home-hero-share-controls { gap: 7px; } .home-hero-share-button { width: 32px; height: 32px; } }
@media (max-width: 520px) { .home-hero-eyebrow { font-size: 0.62rem; letter-spacing: 0.11em; } }
.home-hero-art { position: relative; z-index: 1; display: grid; width: clamp(124px, 19vw, 214px); align-self: center; aspect-ratio: 1; flex: 0 0 auto; place-items: center; margin-right: clamp(0px, 3vw, 36px); border: 1px solid rgba(255, 145, 164, 0.14); border-radius: 38px; background: linear-gradient(145deg, rgba(233, 69, 96, 0.1), rgba(233, 69, 96, 0.025)); color: rgba(255, 145, 164, 0.86); transform: rotate(5deg); box-shadow: 0 20px 52px rgba(0, 0, 0, 0.16); }
.home-hero-art::before, .home-hero-art::after { position: absolute; width: 11px; height: 11px; border: 2px solid rgba(233, 69, 96, 0.76); border-radius: 50%; content: ""; }
.home-hero-art::before { top: 22%; right: 22%; }
.home-hero-art::after { bottom: 24%; left: 20%; width: 8px; height: 8px; background: rgba(233, 69, 96, 0.56); }
.home-hero-art svg { width: 48%; height: 48%; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.home-hero-slideshow { position: relative; display: grid; width: 100%; height: 100%; }
.home-hero-slideshow[hidden] { display: none; }
.home-hero-slide { position: absolute; inset: 0; }
.home-hero-slide-item { position: absolute; inset: 0; }
.home-hero-slide-image { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.home-hero-slide-image::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 11, 19, 0.02) 15%, rgba(4, 11, 19, 0.18) 42%, rgba(4, 11, 19, 0.94) 100%); content: ""; }
.home-hero-slide-image img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-slide-copy { position: absolute; z-index: 1; right: 14px; bottom: 46px; left: 16px; display: grid; gap: 4px; color: #fff; text-align: left; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65); }
.home-hero-slide-rank { color: #ffb3bf; font-size: 0.66rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.home-hero-slide-title { overflow: hidden; font-size: clamp(1rem, 1.7vw, 1.3rem); font-weight: 800; letter-spacing: -0.025em; text-overflow: ellipsis; white-space: nowrap; }
.home-hero-slide-plays { color: rgba(237, 245, 249, 0.8); font-size: 0.73rem; font-weight: 650; }
.home-hero-slide-description { display: -webkit-box; overflow: hidden; color: rgba(237, 245, 249, 0.86); font-size: 0.76rem; font-weight: 550; line-height: 1.35; line-clamp: 2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-hero-slide-item:not([hidden]) { animation: homeHeroSlideIn 0.35s ease both; }
@keyframes homeHeroSlideIn { from { opacity: 0.5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.home-hero-slide-play { position: absolute; z-index: 2; top: 13px; right: 13px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.38); border-radius: 50%; background: rgba(9, 20, 29, 0.58); color: #e0fbf4; cursor: pointer; backdrop-filter: blur(8px); }
.home-hero-slide-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.home-hero-slide-controls { position: absolute; z-index: 2; right: 13px; bottom: 13px; left: 13px; display: flex; align-items: center; justify-content: space-between; }
.home-hero-slide-dots { display: flex; align-items: center; gap: 6px; }
.home-hero-slide-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: width 0.2s ease, background 0.2s ease; }
.home-hero-slide-dot[aria-current="true"] { width: 21px; background: #ff91a4; }
.home-hero-slide-arrows { display: flex; gap: 6px; }
.home-hero-slide-arrow { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; background: rgba(8, 18, 27, 0.56); color: #fff; cursor: pointer; }
.home-hero-slide-arrow svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-hero-slide-arrow:hover { border-color: rgba(255, 145, 164, 0.76); }
.home-hero.has-slideshow .home-hero-art { overflow: hidden; border-radius: 22px; transform: none; background: #142335; }
.home-hero.has-slideshow .home-hero-art::before, .home-hero.has-slideshow .home-hero-art::after { display: none; }
.home-hero.has-slideshow .home-hero-art > svg { display: none; }
.home-hero.has-slideshow { min-height: 330px; border-color: rgba(255, 145, 164, 0.22); background: radial-gradient(ellipse at 78% 50%, rgba(233, 69, 96, 0.17), transparent 42%), linear-gradient(115deg, #17283a 0%, #132236 58%, #1b2638 100%); }
.home-hero.has-slideshow .home-hero-copy { max-width: min(58%, 630px); }
.home-hero.has-slideshow .home-hero-art { width: clamp(250px, 34vw, 390px); aspect-ratio: 1.34; flex-basis: clamp(250px, 34vw, 390px); margin-right: 0; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 24px; background: radial-gradient(ellipse at 50% 35%, rgba(233, 69, 96, 0.2), transparent 70%), #101927; box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38), 0 0 42px rgba(233, 69, 96, 0.12); }
.home-hero.has-slideshow .home-hero-art::after { display: block; position: absolute; inset: -1px; width: auto; height: auto; border: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 28%, transparent 72%, rgba(255, 145, 164, 0.13)); content: ""; pointer-events: none; }
.home-hero-slide-image::after { background: linear-gradient(180deg, rgba(4, 11, 19, 0.02) 10%, rgba(4, 11, 19, 0.08) 42%, rgba(4, 11, 19, 0.92) 100%), linear-gradient(90deg, rgba(4, 11, 19, 0.16), transparent 58%); }
.home-hero-slide-image img { transform: scale(1.015); }
.home-hero-slide-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 145, 164, 0.9); background: radial-gradient(ellipse at 50% 42%, rgba(233, 69, 96, 0.22), transparent 55%); }
.home-hero-slide-image.has-image .home-hero-slide-fallback { display: none; }
.home-hero-slide-fallback svg { width: 30%; height: 30%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 8px 24px rgba(233, 69, 96, 0.24)); }
.home-hero-slide-copy { right: 18px; bottom: 52px; left: 20px; gap: 5px; }
.home-hero-slide-rank { display: inline-flex; width: fit-content; align-items: center; gap: 6px; margin-bottom: 2px; padding: 5px 9px; border: 1px solid rgba(255, 179, 191, 0.32); border-radius: 999px; background: rgba(15, 22, 35, 0.62); color: #ffd5dc; font-size: 0.62rem; letter-spacing: 0.11em; backdrop-filter: blur(10px); }
.home-hero-slide-title { font-size: clamp(1.15rem, 2vw, 1.55rem); }
.home-hero-slide-plays { font-size: 0.76rem; }
.home-hero-slide-play { width: 42px; height: 42px; border-color: rgba(255, 255, 255, 0.48); background: rgba(9, 20, 29, 0.68); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24); transition: transform 0.18s ease, background 0.18s ease; }
.home-hero-slide-play:hover { transform: scale(1.07); background: rgba(233, 69, 96, 0.92); }
#homeView.filtered-view .home-hero { display: none; }

.section-title {
    margin: 0 0 19px;
    scroll-margin-top: 92px;
    padding: 0;
    color: #e9eef5;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 720;
    letter-spacing: -0.035em;
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
}
.section-title::after { display: none; }
.games-grid { gap: 14px; row-gap: 24px; margin-bottom: 32px; animation: none; }
.featured-games-section, .new-games-section { padding-top: 5px; }
.featured-games-section > h3, .new-games-section > h3 { margin-bottom: 13px; color: #e6edf5; font-size: 1rem; font-weight: 720; letter-spacing: -0.01em; }
.section-heading-icon { color: var(--home-accent); }
.section-games-grid { gap: 13px; }
.new-games-track { padding-bottom: 13px; scrollbar-color: rgba(233, 69, 96, 0.35) rgba(255, 255, 255, 0.04); }
.carousel-arrow { border-color: rgba(205, 221, 239, 0.19); background: rgba(13, 22, 35, 0.94); }
.carousel-arrow:hover:not(:disabled) { border-color: var(--home-accent); background: #1c3040; }

.game-card {
    overflow: hidden;
    border: 1px solid rgba(178, 196, 218, 0.12);
    border-radius: 15px;
    background: #131d2c;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.17);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: none;
}
.game-card::before { display: none; }
.game-card:hover, .game-card:focus-within { transform: translateY(-3px); border-color: rgba(233, 69, 96, 0.34); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26); }
.game-card:active { transform: translateY(-1px); }
.game-thumbnail, .game-thumbnail img { border-radius: 14px; }
.game-thumbnail { background-color: #182438; }
.game-thumbnail img { transition: transform 0.3s ease; }
.game-card:hover .game-thumbnail img { transform: scale(1.035); }
.game-info, .game-card:hover .game-info, .game-card:focus-within .game-info {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 68px;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 24px 12px 12px;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, transparent 0%, rgba(7, 13, 22, 0.88) 54%, rgba(7, 13, 22, 0.95) 100%);
    opacity: 1;
    backdrop-filter: none;
}
.game-title, .game-card:hover .game-title, .game-card:focus-within .game-title {
    margin: 0;
    color: #f5f7fa;
    font-size: clamp(0.9rem, 1.2vw, 1.03rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
    animation: none;
}
.game-card .game-button { display: none; }
.game-card:hover .game-info, .game-card:focus-within .game-info {
    inset: 0;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(10, 17, 31, 0.84), rgba(29, 24, 40, 0.88));
}
.game-card:hover .game-title, .game-card:focus-within .game-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    text-align: center;
}
.game-card:hover .game-button, .game-card:focus-within .game-button {
    display: inline-flex;
    width: auto;
    min-width: 112px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: linear-gradient(135deg, #e94560, #ff738b);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.28);
    animation: none;
}
.game-play-overlay span { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.46); background: rgba(12, 24, 34, 0.72); color: #ffe0e6; font-size: 1.2rem; backdrop-filter: blur(8px); }
.game-badge { border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(11, 21, 31, 0.78); color: #ffe0e6; font-size: 0.65rem; letter-spacing: 0.07em; backdrop-filter: blur(8px); }
.game-card:hover .game-badge, .game-card:hover .player-count, .game-card:focus-within .game-badge, .game-card:focus-within .player-count { opacity: 1; }
.game-badge.fixed { background: rgba(24, 106, 84, 0.88); }
.game-badge.broken { background: rgba(57, 66, 81, 0.9); }
.game-badge.popular { border-color: rgba(255, 145, 164, 0.46); background: rgba(174, 42, 69, 0.88); color: #fff2f4; }
.popular-rank-badge { position: absolute; top: 10px; left: 10px; z-index: 6; display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(255, 255, 255, 0.48); border-radius: 11px 11px 11px 4px; background: linear-gradient(145deg, #d5a947, #8e6526); color: #fff9e7; font-size: 0.82rem; font-weight: 900; line-height: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.38); box-shadow: 0 4px 11px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.24); }
.popular-rank-badge::before { position: absolute; inset: 2px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 8px 8px 8px 3px; content: ""; pointer-events: none; }
.popular-rank-badge.rank-2 { background: linear-gradient(145deg, #a8bac3, #536975); color: #f6fbfd; }
.popular-rank-badge.rank-3 { background: linear-gradient(145deg, #ca8a5e, #74452e); color: #fff1e6; }
.popular-rank-badge.rank-4, .popular-rank-badge.rank-5 { background: linear-gradient(145deg, #e94560, #9f3048); color: #ffe0e6; }
.player-count { border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(9, 17, 28, 0.78); color: #ffc0cb; backdrop-filter: blur(8px); }
.empty-state { border: 1px solid var(--surface-border); border-radius: 16px; background: #111b2a; color: var(--home-muted); }
.privacy-footer { border-color: rgba(169, 187, 211, 0.1); background: #101927; }
.privacy-footer a { color: var(--home-accent); }
.mobile-bottom-nav { border-top-color: rgba(169, 187, 211, 0.1); background: rgba(10, 16, 27, 0.96); }
.mobile-bottom-nav .active, .mobile-bottom-nav [aria-expanded="true"] { color: var(--home-accent-strong); background: rgba(233, 69, 96, 0.1); }
.info-fab { color: var(--home-accent-strong); border-color: rgba(233, 69, 96, 0.35); }

@media (max-width: 768px) {
    .container { gap: 0; padding: 0 12px; }
    .header { min-height: 64px; padding: 7px 14px; background: rgba(10, 16, 27, 0.97); }
    .logo-header-row h1 { font-size: 1.42rem; }
    .sidebar { width: 100%; flex-basis: auto; min-height: auto; max-height: none; position: static; top: auto; padding: 11px 10px 5px; overflow: visible; border-radius: 14px; }
    body.home-shell-view .sidebar { top: auto; margin-top: 0; padding-top: 11px; }
    body.home-shell-view .sidebar h3 { margin: 0 8px 7px; }
    .sidebar-list { gap: 6px; }
    .sidebar-list button { min-height: 38px; padding: 7px 10px; font-size: 0.83rem; }
    .main-content { padding: 10px 0 24px; }
    .home-hero { min-height: 0; gap: 12px; margin-bottom: 25px; padding: 14px 16px; border-radius: 19px; }
    .home-hero-description { max-width: 410px; margin: 10px 0 16px; font-size: 0.9rem; }
    .home-hero-art { width: clamp(82px, 20vw, 130px); margin-right: 4px; border-radius: 26px; }
    .home-hero.has-slideshow { align-items: stretch; }
    .home-hero.has-slideshow .home-hero-art { width: clamp(125px, 29vw, 190px); min-height: 170px; aspect-ratio: auto; flex: 0 0 clamp(125px, 29vw, 190px); border-radius: 17px; }
    .home-hero.has-slideshow { min-height: 214px; }
    .home-hero.has-slideshow .home-hero-copy { max-width: none; }
    .home-hero.has-slideshow .home-hero-art { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); }
    .home-hero-slide-copy { right: 10px; bottom: 43px; left: 11px; }
    .home-hero-slide-title { font-size: 0.95rem; }
    .home-hero-slide-plays { font-size: 0.67rem; }
    .home-hero-note { font-size: 0.75rem; }
    .section-title { margin-bottom: 14px; }
    .games-grid { gap: 10px; row-gap: 18px; }
    .section-games-grid { gap: 10px; }
    .new-games-track .game-card, .section-games-grid .game-card { flex-basis: clamp(132px, 39vw, 164px); }
    .game-info, .game-card:hover .game-info, .game-card:focus-within .game-info { min-height: 58px; padding: 20px 9px 9px; }
    .game-title, .game-card:hover .game-title, .game-card:focus-within .game-title { font-size: 0.86rem; }
    .game-card:hover .game-info, .game-card:focus-within .game-info { min-height: 0; padding: 16px 9px; }
    .game-card:hover .game-title, .game-card:focus-within .game-title { font-size: 0.92rem; }
    .game-card:hover .game-button, .game-card:focus-within .game-button { min-width: 98px; min-height: 35px; padding: 7px 12px; font-size: 0.78rem; }
}

@media (max-width: 420px) {
    .container { padding-right: 9px; padding-left: 9px; }
    .home-hero { min-height: 0; padding: 12px 14px; }
    .home-hero h1 { font-size: 1.9rem; }
    .home-hero:not(.has-slideshow) .home-hero-art { width: 62px; margin-right: 0; border-radius: 18px; }
    .home-hero:not(.has-slideshow) .home-hero-art svg { width: 58%; height: 58%; }
    .home-hero.has-slideshow { flex-direction: column; align-items: stretch; gap: 18px; }
    .home-hero.has-slideshow { min-height: 0; }
    .home-hero.has-slideshow .home-hero-art { width: 100%; min-height: 192px; max-height: 230px; flex-basis: 192px; aspect-ratio: auto; }
    .home-hero.has-slideshow .home-hero-slide-title { font-size: 1.15rem; }
    .home-browse-button { min-height: 41px; padding: 0 12px; font-size: 0.82rem; }
    .home-hero-actions { gap: 9px; }
    .home-hero-note { font-size: 0.68rem; }
}

@media (hover: none) {
    .game-card:hover, .game-card:focus-within { transform: none; }
    .game-card:hover .game-thumbnail img { transform: none; }
    .game-card .game-info { justify-content: space-between; }
    .game-card .game-button { display: inline-flex; width: auto; min-height: 28px; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 999px; background: rgba(233, 69, 96, 0.92); color: #fff; font-size: 0.68rem; font-weight: 800; }
}

@media (prefers-reduced-motion: reduce) {
    .game-card:hover .game-thumbnail img { transform: none; }
}

/* ===== Refresh layer: same palette, smoother and lighter ===== */
:root {
    --radius-card: 16px;
    --radius-control: 12px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 8px 20px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 32px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(233, 69, 96, 0.32);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(233, 69, 96, 0.38); color: #fff; }
img { max-width: 100%; }

/* Quiet, themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(169, 187, 211, 0.28) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(169, 187, 211, 0.28); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(233, 69, 96, 0.55); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Header */
.header { background: #0a101b; box-shadow: 0 1px 0 rgba(169, 187, 211, 0.08), 0 10px 30px rgba(0, 0, 0, 0.22); }
.shell-nav-btn { border-radius: 10px; transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; }

/* Sidebar */
.sidebar-list button { transition: background 0.18s ease, color 0.18s ease; }

/* Game cards: no per-card blur or entrance animation, lighter paint cost */
.game-card {
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    background: #131d2c;
    animation: none !important;
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
}
.game-card:hover, .game-card:focus-within { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); border-color: rgba(233, 69, 96, 0.4); }
.game-card:active { transform: translateY(-1px) scale(0.995); }
.game-thumbnail img { transition: transform 0.4s var(--ease-out); }
.game-card:hover .game-thumbnail img, .game-card:focus-within .game-thumbnail img { transform: scale(1.06); }
.game-info {
    background: linear-gradient(180deg, transparent 0%, rgba(6, 11, 20, 0.78) 55%, rgba(6, 11, 20, 0.96) 100%);
    transition: background 0.22s ease;
}
.game-badge, .player-count, .game-play-overlay span, .cookie-consent, .header, .incognito-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
.player-count { background: rgba(9, 15, 27, 0.86); }
.game-badge { background: rgba(11, 21, 31, 0.9); }
.game-play-overlay span { background: rgba(12, 24, 34, 0.88); }
.game-title { letter-spacing: -0.01em; }

/* Section headings */
.section-title { letter-spacing: -0.03em; }
.frequently-played-section > h3, .more-games-section > h3 { letter-spacing: -0.01em; }

/* Hero: more compact intro, softer shadow */
.home-hero { border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.home-hero.is-discord-intro { min-height: 0; padding: clamp(18px, 3vw, 30px) clamp(20px, 3.4vw, 40px); }
.home-hero-discord-copy h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.home-hero-discord-qr { width: 150px; flex-basis: 150px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28); }

/* Buttons */
.home-browse-button, .home-hero-discord-join, .home-discord-link, .incognito-action, .game-button { transition: transform 0.18s var(--ease-out), background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease; }

/* Cookie banner: compact corner card instead of a full-width bar covering the grid */
.cookie-consent { right: 20px; bottom: 20px; left: auto; width: min(430px, calc(100% - 40px)); margin: 0; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 18px; border-radius: 16px; }
.cookie-consent-actions { justify-content: flex-end; }
@media (max-width: 768px) {
    .cookie-consent { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; width: auto; }
}

/* Keep scroll position stable while images stream in */
.game-thumbnail { background-color: #182438; }
.game-thumbnail img { aspect-ratio: 1; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .game-card, .game-thumbnail img { transition: none; }
    .game-card:hover, .game-card:focus-within { transform: none; }
}

/* ===== Issues, report dialog, Surprise me ===== */
button.shell-nav-btn { font-family: inherit; }

.surprise-button, .home-surprise-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid rgba(169, 187, 211, 0.22); background: rgba(255, 255, 255, 0.05); color: #f3f6fa;
    font: inherit; font-weight: 750; cursor: pointer;
    transition: transform 0.18s var(--ease-out), background 0.18s ease, border-color 0.18s ease;
}
.surprise-button { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 0.86rem; white-space: nowrap; }
.home-surprise-button { min-height: 46px; padding: 0 17px; border-radius: 11px; font-size: 0.95rem; }
.surprise-button:hover, .home-surprise-button:hover { transform: translateY(-1px); border-color: rgba(233, 69, 96, 0.6); background: rgba(233, 69, 96, 0.14); }
.surprise-button svg, .home-surprise-button svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.header-utility-group { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1560px) { .surprise-button span { display: none; } .surprise-button { width: 40px; padding: 0; } }
@media (max-width: 768px) { .surprise-button { display: none; } }

.report-issue-button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-experience.ai-mode .report-issue-button { display: none; }

.issues-dialog {
    width: min(720px, calc(100vw - 28px)); max-height: min(86vh, 800px); margin: auto; padding: 0; overflow: hidden;
    border: 1px solid rgba(169, 187, 211, 0.18); border-radius: 18px; background: #101927; color: #f3f6fa;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.issues-dialog[open] { display: flex; flex-direction: column; }
.issues-dialog form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.issues-dialog::backdrop { background: rgba(5, 9, 17, 0.78); }
.issues-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid rgba(169, 187, 211, 0.12); }
.issues-header h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.issues-header p { margin: 4px 0 0; color: #a3afc1; font-size: 0.88rem; }
.issues-close { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid rgba(169, 187, 211, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: #f3f6fa; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.issues-close:hover { background: rgba(255, 255, 255, 0.1); }
.issues-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; }
.issues-toolbar select, .issues-admin-form input, .report-body textarea {
    min-height: 40px; padding: 8px 12px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 10px; background: #0b121e; color: #f3f6fa; font: inherit; font-size: 0.92rem;
}
.issues-count { color: #a3afc1; font-size: 0.85rem; }
.issues-body { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 22px 16px; }
.issues-message { padding: 22px 0; color: #a3afc1; text-align: center; }
.issues-message:empty { display: none; }
.issues-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.issue-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid rgba(169, 187, 211, 0.14); border-radius: 12px; background: #131d2c; }
.issue-main { min-width: 0; flex: 1; }
.issue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.issue-head strong { color: #ffe0e6; font-size: 0.95rem; }
.issue-head span { color: #8391a5; font-size: 0.78rem; }
.issue-main p { color: #d6deea; font-size: 0.92rem; line-height: 1.45; overflow-wrap: anywhere; }
.issue-actions { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 8px; }
.issue-thumb, .issue-delete {
    display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid rgba(169, 187, 211, 0.22);
    border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: #f3f6fa; font: inherit; font-size: 0.85rem; font-weight: 750; cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.issue-thumb:hover:not(:disabled) { border-color: rgba(233, 69, 96, 0.6); background: rgba(233, 69, 96, 0.14); }
.issue-thumb svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.issue-thumb[aria-pressed="true"] { border-color: rgba(233, 69, 96, 0.55); background: rgba(233, 69, 96, 0.2); color: #ffc0cb; cursor: default; }
.issue-thumb[aria-pressed="true"] svg { fill: currentColor; }
.issue-delete { border-color: rgba(255, 120, 120, 0.4); color: #ff9b9b; }
.issue-delete:hover:not(:disabled) { background: rgba(255, 120, 120, 0.14); }
.issue-thumb:disabled:not([aria-pressed="true"]), .issue-delete:disabled { opacity: 0.55; cursor: wait; }

.issues-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 22px 16px; border-top: 1px solid rgba(169, 187, 211, 0.12); }
.issues-admin-form { display: flex; flex: 1; gap: 8px; }
.issues-admin-form input { flex: 1; min-width: 0; }
.issues-admin-state { flex: 1; color: #ffd166; font-size: 0.85rem; }
.issues-admin-toggle, .issues-admin-form button, .issues-secondary, .issues-primary {
    min-height: 40px; padding: 0 16px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: #f3f6fa; font: inherit; font-size: 0.88rem; font-weight: 750; cursor: pointer;
}
.issues-admin-toggle { border-color: transparent; background: transparent; color: #8391a5; font-weight: 600; }
.issues-admin-toggle:hover { color: #f3f6fa; }
.issues-primary, .issues-admin-form button { border-color: transparent; background: var(--home-accent, #e94560); color: #fff; }
.issues-primary:hover:not(:disabled), .issues-admin-form button:hover { filter: brightness(1.1); }
.issues-primary:disabled { opacity: 0.6; cursor: wait; }

.report-dialog { width: min(560px, calc(100vw - 28px)); }
.report-body { display: grid; align-content: start; gap: 12px; padding-top: 16px; }
.report-existing { padding: 12px; border: 1px dashed rgba(233, 69, 96, 0.4); border-radius: 12px; background: rgba(233, 69, 96, 0.06); }
.report-existing[hidden] { display: none; }
.report-existing-title { margin-bottom: 10px; color: #ffc0cb; font-size: 0.86rem; font-weight: 700; }
.report-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.report-chips button { min-height: 34px; padding: 0 12px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: #d6deea; font: inherit; font-size: 0.82rem; cursor: pointer; }
.report-chips button:hover { border-color: rgba(233, 69, 96, 0.6); color: #fff; }
.report-label { font-size: 0.88rem; font-weight: 700; }
.report-body textarea { width: 100%; min-height: 110px; resize: vertical; line-height: 1.45; }
.report-meta { display: flex; justify-content: space-between; gap: 12px; color: #8391a5; font-size: 0.8rem; }
.report-meta #reportIssueStatus { color: #ffb4c0; }
.report-footer { justify-content: flex-end; }

.issues-toast { position: fixed; z-index: 7000; bottom: 24px; left: 50%; max-width: min(440px, calc(100vw - 32px)); padding: 12px 18px; transform: translateX(-50%); border: 1px solid rgba(233, 69, 96, 0.4); border-radius: 12px; background: #17233b; color: #f3f6fa; font-size: 0.9rem; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
.issues-toast[hidden] { display: none; }

@media (max-width: 560px) {
    .issues-header, .issues-toolbar, .issues-body, .issues-footer { padding-right: 14px; padding-left: 14px; }
    .issue-item { flex-direction: column; }
    .issue-actions { flex-direction: row; align-items: center; }
}

.issues-admin-form[hidden], .issues-admin-state[hidden] { display: none; }
.issues-admin-form { align-items: center; }
.issues-footer .issues-admin-toggle { margin-left: auto; }

/* Four buttons now live in the game bar, so keep their labels on one line. */
.game-toolbar-button span { white-space: nowrap; }
@media (min-width: 769px) {
    .game-toolbar { grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); gap: 12px; }
}

/* Static About/FAQ block on the home view */
.home-about { margin: 40px 0 8px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--surface-border); border-radius: 18px; background: #101927; }
.home-about h2 { margin: 0 0 12px; font-size: 1.5rem; letter-spacing: -0.02em; }
.home-about h3 { margin: 22px 0 10px; font-size: 1.05rem; }
.home-about p { margin: 0 0 12px; color: var(--home-muted, #a3afc1); line-height: 1.65; }
.home-about a { color: var(--home-accent-strong, #ff91a4); }
.home-about-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.home-faq details { margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--surface-border); border-radius: 12px; background: #131d2c; }
.home-faq summary { cursor: pointer; font-weight: 700; color: #f3f6fa; }
.home-faq details p { margin: 10px 0 0; }
.filtered-view .home-about { display: none; }

@media (min-width: 769px) and (max-width: 1440px) {
    .shell-nav-btn { padding-right: 10px; padding-left: 10px; font-size: 0.88rem; letter-spacing: 0.01em; }
    .topbar-nav, .nav-link-group { gap: 2px; }
}

/* ===== Footer ===== */
.privacy-footer { display: block; margin: 40px 0 16px; padding: 32px clamp(20px, 4vw, 40px) 20px; border: 1px solid var(--surface-border); border-radius: 18px; background: linear-gradient(180deg, #111b2b, #0d1624); color: #b9c8df; text-align: left; }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)); gap: 28px 40px; }
.footer-logo { display: block; margin-bottom: 8px; color: #f5f7fa; font-size: 1.35rem; letter-spacing: -0.03em; }
.footer-brand p { max-width: 320px; margin: 0 0 12px; color: #a3afc1; font-size: 0.92rem; line-height: 1.6; }
.privacy-footer .footer-email { color: #ff91a4; font-size: 0.92rem; font-weight: 600; }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer-column h2 { margin: 0 0 8px; color: #f3f6fa; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.privacy-footer .footer-column a { padding: 3px 0; color: #a3afc1; font-size: 0.93rem; text-decoration: none; transition: color 0.18s ease, transform 0.18s ease; }
.privacy-footer .footer-column a:hover { color: #fff; text-decoration: none; transform: translateX(2px); }
.privacy-footer a:focus-visible { border-radius: 4px; outline: 2px solid #ff91a4; outline-offset: 3px; }
.footer-legal { margin: 26px 0 0; padding: 18px 64px 0 0; border-top: 1px solid rgba(169, 187, 211, 0.12); color: #7f8da3; font-size: 0.82rem; }
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .privacy-footer { margin: 28px 0 8px; padding: 24px 18px 16px; font-size: 1rem; }
    .footer-grid { gap: 22px 16px; }
    .privacy-footer .footer-column a { padding: 6px 0; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-column:last-of-type { grid-column: 1 / -1; }
}

/* ===== Issues: solved state, admin actions, comments, notification badge ===== */
.issues-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.issues-badge { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; margin-left: 7px; padding: 0 5px; border-radius: 999px; background: #e94560; color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 1; letter-spacing: 0; box-shadow: 0 0 0 2px #0a101b; }
.issues-badge[hidden] { display: none; }
.mobile-more-menu .issues-badge { margin-left: 8px; box-shadow: none; }
.issues-dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: #e94560; box-shadow: 0 0 0 2px #0a101b; }
.issues-dot[hidden] { display: none; }
#mobileMoreButton { position: relative; }
.issue-tag { padding: 1px 8px; border-radius: 999px; font-size: 0.68rem !important; font-style: normal; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.issue-tag-solved { background: rgba(60, 190, 130, 0.18); color: #7be0b0 !important; }
.issue-tag-new { background: rgba(233, 69, 96, 0.2); color: #ff9db0 !important; }
.issue-item.is-solved { border-color: rgba(60, 190, 130, 0.28); }
.issue-item.is-solved .issue-main > p { color: #9fb0c3; }
.issue-comment { position: relative; margin-top: 10px; padding: 9px 36px 9px 12px; border-left: 3px solid #ffd166; border-radius: 0 10px 10px 0; background: rgba(255, 209, 102, 0.07); }
.issue-comment strong { color: #ffd166; font-size: 0.8rem; }
.issue-comment > span { margin-left: 8px; color: #8391a5; font-size: 0.75rem; }
.issue-comment p { margin: 3px 0 0; font-size: 0.9rem; }
.issue-comment-delete { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: #ff9b9b; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.issue-comment-delete:hover:not(:disabled) { background: rgba(255, 120, 120, 0.14); }
.issue-comment-form { display: flex !important; flex-direction: row !important; align-items: flex-end; gap: 8px; margin-top: 10px; }
.issue-comment-form textarea { flex: 1; min-width: 0; resize: vertical; padding: 9px 11px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 10px; background: #0d1624; color: #f3f6fa; font: inherit; font-size: 0.9rem; }
.issue-comment-form button, .issue-admin-action { min-height: 36px; padding: 0 12px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: #f3f6fa; font: inherit; font-size: 0.85rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.issue-comment-form button { border-color: transparent; background: var(--home-accent, #e94560); }
.issue-admin-action:hover:not(:disabled) { border-color: rgba(60, 190, 130, 0.6); background: rgba(60, 190, 130, 0.14); }
.issue-admin-action:disabled, .issue-comment-form button:disabled { opacity: 0.55; cursor: wait; }
.issue-actions { min-width: 112px; }
@media (max-width: 768px) {
    .issue-actions { min-width: 0; flex-wrap: wrap; }
    .issue-comment-form { flex-direction: column !important; align-items: stretch; }
}

/* ===== Issues: full-size modal ===== */
.issues-modal { width: min(1120px, calc(100vw - 32px)); height: min(92vh, 940px); max-height: none; border-radius: 22px; border-color: rgba(169, 187, 211, 0.16); background: linear-gradient(180deg, #131f31 0%, #0d1522 100%); }
.issues-modal .issues-header { align-items: center; padding: 26px 30px 18px; border-bottom: 0; }
.issues-heading { display: flex; min-width: 0; align-items: center; gap: 16px; }
.issues-heading-icon { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 16px; background: linear-gradient(145deg, #ff6b86, #c42c4a); color: #fff; box-shadow: 0 10px 24px rgba(233, 69, 96, 0.3); }
.issues-heading-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.issues-modal .issues-header h2 { font-size: 1.7rem; }
.issues-modal .issues-header p { max-width: 560px; font-size: 0.93rem; line-height: 1.45; }
.issues-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 30px 18px; }
.issues-stat { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border: 1px solid rgba(169, 187, 211, 0.12); border-radius: 14px; background: rgba(255, 255, 255, 0.035); }
.issues-stat strong { color: #fff; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.issues-stat span { color: #a3afc1; font-size: 0.85rem; font-weight: 650; }
.issues-stat:first-child strong { color: #ff8fa3; }
.issues-stat-solved strong { color: #6fe0ac; }
.issues-modal .issues-toolbar { flex-wrap: wrap; padding: 4px 30px 14px; border-bottom: 1px solid rgba(169, 187, 211, 0.1); }
.issues-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(169, 187, 211, 0.12); border-radius: 999px; background: rgba(0, 0, 0, 0.22); }
.issues-tabs button { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: #a3afc1; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: background 0.18s ease, color 0.18s ease; }
.issues-tabs button:hover { color: #fff; }
.issues-tabs button span { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.75rem; text-align: center; }
.issues-tabs button[aria-selected="true"] { background: #e94560; color: #fff; box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35); }
.issues-tabs button[aria-selected="true"] span { background: rgba(255, 255, 255, 0.22); }
.issues-modal .issues-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.issues-search { position: relative; display: block; }
.issues-search svg { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: #8391a5; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.issues-search input { width: 230px; min-height: 40px; padding: 8px 12px 8px 36px; border: 1px solid rgba(169, 187, 211, 0.22); border-radius: 999px; background: #0b121e; color: #f3f6fa; font: inherit; font-size: 0.92rem; }
.issues-modal .issues-toolbar select { border-radius: 999px; }
.issues-search input:focus, .issues-modal .issues-toolbar select:focus { border-color: #e94560; outline: none; box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.18); }
.issues-modal .issues-body { padding: 18px 30px 24px; }
.issues-modal .issues-list { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); align-items: start; gap: 14px; }
.issues-modal .issues-message { padding: 56px 0; font-size: 1rem; }
.issues-modal .issue-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); transition: border-color 0.18s ease, background 0.18s ease; }
.issues-modal .issue-item:hover { border-color: rgba(169, 187, 211, 0.28); background: rgba(255, 255, 255, 0.05); }
.issues-modal .issue-item.is-solved { border-color: rgba(60, 190, 130, 0.3); background: linear-gradient(135deg, rgba(60, 190, 130, 0.07), rgba(255, 255, 255, 0.025)); }
.issue-art { display: grid; width: 56px; height: 56px; place-items: center; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg, #243652, #16233a); color: #ffc0cb; font-size: 1.4rem; font-weight: 800; }
.issue-art img { width: 100%; height: 100%; object-fit: cover; }
.issues-modal .issue-head strong { font-size: 1.02rem; }
.issues-modal .issue-main > p { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.5; }
.issues-modal .issue-actions { min-width: 0; }
.issue-admin-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(169, 187, 211, 0.16); }
.issue-admin-action.is-solve { border-color: rgba(60, 190, 130, 0.45); color: #7be0b0; }
.issue-admin-action.is-reopen { border-color: rgba(255, 209, 102, 0.45); color: #ffd166; }
.issue-admin-row .issue-delete { min-height: 36px; }
.issues-modal .issues-footer { padding: 14px 30px 18px; background: rgba(0, 0, 0, 0.18); }
@media (max-width: 900px) {
    .issues-modal .issues-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .issues-modal { width: 100vw; height: 100dvh; max-width: none; margin: 0; border: 0; border-radius: 0; }
    .issues-modal .issues-header { padding: 18px 16px 12px; }
    .issues-heading-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
    .issues-modal .issues-header h2 { font-size: 1.35rem; }
    .issues-modal .issues-header p { font-size: 0.82rem; }
    .issues-summary { gap: 8px; padding: 0 16px 12px; }
    .issues-stat { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; }
    .issues-stat strong { font-size: 1.35rem; }
    .issues-modal .issues-toolbar { padding: 4px 16px 12px; }
    .issues-tabs { width: 100%; }
    .issues-tabs button { flex: 1; justify-content: center; padding: 0 8px; }
    .issues-modal .issues-filters { width: 100%; }
    .issues-search { flex: 1 1 140px; }
    .issues-search input { width: 100%; }
    .issues-modal .issues-toolbar select { flex: 1 1 130px; }
    .issues-modal .issues-body { padding: 14px 16px 20px; }
    .issues-modal .issue-item { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
    .issue-art { width: 44px; height: 44px; border-radius: 12px; font-size: 1.15rem; }
    .issues-modal .issue-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; }
    .issues-modal .issues-footer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}
