:root {
    --bg: #07111f;
    --bg-soft: #0f1c34;
    --panel: rgba(10, 20, 40, 0.78);
    --panel-border: rgba(130, 110, 255, 0.2);
    --text: #f4f6ff;
    --text-soft: #b6c3e3;
    --blue: #2997ff;
    --purple: #8d5bff;
    --gold: #f8c14f;
    --green: #3ed598;
    --red: #ff647c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --radius-sm: 18px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(41, 151, 255, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(141, 91, 255, 0.22), transparent 32%),
        radial-gradient(circle at bottom center, rgba(248, 193, 79, 0.16), transparent 22%),
        linear-gradient(180deg, #020712 0%, #07111f 45%, #0b1730 100%);
}

body.has-mobile-panel {
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.24;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: 2rem;
    right: -8rem;
    background: rgba(41, 151, 255, 0.36);
}

body::after {
    bottom: -9rem;
    left: -8rem;
    background: rgba(141, 91, 255, 0.28);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 1.5rem));
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.page-shell--center {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.glass-panel,
.hero-card {
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(14, 27, 52, 0.88), rgba(7, 15, 30, 0.82));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.hero-card {
    max-width: 760px;
    padding: 2rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 10%, rgba(248, 193, 79, 0.06) 50%, transparent 90%);
    pointer-events: none;
}

.hero-card__badge,
.level-chip,
.answer-card__prefix,
.eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-card__badge,
.level-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(141, 91, 255, 0.18);
    border: 1px solid rgba(141, 91, 255, 0.3);
    color: #efe9ff;
    font-size: 0.74rem;
}

.level-chip--soft {
    background: rgba(41, 151, 255, 0.14);
    border-color: rgba(41, 151, 255, 0.24);
}

.hero-card__title,
h1,
h2,
h3 {
    font-family: "Trebuchet MS", "Bahnschrift", sans-serif;
    margin: 0;
}

.hero-card__title {
    margin-top: 1rem;
    font-size: clamp(2rem, 6vw, 3.3rem);
    line-height: 1.05;
}

.hero-card__subtitle {
    margin: 1rem 0 1.4rem;
    max-width: 56ch;
    color: var(--text-soft);
    line-height: 1.7;
}

.feature-marquee {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.feature-marquee span,
.user-pill,
.stat-box,
.mini-callout,
.player-card,
.topup-card,
.rank-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-marquee span {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.glass-panel {
    border-radius: var(--radius);
    padding: 1.2rem;
}

.form-stack,
.info-stack,
.list-stack {
    display: grid;
    gap: 0.9rem;
}

.field-group {
    display: grid;
    gap: 0.45rem;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.field-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 3.1rem;
    color-scheme: dark;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(244, 246, 255, 0.92) 50%),
        linear-gradient(135deg, rgba(244, 246, 255, 0.92) 50%, transparent 50%);
    background-position:
        calc(100% - 1.35rem) calc(50% - 0.12rem),
        calc(100% - 0.95rem) calc(50% - 0.12rem);
    background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
    background-repeat: no-repeat;
}

.field-group select option {
    color: #10192d;
    background: #f4f7ff;
}

.field-group input:focus,
.field-group select:focus {
    border-color: rgba(41, 151, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.14);
    transform: translateY(-1px);
}

.hint-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #1d7aff, #814dff);
    box-shadow: 0 12px 28px rgba(37, 106, 255, 0.32);
}

.btn--secondary {
    color: #eff4ff;
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.22), rgba(141, 91, 255, 0.2));
    border: 1px solid rgba(138, 174, 255, 0.28);
}

.btn--gold {
    color: #241705;
    background: linear-gradient(135deg, #ffd36f, #f8c14f);
    box-shadow: 0 12px 28px rgba(248, 193, 79, 0.28);
}

.btn--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.btn--xl {
    min-height: 3.4rem;
    font-size: 1rem;
}

.status-banner {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-banner--success {
    border-color: rgba(62, 213, 152, 0.35);
    background: rgba(62, 213, 152, 0.12);
}

.status-banner--error {
    border-color: rgba(255, 100, 124, 0.35);
    background: rgba(255, 100, 124, 0.12);
}

.topbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.topbar__actions--compact {
    justify-content: flex-start;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: rgba(248, 193, 79, 0.88);
    font-size: 0.72rem;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    color: var(--text-soft);
}

body[data-page="login"] .page-shell {
    width: min(820px, calc(100% - 1rem));
    padding: 0.75rem 0 1rem;
}

body[data-page="login"] .page-shell--center {
    min-height: 100vh;
    align-items: start;
    padding-top: 0.25rem;
}

body[data-page="login"] .hero-card {
    width: 100%;
    padding: 1.35rem;
    border-radius: 26px;
}

body[data-page="login"] .hero-card__badge {
    font-size: 0.66rem;
    padding: 0.42rem 0.7rem;
    margin: 0 auto;
}

body[data-page="login"] .hero-card__title {
    margin-top: 0;
    font-size: clamp(1.65rem, 8vw, 2.35rem);
}

body[data-page="login"] .hero-card__subtitle {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

body[data-page="login"] .feature-marquee {
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

body[data-page="login"] .feature-marquee span {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
}

body[data-page="login"] .feature-marquee span:nth-child(n + 5) {
    display: none;
}

body[data-page="login"] .auth-form-panel {
    padding: 1rem;
    border-radius: 20px;
}

body[data-page="login"] .auth-form-panel .hint-text {
    font-size: 0.8rem;
    line-height: 1.45;
}

body[data-page="lobby"] .page-shell {
    padding: 0.7rem 0 1.15rem;
}

body[data-page="lobby"] .topbar {
    position: sticky;
    top: 0.45rem;
    z-index: 12;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
}

body[data-page="lobby"] .topbar h1 {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
    line-height: 1.15;
}

body[data-page="lobby"] .topbar .eyebrow {
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
}

body[data-page="lobby"] .topbar__actions {
    gap: 0.55rem;
}

body[data-page="lobby"] #user-pill {
    width: 100%;
    justify-content: flex-start;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    line-height: 1.35;
    border-radius: 18px;
}

body[data-page="lobby"] .topbar .btn--ghost {
    min-height: 2.55rem;
    padding: 0.65rem 0.95rem;
    font-size: 0.92rem;
}

body[data-page="lobby"] .dashboard-grid {
    gap: 0.75rem;
}

body[data-page="lobby"] .glass-panel {
    padding: 1rem;
}

body[data-page="lobby"] .panel-head {
    margin-bottom: 0.8rem;
}

body[data-page="lobby"] .room-grid {
    gap: 0.75rem;
}

body[data-page="lobby"] .level-chip {
    font-size: 0.68rem;
    padding: 0.42rem 0.7rem;
}

body[data-page="lobby"] .mini-callout,
body[data-page="lobby"] .stat-box,
body[data-page="lobby"] .topup-card,
body[data-page="lobby"] .rank-row {
    padding: 0.8rem 0.9rem;
}

body[data-page="lobby"] .shop-card,
body[data-page="lobby"] .topup-card {
    padding: 0.9rem;
    border-radius: 18px;
}

.lobby-primary-panel {
    display: grid;
    gap: 0.8rem;
}

.mobile-fold {
    padding: 0;
    overflow: hidden;
}

.mobile-fold__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem;
    cursor: pointer;
}

.mobile-fold__summary::-webkit-details-marker {
    display: none;
}

.mobile-fold__summary::marker {
    content: "";
}

.mobile-fold__summary h2 {
    font-size: 1.08rem;
    line-height: 1.2;
}

.mobile-fold__meta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 42%;
    text-align: right;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.35;
}

.mobile-fold__meta::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.mobile-fold[open] .mobile-fold__meta::after {
    content: "-";
}

.mobile-fold__content {
    display: grid;
    gap: 0.9rem;
    padding: 0 1rem 1rem;
}

.mobile-fold__content > :first-child {
    margin-top: 0;
}

.mobile-fold__content .panel-head {
    margin-bottom: 0;
}

body[data-page="game"] .topbar {
    position: sticky;
    top: 0.5rem;
    z-index: 12;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 22px;
}

body[data-page="game"] .topbar h1 {
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
    line-height: 1.15;
}

body[data-page="game"] .topbar .eyebrow {
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
}

body[data-page="game"] .topbar__actions {
    gap: 0.55rem;
}

body[data-page="game"] #game-user-pill {
    display: none;
}

body[data-page="game"] .topbar .btn--ghost {
    min-height: 2.55rem;
    padding: 0.65rem 0.95rem;
    font-size: 0.92rem;
}

body[data-page="admin"] .page-shell {
    width: min(980px, calc(100% - 1.2rem));
    padding: 0.8rem 0 1.35rem;
}

body[data-page="admin"] .topbar {
    position: sticky;
    top: 0.45rem;
    z-index: 18;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 22px;
}

body[data-page="admin"] .topbar h1 {
    font-size: clamp(1.15rem, 4vw, 1.55rem);
    line-height: 1.15;
}

body[data-page="admin"] .topbar__actions {
    gap: 0.55rem;
    flex-wrap: wrap;
}

body[data-page="admin"] .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

body[data-page="admin"] .glass-panel {
    padding: 1rem;
}

body[data-page="admin"] .panel-head {
    margin-bottom: 0.8rem;
}

body[data-page="admin"] .admin-item-card,
body[data-page="admin"] .admin-player-form,
body[data-page="admin"] .shop-card {
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-page="admin"] .admin-inline-actions .btn,
body[data-page="admin"] .topbar .btn {
    min-height: 2.6rem;
}

.admin-fold {
    padding: 0.95rem 1rem;
}

.admin-fold__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}

.admin-fold__summary::-webkit-details-marker {
    display: none;
}

.admin-fold__summary h2 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.admin-fold__summary p {
    margin: 0 0 0.18rem;
}

.admin-fold__content {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

body[data-page="admin"] #admin-missions-list,
body[data-page="admin"] #admin-questions-list,
body[data-page="admin"] #admin-shop-list,
body[data-page="admin"] #admin-leaderboard-list,
body[data-page="admin"] #admin-players-list {
    max-height: 24rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.dashboard-grid,
.game-layout {
    display: grid;
    gap: 1rem;
}

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

.panel-span-2 {
    grid-column: span 1;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.room-grid,
.shop-grid,
.sidebar-stats,
.item-buttons,
.question-meta {
    display: grid;
    gap: 0.9rem;
}

.room-grid {
    grid-template-columns: 1fr;
}

.mini-callout,
.stat-box,
.player-card,
.topup-card,
.rank-row {
    padding: 0.95rem 1rem;
    border-radius: 18px;
}

.mini-callout {
    color: var(--text-soft);
    line-height: 1.6;
}

.info-stack strong,
.mini-callout strong {
    color: var(--text);
}

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

.shop-card,
.topup-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-card__price {
    color: var(--gold);
    font-weight: 700;
}

.shop-card p,
.topup-card p,
.rank-row__meta {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.leaderboard,
.player-list {
    display: grid;
    gap: 0.8rem;
}

.rank-row,
.player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.rank-row__place {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #1b1103;
    background: linear-gradient(135deg, #ffe29d, #f8c14f);
}

.rank-row__name,
.player-card__name {
    font-weight: 700;
}

.player-card {
    align-items: stretch;
}

.player-card.is-you {
    border-color: rgba(248, 193, 79, 0.4);
    box-shadow: 0 0 0 1px rgba(248, 193, 79, 0.14);
}

.player-card.is-out {
    opacity: 0.58;
}

.player-card__main,
.player-card__meta {
    display: grid;
    gap: 0.25rem;
}

.player-card__meta {
    justify-items: end;
    text-align: right;
}

body[data-page="game"] .page-shell {
    padding-bottom: 6.5rem;
}

.game-layout {
    grid-template-columns: 1fr;
}

.sidebar-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.contestant-panel {
    display: grid;
    gap: 1rem;
}

.sidebar-stats,
.item-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-box {
    display: grid;
    gap: 0.35rem;
}

.stat-box__label {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.swipe-hint {
    display: grid;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.15), rgba(141, 91, 255, 0.15));
    color: var(--text-soft);
}

.main-stage {
    display: grid;
    gap: 1rem;
}

.mobile-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-panel-top .panel-head {
    margin-bottom: 0;
    flex: 1;
}

.mobile-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-quickbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.mobile-quickbar__chip {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-quickbar__chip span {
    font-size: 0.74rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mobile-quickbar__chip strong {
    font-size: 0.96rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.question-panel {
    position: relative;
    overflow: hidden;
}

.question-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.06), rgba(141, 91, 255, 0.08), rgba(248, 193, 79, 0.05));
    pointer-events: none;
}

.question-panel.is-suspense::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(248, 193, 79, 0.08), transparent);
    animation: scan 1.2s linear infinite;
    pointer-events: none;
}

.question-meta {
    grid-template-columns: repeat(2, max-content);
    margin-bottom: 0.8rem;
}

.stage-status {
    min-height: 2rem;
    margin-bottom: 0.55rem;
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.45;
}

.question-card {
    min-height: 9rem;
    display: grid;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border-radius: 22px;
    background: rgba(1, 8, 17, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.question-card h2 {
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.35;
}

.answer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.answer-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 20px;
    color: var(--text);
    background: linear-gradient(135deg, rgba(24, 37, 67, 0.92), rgba(12, 20, 40, 0.92));
    border: 1px solid rgba(120, 146, 255, 0.18);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.answer-card:hover {
    transform: translateY(-2px);
    border-color: rgba(41, 151, 255, 0.48);
    box-shadow: 0 12px 24px rgba(20, 46, 95, 0.34);
}

.answer-card__prefix {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(248, 193, 79, 0.18);
    color: var(--gold);
    font-weight: 800;
}

.answer-card__label {
    text-align: left;
    line-height: 1.5;
}

.answer-card.is-selected {
    border-color: rgba(248, 193, 79, 0.74);
    box-shadow: 0 0 0 2px rgba(248, 193, 79, 0.14), 0 16px 30px rgba(248, 193, 79, 0.18);
}

.answer-card.is-correct {
    border-color: rgba(62, 213, 152, 0.7);
    background: linear-gradient(135deg, rgba(18, 76, 55, 0.9), rgba(10, 35, 26, 0.95));
}

.answer-card.is-wrong {
    border-color: rgba(255, 100, 124, 0.7);
    background: linear-gradient(135deg, rgba(91, 17, 33, 0.9), rgba(40, 10, 18, 0.95));
}

.answer-card.is-hidden {
    opacity: 0.28;
    pointer-events: none;
    filter: grayscale(0.6);
}

.answer-card:disabled {
    opacity: 0.75;
}

.result-banner {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.result-banner--correct {
    border-color: rgba(62, 213, 152, 0.38);
    background: rgba(62, 213, 152, 0.12);
}

.result-banner--wrong {
    border-color: rgba(255, 100, 124, 0.38);
    background: rgba(255, 100, 124, 0.12);
}

.result-banner--waiting {
    border-color: rgba(248, 193, 79, 0.3);
    background: rgba(248, 193, 79, 0.1);
}

.mobile-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(2, 7, 18, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.mobile-panel-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.mobile-command-bar {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 34;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: 24px;
    background: rgba(6, 15, 31, 0.9);
    border: 1px solid rgba(130, 110, 255, 0.18);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(20px);
}

.mobile-command-button {
    min-height: 3.2rem;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    display: grid;
    gap: 0.2rem;
    justify-items: start;
    text-align: left;
}

.mobile-command-button__title {
    font-weight: 800;
}

.mobile-command-button__meta {
    font-size: 0.76rem;
    color: var(--text-soft);
    line-height: 1.35;
}

body[data-page="game"] .mobile-sheet {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 5.75rem;
    z-index: 35;
    max-height: min(78vh, 42rem);
    overflow: auto;
    opacity: 0;
    transform: translateY(calc(100% + 1rem));
    transition: transform 220ms ease, opacity 220ms ease;
    pointer-events: none;
}

body[data-page="game"] .mobile-sheet.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.auth-card,
.lobby-shell,
.admin-shell {
    display: grid;
    gap: 1rem;
}

.auth-card__brand,
.brand-mark__copy,
.app-sheet__content,
.modal-stack {
    display: grid;
    gap: 0.7rem;
}

.auth-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.auth-switcher__button {
    width: 100%;
}

.auth-switcher__button.is-active {
    color: #08111f;
    background: linear-gradient(135deg, #f8c14f, #f5e2a2);
    box-shadow: 0 16px 30px rgba(248, 193, 79, 0.22);
}

.auth-form-panel {
    padding: 1.15rem;
}

.auth-card {
    gap: 1.15rem;
}

.auth-card__brand {
    justify-items: center;
    text-align: center;
    gap: 0.85rem;
}

.auth-card__logo-wrap {
    position: relative;
    width: min(9rem, 42vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 32px;
    background:
        radial-gradient(circle at top, rgba(248, 193, 79, 0.24), transparent 58%),
        linear-gradient(180deg, rgba(19, 31, 59, 0.96), rgba(9, 17, 33, 0.95));
    border: 1px solid rgba(248, 193, 79, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 36px rgba(4, 11, 24, 0.42);
    overflow: hidden;
}

.auth-card__logo-wrap::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.auth-card__logo {
    width: min(5.5rem, 24vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32));
}

.auth-card__publisher,
.brand-mark__publisher,
.lobby-room-card__publisher {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.5;
}

.auth-card__publisher strong {
    color: var(--gold);
    font-weight: 800;
}

.feature-marquee--landing span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.field-group__caption {
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.field-group--select-card select {
    background-color: rgba(17, 29, 55, 0.96);
    border-color: rgba(111, 141, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 28px rgba(3, 8, 18, 0.28);
}

.lobby-topbar {
    position: sticky;
    top: 0.5rem;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.brand-mark__logo {
    min-width: 4.2rem;
    padding: 0.8rem 0.95rem;
    border-radius: 18px;
    text-align: center;
    font-weight: 800;
    color: var(--gold);
    background: rgba(248, 193, 79, 0.12);
    border: 1px solid rgba(248, 193, 79, 0.24);
}

.brand-mark__copy p {
    margin: 0 0 0.15rem;
}

.brand-mark__copy h1 {
    font-size: clamp(1.25rem, 5vw, 1.8rem);
}

.lobby-topbar__desktop-link {
    display: none;
}

.lobby-focus,
.admin-grid {
    display: grid;
    gap: 1rem;
}

.lobby-room-card {
    display: grid;
    gap: 1rem;
}

.lobby-room-card__subtitle {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.lobby-room-card__publisher {
    justify-self: start;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.app-overlay {
    position: fixed;
    inset: 0;
    z-index: 36;
    background: rgba(2, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.app-sheet {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 37;
    max-height: min(76vh, 40rem);
    overflow: auto;
    padding: 1rem;
    border-radius: 24px;
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(14, 27, 52, 0.94), rgba(7, 15, 30, 0.9));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.app-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-menu-list {
    display: grid;
    gap: 0.65rem;
}

.app-menu-item {
    width: 100%;
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    text-align: left;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-menu-item--danger {
    background: rgba(255, 100, 124, 0.12);
    border-color: rgba(255, 100, 124, 0.25);
}

.modal-stat-grid,
.admin-player-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.admin-item-card,
.admin-player-form {
    display: grid;
    gap: 0.85rem;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.admin-list {
    margin-top: 1rem;
}

.field-group--inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.field-group--inline input {
    width: auto;
}

.admin-checkline {
    align-self: end;
    min-height: 3.2rem;
}

.mission-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mission-card h3,
.mission-card p {
    margin: 0;
}

.mission-card p {
    color: var(--text-soft);
    line-height: 1.55;
}

.mission-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.mission-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(41, 151, 255, 0.12);
    border: 1px solid rgba(41, 151, 255, 0.18);
    font-size: 0.78rem;
}

.mission-chip--gold {
    color: #fff5da;
    background: rgba(248, 193, 79, 0.14);
    border-color: rgba(248, 193, 79, 0.22);
}

.game-toast-stack {
    position: fixed;
    top: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 46;
    display: grid;
    gap: 0.65rem;
    pointer-events: none;
}

.game-toast {
    justify-self: end;
    max-width: min(26rem, 100%);
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: var(--text);
    background: rgba(10, 20, 40, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
    transition: transform 220ms ease, opacity 220ms ease;
}

.game-toast--success {
    border-color: rgba(62, 213, 152, 0.34);
    background: rgba(16, 58, 42, 0.92);
}

.game-toast--warning {
    border-color: rgba(248, 193, 79, 0.34);
    background: rgba(71, 49, 11, 0.94);
}

.game-toast--error {
    border-color: rgba(255, 100, 124, 0.34);
    background: rgba(74, 19, 31, 0.94);
}

.game-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}

.focus-freeze-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(3, 9, 21, 0.82);
    backdrop-filter: blur(8px);
}

.focus-freeze-overlay__card {
    width: min(28rem, calc(100% - 1rem));
    padding: 1.35rem;
    text-align: center;
    display: grid;
    gap: 0.75rem;
}

.focus-freeze-overlay__card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.focus-freeze-overlay__card strong {
    font-size: clamp(3rem, 10vw, 4.6rem);
    line-height: 1;
    color: var(--gold);
}

@keyframes scan {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

@media (min-width: 760px) {
    .lobby-topbar__desktop-link {
        display: inline-flex;
    }

    .app-sheet {
        left: auto;
        right: 1rem;
        bottom: 1rem;
        width: min(28rem, calc(100% - 2rem));
    }

    .game-toast-stack {
        left: auto;
        right: 1rem;
        width: min(28rem, calc(100% - 2rem));
    }

    .admin-player-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body[data-page="game"] .page-shell {
        padding-bottom: 2rem;
    }

    .page-shell {
        width: min(1260px, calc(100% - 2.5rem));
        padding-top: 1.4rem;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    body[data-page="login"] .page-shell {
        width: min(1200px, calc(100% - 2.5rem));
        padding: 1.4rem 0 2rem;
    }

    body[data-page="login"] .page-shell--center {
        align-items: center;
        padding-top: 0;
    }

    body[data-page="login"] .hero-card {
        padding: 2rem;
        border-radius: 32px;
    }

    body[data-page="login"] .hero-card__badge {
        font-size: 0.74rem;
        padding: 0.5rem 0.9rem;
    }

    body[data-page="login"] .hero-card__title {
        margin-top: 0;
        font-size: clamp(2rem, 6vw, 3.3rem);
    }

    body[data-page="login"] .hero-card__subtitle {
        margin: 0;
        font-size: 1rem;
        line-height: 1.7;
    }

    body[data-page="login"] .feature-marquee {
        gap: 0.7rem;
        margin-bottom: 1.5rem;
    }

    body[data-page="login"] .feature-marquee span {
        display: inline-flex;
        padding: 0.65rem 0.9rem;
        font-size: 0.92rem;
    }

    body[data-page="login"] .auth-form-panel {
        padding: 1.2rem;
        border-radius: var(--radius);
    }

    body[data-page="login"] .auth-form-panel .hint-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    body[data-page="lobby"] .page-shell {
        padding: 1.4rem 0 2rem;
    }

    body[data-page="lobby"] .topbar {
        position: static;
        top: auto;
        z-index: auto;
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 1.2rem;
        border-radius: var(--radius);
    }

    body[data-page="lobby"] .topbar h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    body[data-page="lobby"] .topbar .eyebrow {
        margin-bottom: 0.4rem;
        font-size: 0.72rem;
    }

    body[data-page="lobby"] #user-pill {
        width: auto;
        padding: 0.8rem 1rem;
        font-size: 1rem;
        line-height: 1.4;
        border-radius: 999px;
    }

    body[data-page="lobby"] .topbar .btn--ghost {
        min-height: 3rem;
        padding: 0.8rem 1.15rem;
        font-size: 1rem;
    }

    body[data-page="lobby"] .dashboard-grid {
        gap: 1rem;
    }

    body[data-page="lobby"] .glass-panel {
        padding: 1.2rem;
    }

    body[data-page="lobby"] .panel-head {
        margin-bottom: 1rem;
    }

    body[data-page="lobby"] .room-grid {
        gap: 0.9rem;
    }

    body[data-page="lobby"] .level-chip {
        font-size: 0.74rem;
        padding: 0.5rem 0.9rem;
    }

    .mobile-fold {
        padding: 1.2rem;
    }

    .mobile-fold__summary {
        padding: 0;
        cursor: default;
    }

    .mobile-fold__meta::after {
        display: none;
    }

    .mobile-fold__content {
        padding: 0;
        margin-top: 1rem;
    }

    body[data-page="game"] .topbar {
        position: static;
        top: auto;
        z-index: auto;
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 1.2rem;
        border-radius: var(--radius);
    }

    body[data-page="game"] .topbar h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    body[data-page="game"] .topbar .eyebrow {
        margin-bottom: 0.4rem;
        font-size: 0.72rem;
    }

    body[data-page="game"] #game-user-pill {
        display: inline-flex;
    }

    body[data-page="game"] .topbar .btn--ghost {
        min-height: 3rem;
        padding: 0.8rem 1.15rem;
        font-size: 1rem;
    }

    body[data-page="admin"] .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .panel-span-2 {
        grid-column: span 2;
    }

    .room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .game-layout {
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: start;
    }

    .answer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-quickbar,
    .mobile-command-bar,
    .mobile-panel-backdrop,
    .mobile-panel-close {
        display: none;
    }

    body[data-page="game"] .mobile-sheet {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: auto;
        max-height: none;
        overflow: visible;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .mobile-panel-top {
        display: block;
        margin-bottom: 1rem;
    }
}
