/* ========== 全局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Georgia', 'Noto Serif SC', 'Songti SC', serif;
    background-color: #F5F1EB;
    color: #4a3728;
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: #A87868; z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 30px;
    display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: -5px;  /* 图片和文字的间距 */
    margin-left: -160px;  /* 负值往左移，自己调数值 */
    font-size: 1.5em;
    font-weight: bold;
    color: #F5F1EB;
    text-decoration: none;
    letter-spacing: 3px;
    font-family: 'Georgia', serif;
}

.logo-img {
    height: 80px;   /* 图片高度，跟导航栏协调 */
    width: auto;
    object-fit: contain;
}
.nav-links { list-style: none; display: flex; gap: 8px; }
.nav-links a {
    color: #F5F1EB; text-decoration: none; padding: 8px 18px;
    border-radius: 20px; font-size: 0.95em; transition: all 0.3s ease; letter-spacing: 1px;
}
.nav-links a:hover, .nav-links a.active {
    background-color: rgba(245,241,235,0.2); color: #fff;
}

/* ========== 主体 ========== */
.main-content {
    padding-top: 100px; padding-bottom: 60px;
    max-width: 1120px; margin: 0 auto; padding-left: 40px; padding-right: 40px;
}

/* ========== 进度条 ========== */
.progress-bar {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 40px;
}
.progress-track {
    flex: 1; height: 8px; background: #e0d6cc; border-radius: 4px; overflow: hidden;
}
.progress-fill {
    height: 100%; width: 20%;
    background: linear-gradient(90deg, #B39B56, #A87868);
    border-radius: 4px; transition: width 0.4s ease;
}
.progress-text {
    font-size: 0.9em; color: #8b7265; white-space: nowrap; letter-spacing: 1px;
}

/* ========== 答题区 ========== */
.quiz-area { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.question-row {
    display: flex; align-items: stretch; gap: 24px;
    margin-bottom: 40px; margin-top: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.question-box {
    flex: 1;
    background: #fff;
    border: 2px solid #CAA59B;
    border-radius: 14px;
    padding: 30px 36px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(168,120,104,0.08);
}

.question-text {
    font-size: 1.8em; line-height: 1.8; color: #4a3728; text-align: left; letter-spacing: 0.5px;
}

/* ========== 选项区 - 2x2网格 ========== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 24px;
    background: #fff;
    border: 2px solid #CAA59B;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 80px;
}
.option-btn:hover {
    border-color: #A87868;
    box-shadow: 0 4px 16px rgba(168,120,104,0.15);
    transform: translateY(-2px);
}
.option-btn.selected { border-color: #A87868; background: rgba(168,120,104,0.08); }
.option-btn.correct { border-color: #2C8079; background: rgba(44,128,121,0.1); }
.option-btn.wrong { border-color: #B15736; background: rgba(177,87,54,0.08); }
.option-btn.disabled { pointer-events: none; opacity: 0.85; }

.option-label {
    display: flex; justify-content: center; align-items: center;
    width: 36px; height: 36px;
    background: #B39B56; color: #fff;
    border-radius: 50%; font-weight: 700; font-size: 1em;
    flex-shrink: 0;
}
.option-btn.correct .option-label { background: #2C8079; }
.option-btn.wrong .option-label { background: #B15736; }

.option-text { font-size: 1.4em; color: #4a3728; line-height: 1.5; }

/* ========== 答案与解析 ========== */
.answer-area {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.3s ease;
}
.answer-badge {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.answer-badge.correct { background: #2C8079; color: #fff; }
.answer-badge.wrong { background: #B15736; color: #fff; }

.explanation {
    background: #fff;
    border: 1px solid #e0d6cc;
    border-radius: 12px;
    padding: 20px 28px;
    font-size: 0.95em;
    color: #6b5348;
    line-height: 1.8;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

/* ========== 导航按钮 ========== */
.nav-buttons {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.nav-btn {
    padding: 12px 28px;
    background: #A87868; color: #F5F1EB;
    border: none; border-radius: 30px;
    font-size: 0.95em; cursor: pointer;
    transition: all 0.3s ease; letter-spacing: 1px;
}
.nav-btn:hover { background: #8e6355; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(168,120,104,0.3); }
.prev-btn { background: #e0d6cc; color: #6b5348; }
.prev-btn:hover { background: #d4c5b8; }
.prev-btn.hidden { visibility: hidden; }

/* ========== 结算页 ========== */
.result-area { text-align: center; padding: 40px 0; animation: fadeIn 0.5s ease; }
.result-card {
    background: #fff; border: 2px solid #CAA59B; border-radius: 20px;
    padding: 60px 40px; max-width: 500px; margin: 0 auto;
    box-shadow: 0 8px 32px rgba(168,120,104,0.15);
}
.result-title { font-size: 1.8em; color: #4a3728; margin-bottom: 20px; letter-spacing: 3px; }
.result-score {
    font-size: 3em; font-weight: 700; color: #A87868;
    margin-bottom: 16px; letter-spacing: 2px;
}
.result-desc { font-size: 1em; color: #8b7265; margin-bottom: 30px; line-height: 1.6; }
.restart-btn {
    padding: 14px 36px; background: #B39B56; color: #fff;
    border: none; border-radius: 30px; font-size: 1em;
    cursor: pointer; transition: all 0.3s ease; letter-spacing: 1px;
}
.restart-btn:hover { background: #9a8345; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(179,155,86,0.3); }

/* ========== 页脚 ========== */
.footer {
    background-color: #A87868; color: #F5F1EB;
    text-align: center; padding: 30px; font-size: 0.9em; letter-spacing: 1px; margin-top: 200px;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .question-box { padding: 20px; }
    .options-grid { gap: 12px; }
    .option-btn { padding: 14px 18px; min-height: 70px; }
}
@media (max-width: 600px) {
    .main-content { padding-left: 16px; padding-right: 16px; }
    .question-row { flex-direction: column; gap: 16px; }
    .options-grid { grid-template-columns: 1fr; }
    .option-btn { flex: none; width: 100%; }
    .nav-links a { padding: 6px 10px; font-size: 0.82em; }
}
