/* Hidden games overlay */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden-games-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #080b12;
    color: #f8fafc;
}

.hidden-games-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden-games-header {
    min-height: 76px;
    padding: 14px clamp(14px, 3vw, 28px);
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 420px) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(8, 11, 18, 0.96);
}

.hidden-games-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hidden-games-heading h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.hidden-games-heading p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.hidden-games-sidebar-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 0;
    background: #141b29;
    color: #d5dfec;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04), 0 12px 24px rgba(2, 6, 23, 0.22);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.hidden-games-sidebar-toggle:hover {
    border-color: rgba(82, 142, 255, 0.42);
    background: #182234;
    color: #f8fafc;
}

.hidden-games-sidebar-toggle:active {
    transform: translateY(1px);
}

.hidden-games-sidebar-toggle:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-games-sidebar-toggle.is-collapsed {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(82, 142, 255, 0.5);
}

.hidden-games-search input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 8px;
    padding: 0 14px;
    background: #111827;
    color: #f8fafc;
    font: inherit;
}

.hidden-games-search input:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-games-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.hidden-games-back,
.hidden-games-fullscreen,
.hidden-games-exit {
    height: 42px;
    border: 1px solid rgba(248, 250, 252, 0.2);
    border-radius: 8px;
    padding: 0 16px;
    background: #1f2937;
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.hidden-games-fullscreen {
    width: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    background: #32117b;
    border-color: rgba(99, 102, 241, 0.48);
}

.hidden-games-fullscreen svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: #ffffff;
}

.hidden-games-fullscreen.is-active {
    background: #4f46e5;
    border-color: rgba(165, 180, 252, 0.72);
}

.hidden-games-exit {
    background: #b91c1c;
    border-color: #ef4444;
}

.hidden-games-back:hover,
.hidden-games-fullscreen:hover,
.hidden-games-exit:hover {
    filter: brightness(1.08);
}

.hidden-games-back:active,
.hidden-games-fullscreen:active,
.hidden-games-exit:active {
    transform: translateY(1px);
}

.hidden-games-back:focus-visible,
.hidden-games-fullscreen:focus-visible,
.hidden-games-exit:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-games-overlay.is-player .hidden-games-header {
    min-height: 68px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px clamp(16px, 2vw, 24px);
}

.hidden-games-overlay.is-player .hidden-games-heading {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.hidden-games-overlay.is-player .hidden-games-heading h2 {
    font-size: 1.12rem;
    opacity: 0.55;
}

.hidden-games-overlay.is-player .hidden-games-heading p {
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.82;
}

.hidden-games-overlay.is-player .hidden-games-search,
.hidden-games-overlay.is-player .hidden-games-sidebar-toggle {
    display: none;
}

.hidden-games-overlay.is-player .hidden-games-back {
    grid-column: 1;
    grid-row: 1;
}

.hidden-games-overlay.is-player .hidden-games-actions {
    grid-column: 3;
    grid-row: 1;
}

.hidden-games-overlay.is-player .hidden-games-back,
.hidden-games-overlay.is-player .hidden-games-exit {
    width: auto;
    min-width: 76px;
    max-width: 120px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: #4f46e5;
    box-shadow: 0 10px 24px rgba(30, 27, 75, 0.38);
}

.hidden-games-overlay.is-player .hidden-games-fullscreen {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: #33117a;
    box-shadow: 0 10px 24px rgba(30, 27, 75, 0.38);
}

.hidden-games-overlay.is-player .hidden-games-fullscreen:hover {
    background: #4622a7;
}

.hidden-games-overlay.is-player .hidden-games-fullscreen.is-active {
    background: #4f46e5;
}

.hidden-games-overlay.is-player .hidden-games-exit {
    min-width: 64px;
    max-width: 72px;
    background: #4338ca;
}

.hidden-games-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 clamp(18px, 3vw, 32px) clamp(18px, 3vw, 32px) 0;
    scrollbar-gutter: stable;
}

.hidden-games-main::-webkit-scrollbar {
    width: 10px;
}

.hidden-games-main::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

.hidden-games-main::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.55);
    border: 2px solid rgba(15, 23, 42, 0.8);
    border-radius: 999px;
}

.hidden-games-main::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.85);
}

.hidden-games-lobby {
    min-height: 100%;
}

.hidden-games-content {
    position: relative;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 0;
    align-items: start;
    min-height: 100%;
    transition: grid-template-columns 0.2s ease, gap 0.2s ease;
}

.hidden-games-content.is-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-left: clamp(18px, 3vw, 32px);
}

.hidden-games-sidebar {
    position: sticky;
    top: 0;
    grid-column: 1;
    grid-row: 1;
    min-height: calc(100vh - 76px - clamp(18px, 3vw, 32px));
    width: 232px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(30, 41, 59, 0.92);
    border-left: 0;
    border-top: 0;
    border-radius: 0;
    padding: 22px 10px 18px 4px;
    background: #0b1220;
    box-shadow: 18px 0 36px rgba(2, 6, 23, 0.24);
    transition: width 0.2s ease, transform 0.2s ease, opacity 0.16s ease, padding 0.2s ease, border-color 0.2s ease;
}

.hidden-games-content.is-sidebar-collapsed .hidden-games-sidebar {
    width: 0;
    padding-right: 0;
    padding-left: 0;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    border-color: transparent;
}

.hidden-games-nav {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0;
}

.hidden-games-nav-divider {
    height: 1px;
    margin: 12px 8px 14px 0;
    background: rgba(46, 60, 82, 0.78);
}

.hidden-games-nav-section {
    padding: 0 12px 10px;
    color: #758197;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hidden-games-nav-item {
    --hidden-games-nav-accent: #38bdf8;
    width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    position: relative;
    border: 1px solid rgba(30, 41, 59, 0.52);
    border-left-color: transparent;
    border-radius: 8px;
    margin: 0 0 1px;
    padding: 6px 12px;
    background: transparent;
    color: #cfd6e3;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.03);
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.hidden-games-nav-item:hover {
    border-color: rgba(45, 61, 84, 0.82);
    border-left-color: transparent;
    background: #10192a;
    color: #f8fafc;
}

.hidden-games-nav-item:active {
    transform: translateY(1px);
}

.hidden-games-nav-item:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-games-nav-item.is-active {
    border-color: rgba(30, 65, 118, 0.92);
    border-left-color: transparent;
    background: #102545;
    color: #31a9ff;
    box-shadow: inset 3px 0 0 var(--hidden-games-nav-accent), inset 0 -1px 0 rgba(148, 163, 184, 0.04);
}

.hidden-games-nav-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    color: var(--hidden-games-nav-accent);
}

.hidden-games-nav-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.hidden-games-nav-item:hover .hidden-games-nav-icon,
.hidden-games-nav-item.is-active .hidden-games-nav-icon {
    color: var(--hidden-games-nav-accent);
}

.hidden-games-nav-item[data-filter="all"] {
    --hidden-games-nav-accent: #8b5cf6;
}

.hidden-games-nav-item[data-filter="favorites"] {
    --hidden-games-nav-accent: #ff477e;
}

.hidden-games-nav-item[data-filter="recent"] {
    --hidden-games-nav-accent: #38bdf8;
}

.hidden-games-nav-item[data-filter="action"] {
    --hidden-games-nav-accent: #f43f5e;
}

.hidden-games-nav-item[data-filter="arcade"] {
    --hidden-games-nav-accent: #f97316;
}

.hidden-games-nav-item[data-filter="puzzle"] {
    --hidden-games-nav-accent: #a855f7;
}

.hidden-games-nav-item[data-filter="sports"] {
    --hidden-games-nav-accent: #22c55e;
}

.hidden-games-nav-item[data-filter="racing"] {
    --hidden-games-nav-accent: #ef4444;
}

.hidden-games-nav-item[data-filter="shooter"] {
    --hidden-games-nav-accent: #3b82f6;
}

.hidden-games-nav-item[data-filter="casual"] {
    --hidden-games-nav-accent: #06b6d4;
}

.hidden-games-nav-item[data-filter="horror"] {
    --hidden-games-nav-accent: #ec4899;
}

.hidden-games-nav-item[data-filter="multiplayer"] {
    --hidden-games-nav-accent: #fb923c;
}

.hidden-games-nav-item[data-filter="adventure"] {
    --hidden-games-nav-accent: #0ea5e9;
}

.hidden-games-nav-item[data-filter="idle"] {
    --hidden-games-nav-accent: #eab308;
}

.hidden-games-nav-item[data-filter="io"] {
    --hidden-games-nav-accent: #14b8a6;
}

.hidden-games-nav-item[data-filter="platformer"] {
    --hidden-games-nav-accent: #7c3aed;
}

.hidden-games-nav-item[data-filter="strategy"] {
    --hidden-games-nav-accent: #84cc16;
}

.hidden-games-nav-item[data-filter="open-world"] {
    --hidden-games-nav-accent: #2dd4bf;
}

.hidden-games-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden-games-nav-count {
    min-width: 24px;
    justify-self: end;
    border-radius: 999px;
    padding: 1px 6px;
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.hidden-games-nav-item:hover .hidden-games-nav-count,
.hidden-games-nav-item.is-active .hidden-games-nav-count {
    background: rgba(56, 189, 248, 0.18);
    color: #bae6fd;
}

.hidden-games-lobby-body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.hidden-games-content.is-sidebar-collapsed .hidden-games-lobby-body {
    grid-column: 1;
}

.hidden-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

.hidden-game-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0;
    background: #111827;
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.18);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hidden-game-card:hover,
.hidden-game-card:focus-visible {
    transform: translateY(-3px);
    border-color: #38bdf8;
    background: #162033;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

.hidden-game-card:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-game-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.86rem;
}

.hidden-game-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hidden-game-media span {
    padding: 10px;
    text-align: center;
}

.hidden-game-favorite {
    position: absolute;
    top: auto;
    bottom: 12px;
    right: 10px;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(248, 250, 252, 0.32);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
    color: #f8fafc;
    font: inherit;
    font-size: 1.08rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.hidden-game-favorite:hover {
    border-color: rgba(56, 189, 248, 0.75);
    background: rgba(15, 23, 42, 0.92);
    color: #7dd3fc;
}

.hidden-game-favorite:active {
    transform: scale(0.96);
}

.hidden-game-favorite:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.hidden-game-favorite.is-favorite {
    border-color: rgba(56, 189, 248, 0.75);
    background: rgba(14, 116, 144, 0.84);
    color: #e0f2fe;
}

.hidden-game-title,
.hidden-game-code {
    display: block;
    padding: 10px 12px 0;
}

.hidden-game-title {
    min-height: 58px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.28;
}

.hidden-game-code {
    padding-top: 4px;
    padding-bottom: 14px;
    padding-right: 56px;
    color: #38bdf8;
    font-size: 0.98rem;
    font-weight: 700;
}

.hidden-games-empty,
.hidden-games-error {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    padding: 18px;
    background: #111827;
    color: #cbd5e1;
}

.hidden-games-empty {
    display: grid;
    gap: 8px;
}

.hidden-games-empty strong {
    color: #f8fafc;
}

.hidden-games-empty span {
    color: #94a3b8;
}

.hidden-games-error {
    margin-bottom: 14px;
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.hidden-games-player {
    height: calc(100vh - 76px - clamp(28px, 6vw, 56px));
    min-height: 360px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    overflow: hidden;
    background: #020617;
}

.hidden-games-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #020617;
}

.hidden-games-overlay.is-player .hidden-games-main {
    padding: 0;
    overflow: hidden;
    scrollbar-gutter: auto;
}

.hidden-games-overlay.is-player .hidden-games-player {
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.hidden-games-play-layout {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 208px;
    background: #020617;
}

.hidden-games-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    border-left: 1px solid rgba(79, 70, 229, 0.3);
    border-right: 1px solid rgba(79, 70, 229, 0.3);
    background: #000;
}

.hidden-games-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.hidden-games-stage.is-preparing-frame iframe {
    opacity: 0;
}

.hidden-games-frame-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #000;
    color: #e5eefb;
    text-align: center;
    opacity: 1;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.hidden-games-frame-loading.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.hidden-games-frame-loading-panel {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.hidden-games-frame-loading-panel::before {
    content: '';
    width: 34px;
    height: 34px;
    border: 3px solid rgba(148, 163, 184, 0.24);
    border-top-color: #38bdf8;
    border-radius: 999px;
    animation: hidden-games-frame-spin 900ms linear infinite;
}

.hidden-games-frame-loading strong {
    color: #f8fafc;
    font-size: 1rem;
}

.hidden-games-frame-loading span {
    color: #94a3b8;
    font-size: 0.9rem;
}

@keyframes hidden-games-frame-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hidden-games-frame-loading,
    .hidden-games-frame-loading-panel::before {
        animation: none;
        transition: none;
    }
}

.hidden-games-stage:fullscreen,
.hidden-games-stage:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border: 0;
    background: #000;
}

.hidden-games-stage:fullscreen iframe,
.hidden-games-stage:-webkit-full-screen iframe {
    width: 100%;
    height: 100%;
}

.hidden-games-side-rail {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0b1224;
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.8) rgba(15, 23, 42, 0.8);
}

.hidden-games-side-rail::-webkit-scrollbar {
    width: 8px;
}

.hidden-games-side-rail::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

.hidden-games-side-rail::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.85);
    border-radius: 999px;
}

.hidden-games-rail-card {
    display: block;
    width: 100%;
    min-height: 218px;
    padding: 0;
    border: 1px solid rgba(99, 102, 241, 0.34);
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
    color: #cbd5e1;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.24);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hidden-games-rail-card:hover,
.hidden-games-rail-card:focus-visible {
    transform: translateY(-2px);
    border-color: #60a5fa;
    background: #172033;
}

.hidden-games-rail-card:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.hidden-games-rail-media {
    display: block;
    width: 100%;
    height: 164px;
    background: #0f172a;
    overflow: hidden;
}

.hidden-games-rail-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hidden-games-rail-title {
    display: block;
    padding: 10px 12px 12px;
    min-height: 42px;
    font-size: 0.82rem;
    line-height: 1.25;
}

.hidden-games-mobile-backdrop {
    display: none;
}

@media (max-width: 980px) {
    .hidden-games-content {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 0;
    }

    .hidden-games-content.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .hidden-games-content.is-sidebar-collapsed .hidden-games-lobby-body {
        grid-column: 1;
    }

    .hidden-games-sidebar {
        width: 220px;
    }

    .hidden-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }

    .hidden-games-play-layout {
        grid-template-columns: 1fr;
    }

    .hidden-games-side-rail {
        display: none;
    }

    .hidden-games-overlay.is-player .hidden-games-heading p {
        max-width: 42vw;
    }
}

@media (max-width: 720px) {
    .hidden-games-header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .hidden-games-heading {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .hidden-games-title-row {
        gap: 8px;
    }

    .hidden-games-sidebar-toggle {
        width: 36px;
        height: 36px;
    }

    .hidden-games-title-row h2 {
        min-width: 0;
    }

    .hidden-games-heading h2,
    .hidden-games-heading p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hidden-games-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .hidden-games-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .hidden-games-main {
        padding: 0 14px 14px;
    }

    .hidden-games-content,
    .hidden-games-content.is-sidebar-collapsed {
        display: block;
        min-height: 0;
        padding-left: 0;
    }

    .hidden-games-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 4;
        width: min(84vw, 232px);
        min-height: 100vh;
        border-radius: 0;
        padding: 20px 10px 18px 4px;
        transform: translateX(-105%);
        opacity: 1;
        pointer-events: auto;
        overflow-y: auto;
        transition: transform 0.2s ease;
    }

    .hidden-games-content.is-sidebar-collapsed .hidden-games-sidebar {
        width: min(84vw, 232px);
        padding: 20px 10px 18px 4px;
        transform: translateX(-105%);
        opacity: 1;
        pointer-events: auto;
        border-color: rgba(30, 41, 59, 0.92);
    }

    .hidden-games-overlay.is-mobile-menu-open .hidden-games-sidebar {
        transform: translateX(0);
    }

    .hidden-games-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 3;
        display: none;
        background: rgba(2, 6, 23, 0.58);
    }

    .hidden-games-overlay.is-mobile-menu-open .hidden-games-mobile-backdrop {
        display: block;
    }

    .hidden-games-lobby-body {
        grid-column: auto;
    }

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

    .hidden-game-title {
        min-height: 56px;
        font-size: 0.94rem;
    }

    .hidden-games-player {
        height: calc(100vh - 130px - 28px);
        min-height: 300px;
    }
}


/* Game start gate: the iframe keeps loading behind this intentional pre-play screen. */
.hidden-games-start-gate {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(20px, 4vw, 64px);
    background:
        radial-gradient(circle at 18% 84%, rgba(59, 130, 246, 0.28), transparent 36%),
        radial-gradient(circle at 84% 18%, rgba(168, 85, 247, 0.24), transparent 36%),
        rgba(2, 6, 23, 0.96);
    color: #f8fafc;
    opacity: 1;
    transform: scale(1);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.hidden-games-start-gate::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hidden-games-start-gate::after {
    width: min(56vw, 720px);
    height: min(56vw, 720px);
    right: -21%;
    top: -38%;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.18);
    filter: blur(24px);
}

.hidden-games-start-gate.is-leaving {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: scale(1.02);
}

.hidden-games-start-gate-content {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.72fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid rgba(129, 140, 248, 0.42);
    border-radius: 24px;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hidden-games-start-gate-copy {
    display: grid;
    justify-items: start;
    gap: 16px;
}

.hidden-games-start-gate-eyebrow {
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hidden-games-start-gate h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4.2vw, 3.85rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.hidden-games-start-gate p {
    max-width: 500px;
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.6;
}

.hidden-games-start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    margin-top: 10px;
    padding: 0 27px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.34);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.hidden-games-start-button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 16px 36px rgba(79, 70, 229, 0.44);
}

.hidden-games-start-button:active:not(:disabled) {
    transform: translateY(0);
}

.hidden-games-start-button:focus-visible {
    outline: 3px solid #fef08a;
    outline-offset: 3px;
}

.hidden-games-start-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.hidden-games-start-button-icon {
    font-size: 0.94em;
}

.hidden-games-start-gate-note {
    color: #94a3b8;
    font-size: 0.86rem;
}

.hidden-games-start-artwork {
    position: relative;
    width: min(100%, 330px);
    aspect-ratio: 0.8;
    justify-self: center;
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
}

.hidden-games-start-artwork-card,
.hidden-games-start-artwork-cover {
    position: absolute;
    inset: 5% 7%;
    overflow: hidden;
    border-radius: 18px;
}

.hidden-games-start-artwork-card {
    border: 2px solid rgba(196, 181, 253, 0.55);
    background: linear-gradient(140deg, #312e81, #0f172a);
}

.hidden-games-start-artwork-card-back {
    transform: rotate(10deg) translate(12%, 2%);
}

.hidden-games-start-artwork-card-mid {
    transform: rotate(-7deg) translate(-8%, 3%);
    border-color: rgba(125, 211, 252, 0.52);
    background: linear-gradient(140deg, #0c4a6e, #1e1b4b);
}

.hidden-games-start-artwork-cover {
    z-index: 1;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.58);
    background: linear-gradient(135deg, #1e293b, #312e81);
    transform: rotate(2deg);
}

.hidden-games-start-artwork-cover img,
.hidden-games-start-artwork-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hidden-games-start-artwork-cover img {
    z-index: 1;
    display: block;
    object-fit: cover;
}

.hidden-games-start-artwork-fallback {
    display: grid;
    place-items: center;
    padding: 22px;
    color: #fff;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    background: linear-gradient(135deg, #4f46e5, #0f172a);
}

@media (max-width: 720px) {
    .hidden-games-start-gate {
        align-items: start;
        overflow-y: auto;
        padding: 18px;
    }

    .hidden-games-start-gate-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 30px 24px;
        border-radius: 20px;
    }

    .hidden-games-start-gate-copy {
        gap: 13px;
    }

    .hidden-games-start-artwork {
        width: min(62vw, 245px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hidden-games-start-gate,
    .hidden-games-start-button {
        transition: none;
    }
}
