:root {
    --bg-color: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #38bdf8;
    --accent-hover: #0284c7;
    --border-color: #334155;
    --code-bg: #020617;
    --hl-keyword: #c678dd;
    --hl-string: #a6e22e;
    --hl-comment: #6272a4;
    --hl-func: #61afef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.4;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item:hover {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--text-color);
}

.nav-item.active {
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--accent-primary);
    border-left: 4px solid var(--accent-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 2.5rem 4rem;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    max-width: 900px;
    margin: 0 auto;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    color: #e0f2fe;
}

.content-block {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.content-block h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-block p {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

/* Code container setup */
.code-container {
    position: relative;
    background-color: var(--code-bg);
    border-radius: 8px;
    border: 1px solid #1e293b;
    margin: 1.25rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e293b;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid #0f172a;
}

.code-lang {
    font-weight: 600;
    text-transform: uppercase;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.copy-btn:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.copy-btn.copied {
    color: #10b981;
    border-color: #10b981;
}

pre {
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #abb2bf;
    margin: 0;
}

/* Highlight styles purely CSS based */
.keyword { color: var(--hl-keyword); font-weight: bold; }
.string { color: var(--hl-string); }
.comment { color: var(--hl-comment); font-style: italic; }
.func { color: var(--hl-func); }
.builtin { color: #e5c07b; }

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

li {
    margin-bottom: 0.5rem;
}

.alert-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background-color: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
    margin-bottom: 1.5rem;
}

.alert-box.tip {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
}

/* Mission Box */
.mission-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(56, 189, 248, 0.15) 100%);
    border: 1px dashed var(--accent-primary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.mission-box h4 {
    color: var(--accent-primary);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quiz-option {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--accent-primary);
}

.quiz-option.correct {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.quiz-option.wrong {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.feedback-msg {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

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

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: var(--border-color); 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted); 
}


/* Added for Python/Java backward compatibility */
.metaphor { background-color: var(--accent-color, #f0f0f0); border-left: 5px solid var(--primary-color, #ccc); padding: 15px; margin: 20px 0; border-radius: 0 10px 10px 0; }
.metaphor strong { color: var(--secondary-color, #333); }
.summary-box { background-color: #ecf0f1; color: #2c3e50; padding: 30px; border-radius: 15px; margin-top: 50px; border: 2px solid var(--primary-color, #bdc3c7); }
.summary-box h2 { color: #2c3e50; border-bottom: 2px solid var(--primary-color, #bdc3c7); }
code { font-family: 'Consolas', 'Monaco', monospace; }
.kw { color: #c678dd; }
.fn { color: #61afef; }
.str { color: #98c379; }
.num { color: #d19a66; }
.cmt { color: #5c6370; font-style: italic; }
.cls { color: #e5c07b; }
.op { color: #56B6C2; }
details { margin-top: 10px; background-color: #fff; padding: 15px; border-radius: 10px; color: #333; }
.badge { background-color: var(--primary-color); color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.8em; margin-left: 5px; }
/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; background-color: white; color: #333; }
th, td { padding: 12px; text-align: left; border: 1px solid #ddd; }
th { background-color: var(--primary-color); color: white; }


/* Restoring Headers and Constraints */
header { text-align: center; margin-bottom: 40px; padding: 40px 0; background: linear-gradient(135deg, var(--primary-color, #E76F00), var(--accent-color, #f39c12)); color: white; border-radius: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
header h1 { color: white; margin: 0; font-size: 2.5em; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
header p { color: white; font-size: 1.2em; opacity: 0.95; font-weight: bold; }
.container > section, .section > section { background: var(--card-bg, #fff); padding: 30px; margin: 0 auto 30px auto; border-radius: 15px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); color: var(--text-color, #333); max-width: 900px; }
.section h2, .container section h2 { border-bottom: 3px solid var(--primary-color, #E76F00); padding-bottom: 10px; display: inline-block; margin-top: 0; color: var(--secondary-color, #333); }


header { max-width: 900px; margin: 0 auto 40px auto; }
.summary-box { max-width: 900px; margin: 50px auto 30px auto; }


/* Code Block Dark Background Fix */
pre {
    background-color: #282c34 !important;
    color: #abb2bf !important;
    padding: 20px !important;
    border-radius: 10px !important;
    margin: 20px 0 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    border: 1px solid #1e2227;
}

/* Force Text to be Dark inside Modules */
.container > section, .section > section {
    color: #222 !important;
}
.container > section p, .section > section p, 
.container > section ul, .section > section ul,
.container > section li, .section > section li,
.container > section div, .section > section div {
    color: #222;
}



/* Scrollable Sidebar Links */
.nav-links {
    flex: 1;
    overflow-y: auto;
}

/* Metaphor Icon Consistency */
.metaphor-icon {
    font-size: 1.8em;
    margin-right: 12px;
    vertical-align: middle;
}

/* Visual Train/Mailbox Tables used in Indexing Chapters */
.train-container, .mailbox-container {
    display: flex;
    justify-content: center;
    background-color: rgba(100,100,100,0.05);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    overflow-x: auto;
}
.train-car, .mailbox {
    border: 2px solid var(--primary-color, #673AB7);
    padding: 10px;
    margin: 2px 4px;
    background-color: #fff;
    border-radius: 5px;
    text-align: center;
    min-width: 45px;
}
.train-index, .mailbox-num {
    font-size: 0.85em;
    color: #666;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 5px;
    padding-bottom: 3px;
}
.train-char, .mailbox-content {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color, #673AB7);
}



/* Sidebar Nav Unification */
.nav-item {
    font-size: 1rem !important;
}
.nav-item svg {
    width: 1.4em !important;
    height: 1.4em !important;
    min-width: 1.4em !important;
    flex-shrink: 0;
}



/* Ordered List Indent Fix */
ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.container > section ol, .section > section ol {
    margin-left: 2rem;
    color: #222;
}

/* Overall Design Polish & Animations */
.container > section p, .section > section p {
    line-height: 1.7;
    letter-spacing: -0.01em;
}
.container > section, .section > section {
    transition: transform 0.3s ease, box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}
.container > section:hover, .section > section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    z-index: 2;
}
.metaphor {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.metaphor:hover {
    transform: translateX(3px);
    border-left-width: 8px;
}
pre {
    line-height: 1.6 !important;
    font-size: 0.95em !important;
}


/* ============================================================
   🎨 Python Materials - Visual Overhaul (포인트가 한눈에!)
   ============================================================ */

/* --- Section h2 제목: 그라데이션 밑줄 강화 --- */
.section h2, .container section h2 {
    border-bottom: 3px solid transparent !important;
    border-image: linear-gradient(90deg, var(--primary-color, #E76F00), var(--accent-color, #f39c12), transparent) 1 !important;
    padding-bottom: 12px !important;
    margin-bottom: 20px !important;
    font-size: 1.4em !important;
    color: var(--secondary-color, #2c3e50) !important;
    letter-spacing: -0.02em;
}

/* --- 🐍 비유 박스 (Metaphor Box): 그라데이션 + 포인트 강조 --- */
.metaphor {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border-left: 6px solid var(--primary-color, #f59e0b) !important;
    border-radius: 0 14px 14px 0 !important;
    padding: 22px 26px !important;
    margin: 24px 0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    position: relative;
    overflow: hidden;
}
.metaphor::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35));
    pointer-events: none;
}
.metaphor strong {
    color: #92400e !important;
    font-size: 1.05em;
}

/* --- 인라인 코드 하이라이트 --- */
.container > section code, .section > section code {
    background-color: rgba(100, 100, 120, 0.1);
    color: #c7254e;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.92em;
    font-weight: 500;
    border: 1px solid rgba(100, 100, 120, 0.12);
}
/* pre 내부의 code에는 위 스타일이 겹치면 안 됨 */
pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    font-weight: normal !important;
}

/* --- details/summary 정답 토글 강화 --- */
details {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 16px !important;
}
details[open] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
details summary {
    padding: 14px 20px !important;
    cursor: pointer;
    font-weight: 600 !important;
    color: var(--primary-color, #3b82f6) !important;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), transparent);
    border-radius: 12px;
    transition: background 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
details summary::before {
    content: '▶';
    font-size: 0.7em;
    transition: transform 0.3s ease;
    display: inline-block;
}
details[open] summary::before {
    transform: rotate(90deg);
}
details summary:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), transparent);
}
details > div, details > p {
    padding: 16px 20px !important;
    border-top: 1px solid #e2e8f0;
}

/* --- 테이블 디자인 강화 --- */
table {
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: none !important;
}
th {
    background: linear-gradient(135deg, var(--primary-color, #E76F00), var(--accent-color, #f39c12)) !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}
td {
    border-color: #f1f5f9 !important;
}
tr:nth-child(even) td {
    background-color: #f8fafc;
}
tr:hover td {
    background-color: #fef3c7;
    transition: background-color 0.2s ease;
}

/* --- 요약 박스 (Summary Box) 개선 --- */
.summary-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 2px solid var(--primary-color, #38bdf8) !important;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
    position: relative;
    overflow: hidden;
}
.summary-box::before {
    content: '📌';
    position: absolute;
    top: -5px;
    right: 15px;
    font-size: 3em;
    opacity: 0.08;
}
.summary-box h2 {
    color: #0c4a6e !important;
    border-bottom-color: var(--primary-color, #38bdf8) !important;
}
.summary-box li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* --- 섹션 카드 미세 개선 --- */
.container > section, .section > section {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}
.container > section:hover, .section > section:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08) !important;
}

/* --- strong 태그 포인트 컬러 --- */
.container > section strong, .section > section strong {
    color: #1e293b;
    font-weight: 700;
}

/* --- 문제/퀴즈 박스 (mission-box) 강화 --- */
.mission-box {
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(255, 255, 255, 0.8) 100%) !important;
    border: 2px dashed var(--primary-color) !important;
    border-radius: 14px !important;
    padding: 28px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}
.mission-box::before {
    content: '🎯';
    position: absolute;
    top: -5px;
    right: 15px;
    font-size: 3em;
    opacity: 0.08;
}
.mission-box h4 {
    color: var(--secondary-color) !important;
    font-size: 1.25rem !important;
}

/* --- 헤더 아래 부제 개선 --- */
header p {
    font-size: 1.15em !important;
    opacity: 0.92 !important;
    margin-top: 8px;
}



/* Sidebar Toggle Styles */
.sidebar {
    position: relative;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed {
    margin-left: -280px;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background-color: #1e293b;
    border: 1px solid #0f172a;
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 1.2rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-toggle-btn:hover {
    background-color: #38bdf8;
    color: #ffffff;
}


/* ===================================================
   Interactive Quiz System (Modern 5-Question Exam)
   =================================================== */
.interactive-quiz-card {
    background-color: #ffffff !important;
    border: 2px solid var(--primary-color, #ff9f43);
    border-radius: 16px;
    padding: 28px;
    margin: 30px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    color: #222 !important;
}

.quiz-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.quiz-title-area h2 {
    margin: 0 !important;
    font-size: 1.45rem !important;
    color: var(--secondary-color, #1e293b) !important;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-title-area p {
    margin: 6px 0 0 0 !important;
    font-size: 0.95rem;
    color: #64748b !important;
}

.quiz-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    border: 1px solid #cbd5e1;
    transition: all 0.3s ease;
}

.quiz-progress-badge.completed {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.quiz-item-block {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 22px;
    transition: all 0.25s ease;
}

.quiz-item-block:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.quiz-q-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.quiz-q-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.5;
}

.quiz-q-num {
    color: var(--primary-color, #e67e22);
    margin-right: 6px;
    font-weight: 800;
}

.quiz-result-tag {
    display: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.quiz-result-tag.correct {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.quiz-result-tag.wrong {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.quiz-options-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #334155 !important;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0 !important;
}

.quiz-option-label:hover {
    border-color: var(--primary-color, #3b82f6);
    background: #f1f5f9;
}

.quiz-option-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    outline: none;
    display: grid;
    place-content: center;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quiz-option-label input[type="radio"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.15s transform ease-in-out;
    background-color: var(--primary-color, #3b82f6);
}

.quiz-option-label input[type="radio"]:checked {
    border-color: var(--primary-color, #3b82f6);
}

.quiz-option-label input[type="radio"]:checked::before {
    transform: scale(1);
}

.quiz-option-label.is-selected {
    border-color: var(--primary-color, #3b82f6);
    background: #eff6ff;
    font-weight: 600;
}

/* Graded state styles */
.quiz-option-label.ans-correct {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
    font-weight: 700;
}

.quiz-option-label.ans-wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.quiz-option-label.ans-correct::after {
    content: " (정답 ✔)";
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 700;
    margin-left: auto;
}

.quiz-option-label.ans-wrong::after {
    content: " (선택한 오답 ✖)";
    font-size: 0.85rem;
    color: #ef4444;
    font-weight: 700;
    margin-left: auto;
}

.quiz-explanation-box {
    display: none;
    margin-top: 14px;
    padding: 14px 18px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: #1e3a8a !important;
}

.quiz-explanation-box strong {
    color: #1e40af;
}

.quiz-bottom-panel {
    margin-top: 25px;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.quiz-guide-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    padding: 16px;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.95rem;
}

.quiz-score-summary {
    display: none;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    padding: 24px;
    border-radius: 12px;
    animation: fadeIn 0.4s ease;
}

.quiz-score-summary.perfect {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}

.quiz-score-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
}

.quiz-score-number span {
    color: var(--primary-color, #e67e22);
}

.quiz-score-msg {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 16px;
}

.quiz-reset-btn {
    background: var(--primary-color, #e67e22);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.quiz-reset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}
