/* ======================================
   CSS Custom Properties & Reset
   ====================================== */
:root {
    /* Light Mode Colors */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    /* Brand Colors */
    --accent: #F97316;
    --accent-hover: #EA580C;
    --accent-light: rgba(249, 115, 22, 0.1);
    --accent-glow: rgba(249, 115, 22, 0.3);
    --blue: #3B82F6;
    --blue-light: rgba(59, 130, 246, 0.1);
    --green: #22C55E;
    --green-light: rgba(34, 197, 94, 0.1);
    --red: #EF4444;
    --red-light: rgba(239, 68, 68, 0.1);
    --yellow: #EAB308;
    --yellow-light: rgba(234, 179, 8, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

    /* Misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.2s ease;
    --max-width: 1100px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --border: #334155;
    --border-hover: #475569;
    --accent: #FB923C;
    --accent-hover: #F97316;
    --accent-light: rgba(251, 146, 60, 0.15);
    --accent-glow: rgba(251, 146, 60, 0.3);
    --blue: #60A5FA;
    --blue-light: rgba(96, 165, 250, 0.15);
    --green: #4ADE80;
    --green-light: rgba(74, 222, 128, 0.15);
    --red: #F87171;
    --red-light: rgba(248, 113, 113, 0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.35), 0 4px 6px -4px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.2);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background-color var(--transition), color var(--transition);
}

/* ======================================
   Header
   ====================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color var(--transition), border-color var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(30, 41, 59, 0.85);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    transition: color var(--transition);
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ======================================
   Main Content
   ====================================== */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    padding-bottom: 80px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes correctFlash {
    0% { background-color: var(--green-light); }
    100% { background-color: transparent; }
}

@keyframes wrongFlash {
    0% { background-color: var(--red-light); }
    100% { background-color: transparent; }
}

/* ======================================
   Hero Section
   ====================================== */
.hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 32px;
    padding: 60px 40px;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #F97316 0%, #F59E0B 30%, #EAB308 60%, #FB923C 100%);
    opacity: 0.12;
    z-index: 0;
}

[data-theme="dark"] .hero-bg {
    opacity: 0.08;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-title-line {
    display: block;
    color: var(--text-primary);
}

.hero-title-accent {
    display: block;
    background: linear-gradient(135deg, var(--accent), #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.4rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

/* ======================================
   Section Titles
   ====================================== */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent), #F59E0B);
    border-radius: 2px;
}

/* ======================================
   Mode Cards
   ====================================== */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mode-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #F59E0B);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mode-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.mode-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: all 0.25s ease;
}

.mode-card:hover .mode-card-icon {
    background: var(--accent);
    transform: scale(1.1);
}

.mode-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    transition: stroke 0.25s ease;
}

.mode-card:hover .mode-card-icon svg {
    stroke: white;
}

.mode-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.mode-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ======================================
   Progress Grid
   ====================================== */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.progress-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition);
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-card-percent {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #F59E0B);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

/* ======================================
   Info Cards
   ====================================== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.info-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.info-card-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ======================================
   Page Header
   ====================================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    margin-bottom: 24px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ======================================
   Subject Cards
   ====================================== */
.subject-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.subject-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    text-align: left;
    font-family: inherit;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.subject-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #F59E0B);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.subject-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.subject-card:hover::after {
    opacity: 1;
}

.subject-card-number {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1;
}

.subject-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subject-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.subject-card-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

/* ======================================
   Quiz Card
   ====================================== */
.quiz-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quiz-score {
    font-weight: 600;
}

.quiz-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #F59E0B);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.quiz-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.3s ease;
}

.quiz-question-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.2s ease;
    position: relative;
}

.choice-btn:hover:not(.disabled) {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateX(4px);
}

.choice-btn.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.choice-btn.correct {
    border-color: var(--green);
    background: var(--green-light);
    animation: correctFlash 0.5s ease;
}

.choice-btn.wrong {
    border-color: var(--red);
    background: var(--red-light);
    animation: wrongFlash 0.5s ease;
}

.choice-btn.disabled {
    cursor: default;
    opacity: 0.7;
}

.choice-btn.disabled.correct {
    opacity: 1;
}

.choice-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.choice-btn:hover:not(.disabled) .choice-label {
    background: var(--accent);
    color: white;
}

.choice-btn.correct .choice-label {
    background: var(--green);
    color: white;
}

.choice-btn.wrong .choice-label {
    background: var(--red);
    color: white;
}

.choice-text {
    flex: 1;
}

/* Explanation */
.quiz-explanation {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    animation: slideUp 0.3s ease;
}

.quiz-explanation.hidden {
    display: none;
}

.quiz-result {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-result.correct {
    color: var(--green);
}

.quiz-result.correct::before {
    content: '◯';
    font-size: 1.2rem;
}

.quiz-result.wrong {
    color: var(--red);
}

.quiz-result.wrong::before {
    content: '✕';
    font-size: 1.2rem;
}

.quiz-explanation-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.quiz-explanation.correct-bg {
    background: var(--green-light);
    border: 1px solid var(--green);
}

.quiz-explanation.wrong-bg {
    background: var(--red-light);
    border: 1px solid var(--red);
}

/* Quiz Actions */
.quiz-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ======================================
   Buttons
   ====================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn.hidden {
    display: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #F59E0B);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-accent {
    background: var(--blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* ======================================
   Mock Exam
   ====================================== */
.mock-timer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.mock-timer.warning {
    color: var(--red);
    background: var(--red-light);
    animation: pulse 1s infinite;
}

.mock-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mock-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.mock-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mock-nav-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.mock-nav-btn.answered {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue);
}

.mock-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.mock-category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ======================================
   Results Page
   ====================================== */
.results-container {
    animation: slideUp 0.4s ease;
}

.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.results-verdict {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.results-verdict.pass {
    color: var(--green);
}

.results-verdict.fail {
    color: var(--red);
}

.results-total-score {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.results-total-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Score grid */
.results-scores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.result-score-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.result-score-card.pass-card {
    border-color: var(--green);
}

.result-score-card.fail-card {
    border-color: var(--red);
}

.result-score-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-score-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.result-score-value.pass-text {
    color: var(--green);
}

.result-score-value.fail-text {
    color: var(--red);
}

.result-score-detail {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Review section */
.results-review {
    margin-top: 32px;
}

.results-review-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.review-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
}

.review-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-item-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.review-item-badge.correct-badge {
    background: var(--green-light);
    color: var(--green);
}

.review-item-badge.wrong-badge {
    background: var(--red-light);
    color: var(--red);
}

.review-item-question {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.6;
}

.review-item-answer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.review-item-explanation {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    line-height: 1.6;
}

/* Results actions */
.results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* ======================================
   Footer
   ====================================== */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border);
}

/* ======================================
   Responsive Design
   ====================================== */
@media (max-width: 1023px) {
    .mode-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .header-inner {
        padding: 0 16px;
        height: 56px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .main {
        padding: 0 16px;
        padding-bottom: 60px;
    }

    .hero {
        margin-top: 20px;
        padding: 40px 20px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-title-accent {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 32px 0 16px;
    }

    .mode-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mode-card {
        padding: 24px 20px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 16px;
    }

    .mode-card-icon {
        margin: 0;
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .mode-card-icon svg {
        width: 24px;
        height: 24px;
    }

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

    .info-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .info-card {
        padding: 16px;
    }

    .subject-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .subject-card {
        padding: 20px;
    }

    .page-header {
        margin-top: 20px;
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .quiz-card {
        padding: 20px;
    }

    .quiz-question {
        font-size: 1rem;
    }

    .choice-btn {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .mock-timer {
        padding: 6px 12px;
        font-size: 0.95rem;
    }

    .mock-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .results-scores {
        grid-template-columns: 1fr;
    }

    .results-total-score {
        font-size: 2.5rem;
    }

    .results-verdict {
        font-size: 1.3rem;
    }

    .results-actions {
        flex-direction: column;
    }
}

@media (max-width: 374px) {
    .hero-title {
        font-size: 1.3rem;
    }

    .hero-title-accent {
        font-size: 1.5rem;
    }

    .logo-text {
        font-size: 0.85rem;
    }
}
