/* ===== ������ʽ���� ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --bg-gradient-start: #fdf2f8;
    --bg-gradient-end: #ede9fe;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(148, 163, 184, 0.25);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(99, 102, 241, 0.15);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ===== ���������� ===== */
.app-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: 100vh;
    gap: 12px;
    padding: 12px;
}

/* ===== ���������ʽ ===== */
.control-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ===== ���ÿ�Ƭ ===== */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.setting-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.setting-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.setting-card h3 .icon {
    font-size: 1rem;
}

.setting-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ===== ������������ ===== */
.operation-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.operation-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    background: #f8fafc;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}

.op-label {
    min-width: 55px;
    font-weight: 600;
}

.op-count {
    width: 48px;
    padding: 3px 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
}

.op-unit {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.total-count {
    margin-top: 6px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== ˫���������� ===== */
.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ===== ��ѡ����ʽ ===== */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #e2e8f0;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-label input:checked+.checkmark {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
}

.checkbox-label input:checked+.checkmark::after {
    content: '';
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* ===== ����С��ѡ���� ===== */
.decimal-toggle {
    position: relative;
}

.inline-select {
    margin-left: 4px;
    padding: 2px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.72rem;
    background: white;
    cursor: pointer;
    font-weight: 600;
}

/* ===== �������ʽ ===== */
.range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.range-separator {
    padding-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.input-group.full-width {
    width: 100%;
}

.input-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input,
.input-group select {
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== �������� ===== */
.inline-title-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-label {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.inline-title-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== �������� ===== */
.nav-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.nav-link {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ===== ������ť ===== */
.action-buttons {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-icon {
    font-size: 1rem;
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-print {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* ===== Ԥ������ ===== */
.preview-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.preview-header {
    text-align: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.preview-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.preview-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== ��ӡҳ����ʽ ===== */
.print-area {
    flex: 1;
    overflow-y: auto;
}

.sheet {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sheet-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #e2e8f0;
}

.sheet-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.sheet-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ===== ��Ŀ���� ===== */
.questions-grid {
    display: grid;
    gap: 6px;
}

.questions-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.questions-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.questions-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
}

.question-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.question-number {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 6px;
    min-width: 25px;
}

.question-content {
    flex: 1;
    min-width: 0;
}

/* ===== ռλ��ʾ ===== */
.placeholder-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.placeholder-message p {
    font-size: 1rem;
}

/* ===== ��ҳ ===== */
.answer-sheet {
    margin-top: 20px;
    page-break-before: always;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.answer-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 0.85rem;
}

.answer-item .question-number {
    color: var(--success-color);
}

.answer-value {
    font-weight: 700;
    color: var(--success-color);
}

/* ===== �������ʽ ===== */
.fill-blank {
    display: inline-block;
    min-width: 40px;
    border-bottom: 2px solid var(--text-primary);
    margin: 0 4px;
}

/* ===== ��ʽ������ʽ ===== */
.vertical-calc {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 8px 12px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.vertical-calc .v-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 60px;
}

.vertical-calc .v-op {
    margin-right: 8px;
    font-weight: 700;
}

.vertical-calc .v-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    margin: 4px 0;
}

.vertical-calc .v-answer {
    min-height: 1.5em;
    min-width: 40px;
    border-bottom: 1px dashed var(--border-color);
}

.method-diagram {
    display: inline-block;
    line-height: 0;
}

.method-diagram svg {
    width: 220px;
    max-width: 100%;
    height: auto;
}

/* ===== ��ӡ��ʽ ===== */
@media print {
    @page {
        size: A4;
        margin: 0;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        padding: 0;
        margin: 0;
        height: auto;
        overflow: visible;
    }

    .no-print {
        display: none !important;
    }

    .app-container {
        display: block;
        padding: 0;
        height: auto;
    }

    .preview-container {
        background: none;
        padding: 0;
        box-shadow: none;
        border: none;
        overflow: visible;
    }

    .preview-header {
        display: none;
    }

    .print-area {
        overflow: visible;
    }

    .sheet {
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        box-sizing: border-box;
        padding: 10mm 12mm;
        width: 100%;
        min-height: auto;
    }

    .sheet-header {
        page-break-after: avoid;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .questions-grid {
        page-break-before: avoid;
        gap: 4px;
    }

    .question-item {
        background: transparent !important;
        padding: 4px 4px;
        font-size: 13pt;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        align-items: flex-start;
    }

    .sheet-title {
        font-size: 18pt;
    }

    .info-item {
        font-size: 11pt;
    }

    .answer-item {
        background: #f0fdf4 !important;
        padding: 6px;
        font-size: 11pt;
    }

    .vertical-calc {
        border: 1px solid #ccc;
    }

    .method-diagram svg { width: 48mm; }
    .questions-grid.cols-3 .method-diagram svg { width: 44mm; }
    .questions-grid.cols-4 .method-diagram svg { width: 40mm; }
}

/* ===== ��Ӧʽ��� ===== */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }

    body {
        height: auto;
        overflow: auto;
    }
}
/* ===== ��������ʽ ===== */
.inline-answer {
    color: var(--success-color);
    font-weight: 700;
}

/* ===== 数学冒险闯关 ===== */
.game-page {
    min-height: 100vh;
    height: auto;
    overflow: auto;
    background: linear-gradient(145deg, #dbeafe 0%, #ede9fe 45%, #fce7f3 100%);
}

.game-page [hidden] {
    display: none !important;
}

.game-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.game-header {
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.game-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    color: #4338ca;
}

.game-header p {
    color: var(--text-secondary);
    font-weight: 600;
}

.game-back-link,
.game-best {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.game-back-link {
    color: #4338ca;
    text-decoration: none;
    font-weight: 800;
}

.game-best {
    display: flex;
    flex-direction: column;
    color: #92400e;
}

.game-best strong {
    font-size: 1.4rem;
}

.game-panel {
    padding: clamp(18px, 4vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 50px rgba(79, 70, 229, 0.14);
}

.game-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.game-section-heading.compact {
    margin-bottom: 14px;
}

.game-section-heading h2 {
    font-size: 1.15rem;
}

.game-section-heading p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.game-step-number {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    font-weight: 800;
}

.difficulty-options,
.game-config-grid,
.operator-options,
.game-status-bar,
.game-result-grid {
    display: grid;
    gap: 14px;
}

.difficulty-options {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 22px;
}

.difficulty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 18px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s ease;
}

.difficulty-card:hover,
.difficulty-card.active {
    border-color: #6366f1;
    background: #eef2ff;
    transform: translateY(-2px);
}

.difficulty-icon {
    font-size: 2rem;
}

.difficulty-card small {
    color: var(--text-secondary);
}

.game-config-grid {
    grid-template-columns: 1fr 1fr;
}

.game-config-card {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.operator-options {
    grid-template-columns: 1fr 1fr;
}

.operator-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: white;
    cursor: pointer;
}

.operator-choice:has(input:checked) {
    outline: 2px solid #818cf8;
    background: #eef2ff;
}

.game-field-row {
    display: flex;
    align-items: end;
    gap: 10px;
}

.game-field-row label,
.game-select-field {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.game-field-row input,
.game-select-field select,
.game-answer-form input {
    width: 100%;
    padding: 11px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font: inherit;
    font-weight: 700;
}

.game-select-field {
    margin-top: 12px;
}

.game-advanced-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

.game-primary-button,
.game-secondary-button {
    padding: 13px 22px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.game-primary-button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.28);
}

.game-setup > .game-primary-button {
    display: block;
    min-width: 220px;
    margin: 22px auto 0;
}

.game-secondary-button {
    background: #e2e8f0;
    color: #334155;
}

.game-setup-message {
    min-height: 24px;
    margin-top: 12px;
    color: #dc2626;
    text-align: center;
    font-weight: 700;
}

.game-status-bar {
    grid-template-columns: repeat(4, 1fr);
}

.game-status-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    font-weight: 800;
}

.adventure-track {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 8px;
    font-size: 2rem;
}

.track-line {
    position: relative;
    flex: 1;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
}

.track-progress {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #6366f1);
    transition: width 0.35s ease;
}

.track-hero {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    transition: left 0.35s ease;
}

.game-progress-text {
    text-align: center;
    color: var(--text-secondary);
}

.game-question-card {
    max-width: 650px;
    margin: 22px auto;
    padding: 30px;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.game-feedback {
    min-height: 28px;
    color: #4338ca;
    font-weight: 800;
}

.game-feedback.correct {
    color: #059669;
}

.game-feedback.wrong {
    color: #dc2626;
}

.game-question {
    margin: 22px 0;
    font-size: clamp(2.3rem, 8vw, 4.4rem);
    font-weight: 800;
}

.game-answer-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}

.game-answer-options.has-five {
    grid-template-columns: repeat(5, 1fr);
    max-width: 640px;
}

.answer-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    font: inherit;
    cursor: pointer;
    transition: 0.15s ease;
}

.answer-option:hover:not(:disabled) {
    border-color: #6366f1;
    background: #eef2ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.22);
}

.answer-option .option-key {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.7rem;
    font-weight: 800;
}

.answer-option .option-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.answer-option:disabled {
    cursor: default;
}

.answer-option.is-correct {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}

.answer-option.is-right {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.answer-option.is-wrong {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
    opacity: 0.85;
}

.game-answer-help {
    margin-top: 13px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.game-play > .game-secondary-button {
    display: block;
    margin: 0 auto;
}

.game-result {
    text-align: center;
}

.result-celebration {
    font-size: 4.8rem;
}

.game-result h2 {
    font-size: 2rem;
}

.game-result-stars {
    margin: 12px 0;
    font-size: 2.1rem;
}

.game-result-message {
    color: var(--text-secondary);
}

.game-result-grid {
    grid-template-columns: repeat(4, 1fr);
    margin: 24px 0;
}

.game-result-grid div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 10px;
    border-radius: 14px;
    background: #f8fafc;
}

.game-result-grid span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.game-result-grid strong {
    font-size: 1.4rem;
}

.game-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.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;
}

@media (max-width: 700px) {
    .game-header {
        grid-template-columns: 1fr 1fr;
    }

    .game-header > div:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .difficulty-options,
    .game-config-grid {
        grid-template-columns: 1fr;
    }

    .game-status-bar,
    .game-result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .game-answer-options,
    .game-answer-options.has-five {
        grid-template-columns: 1fr 1fr;
        max-width: none;
    }

    .game-result-actions {
        flex-direction: column;
    }
}
