.game-page {
    max-width: 1180px;
}

.game-hero,
.quiz-panel {
    background: var(--surface);
    border: 1px solid #ffffff2e;
    border-radius: 1.4rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.game-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.65rem;
}

.game-eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.game-title {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(2rem, 5vw, 3.35rem);
    font-weight: 700;
    line-height: 1.02;
}

.game-intro {
    max-width: 660px;
    margin: 0.8rem 0 0;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.game-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
    gap: 0.75rem;
}

.game-stat {
    min-width: 86px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: #ffffff29;
    text-align: center;
}

.game-stat span {
    display: block;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-stat strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-main);
    font-size: 1.55rem;
    line-height: 1;
}

.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 920px);
    justify-content: center;
}

.quiz-panel {
    padding: 1.35rem;
}

.quiz-panel__top,
.quiz-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-panel__top {
    justify-content: space-between;
}

.quiz-panel__top h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.45rem;
    font-weight: 700;
}

.quiz-counter {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    background: #ffffff2e;
    color: var(--text-main);
    font-weight: 700;
}

.quiz-progress {
    height: 0.75rem;
    margin: 1.1rem 0;
    border: 1px solid #ffffff2e;
    border-radius: 999px;
    background: #ffffff29;
    overflow: hidden;
}

.quiz-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-soft) 0%, var(--accent-strong) 52%, var(--accent) 100%);
    transition: width 0.35s ease;
}

.question-visual {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    padding: 0.75rem;
    background: #ffffff;
    overflow: visible;
}

.question-visual svg {
    display: block;
    width: 100%;
    max-height: 270px;
}

.question-visual img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(42vh, 420px);
    object-fit: contain;
    object-position: center;
    border-radius: 0.45rem;
}

.question-text {
    margin: 1.1rem 0;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.answer-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.85rem;
    background: #ffffff2e;
    color: var(--text-main);
    font-weight: 600;
    text-align: left;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.answer-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #ffffff47;
    border-color: #ffffff8a;
}

.game-auth-link,
.game-auth-link:hover {
    color: var(--text-main);
    text-decoration: none;
}

.answer-button span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    background: #ffffff38;
    color: var(--text-main);
    font-weight: 800;
}

.answer-button--correct {
    background: #55f1684d;
    border-color: #7bff8b;
}

.answer-button--wrong {
    background: #ff6f9145;
    border-color: #ff9aae;
}

.quiz-feedback {
    min-height: 3.1rem;
    margin: 1rem 0;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.8rem 0.95rem;
    background: #ffffff24;
    color: var(--text-soft);
    font-weight: 600;
}

.quiz-feedback--correct {
    background: #55f16838;
    color: var(--text-main);
}

.quiz-feedback--wrong {
    background: #ff6f9136;
    color: var(--text-main);
}

.quiz-actions {
    justify-content: flex-end;
}

.game-button {
    border: 1px solid #ffffff52;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--accent) 72%, transparent);
    color: #ffffff;
    font-weight: 700;
    padding: 0.85rem 1rem;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.game-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--accent) 86%, transparent);
}

.game-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

body.theme-alt :is(
    .game-title,
    .quiz-panel__top h2,
    .game-stat strong,
    .quiz-counter,
    .question-text,
    .answer-button,
    .answer-button span,
    .quiz-feedback--correct,
    .quiz-feedback--wrong
) {
    color: #fffffff2;
}

body.theme-alt :is(
    .game-eyebrow,
    .game-intro,
    .game-stat span,
    .quiz-feedback
) {
    color: #ffffffbd;
}

@media (max-width: 767.98px) {
    .game-hero,
    .game-layout,
    .answer-grid,
    .quiz-panel__top,
    .quiz-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .game-hero,
    .quiz-panel {
        border-radius: 1rem;
    }

    .game-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-stat {
        min-width: 0;
        padding: 0.75rem 0.55rem;
    }

    .game-stat strong {
        font-size: 1.25rem;
    }

    .question-visual {
        min-height: 190px;
        padding: 0.55rem;
    }

    .question-visual img {
        max-height: min(38vh, 320px);
    }

    .quiz-actions {
        justify-items: end;
    }
}
