/* 高考物理课程 · 共享样式表
   所有课程与参考文档都链接此文件，保证整个课程外观统一。 */

:root {
  --bg: #fffef9;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #a0522d;       /* 主题色：赭石 */
  --accent-soft: #f3e6dd;
  --correct: #2e7d32;
  --correct-soft: #e8f5e9;
  --wrong: #c62828;
  --wrong-soft: #fdecea;
  --rule: #e0dcd2;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --ink: #e8e6df;
    --muted: #9a978d;
    --accent: #e0956b;
    --accent-soft: #3a2c22;
    --correct: #81c784;
    --correct-soft: #1b3320;
    --wrong: #ef9a9a;
    --wrong-soft: #3b1f1f;
    --rule: #35332a;
    --card: #201f18;
  }
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  line-height: 1.9;
  margin: 0;
  padding: 2rem 1.25rem 5rem;
  font-size: 17px;
}

article {
  max-width: 42rem;
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

h1 { font-size: 1.9rem; margin: 0 0 0.25rem; }
h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.05rem; margin-top: 1.8rem; }

.lesson-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  margin-bottom: 2.5rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

strong { color: var(--accent); }

/* 重点框 */
.key-box {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.key-box .label {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.3rem;
}

/* 误区警告 */
.pitfall {
  border: 1px dashed var(--wrong);
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 8px;
}
.pitfall .label {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--wrong);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.3rem;
}

/* 场景示意图容器 */
figure.scene {
  margin: 1.5rem 0;
  text-align: center;
}
figure.scene svg { max-width: 100%; height: auto; }
figure.scene figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  margin-top: 0.4rem;
}

/* 表格 */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
th, td {
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
th {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== 答题组件（quiz.js 渲染）===== */
.quiz-q {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}
.quiz-q .q-num {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.quiz-q .q-text { margin: 0.4rem 0 1rem; }
.quiz-q .q-text figure.scene { margin: 1rem 0 0.5rem; }

.quiz-options { display: grid; gap: 0.6rem; }
@media (min-width: 480px) {
  .quiz-options { grid-template-columns: 1fr 1fr; }
}

.quiz-options button {
  font: inherit;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-options button:hover:not(:disabled) { border-color: var(--accent); }
.quiz-options button:disabled { cursor: default; opacity: 0.75; }
.quiz-options button.correct {
  border-color: var(--correct);
  background: var(--correct-soft);
  opacity: 1;
  font-weight: 700;
}
.quiz-options button.wrong {
  border-color: var(--wrong);
  background: var(--wrong-soft);
  opacity: 1;
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.ok { background: var(--correct-soft); }
.quiz-feedback.no { background: var(--wrong-soft); }
.quiz-feedback .verdict {
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}
.quiz-feedback.ok .verdict { color: var(--correct); }
.quiz-feedback.no .verdict { color: var(--wrong); }

.quiz-score {
  text-align: center;
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1rem;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  margin: 2rem 0;
  display: none;
}
.quiz-score.show { display: block; }

/* 页脚导航 */
.lesson-footer {
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
}

/* 打印样式：参考文档要能打印得漂亮 */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; padding: 0; }
  .quiz-q, .no-print { display: none; }
  a { color: #000; }
}
