﻿/* ===== 内嵌字体：把电脑上的 Noto Serif SC 打包进网页 =====
   手机上没装这个字体也能显示成同样的宋体风格。
   桌面端如果已经装了同名字体，会直接用本地的，不下载文件。 */
@font-face {
  font-family: "Noto Serif SC Web";
  src: local("Noto Serif SC"), local("NotoSerifSC-VF"), url("fonts/noto-serif-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC Web";
  src: local("Noto Serif SC"), local("NotoSerifSC-VF"), url("fonts/noto-serif-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* =========================================================
   多学亿点 · 界面样式
   气质：宣纸 + 青绿 + 印章红，手绘边框，护眼低对比
   ========================================================= */

:root {
  /* 主色：青绿 */
  --green-deep: #25543c;
  --green-mid: #3f7a58;
  --green: #5c9a72;
  --green-light: #c6dcc9;
  --green-pale: #eef5ee;

  /* 文字 */
  --ink: #22312a;
  --ink-2: #52675c;
  --ink-3: #8a9c90;

  /* 纸张与点缀 */
  --paper: #fbfaf2;
  --paper-2: #f4f2e6;
  --seal: #a63a2f;
  --seal-pale: #fbeeec;
  --gold: #b58a4f;

  --shadow-sm: 0 2px 8px rgba(34, 60, 44, .08);
  --shadow-md: 0 14px 30px -18px rgba(34, 60, 44, .55);

  --font-serif: "Noto Serif SC Web", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 12% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(900px 460px at 102% -4%, #e7f1e6 0%, rgba(231, 241, 230, 0) 58%),
    linear-gradient(158deg, #eff5ec 0%, #dfeee0 46%, #cde2d1 100%);
  background-attachment: scroll;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 两侧的淡青色晕染，纯装饰 */
.bamboo-decoration {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: .55;
  background: radial-gradient(circle, rgba(122, 179, 141, .55), rgba(122, 179, 141, 0) 70%);
  z-index: 0;
}
.bamboo-decoration.left { left: -150px; bottom: -120px; }
.bamboo-decoration.right { right: -140px; top: -110px; }

/* ---------- 手绘纸质卡片 ---------- */
.hand-drawn {
  position: relative;
  z-index: 1;
  border: 1.5px solid rgba(37, 84, 60, .32);
  border-radius: 18px 24px 16px 26px / 24px 16px 26px 18px;
  background: linear-gradient(180deg, #fffef9 0%, #f8f7ec 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .85);
}

/* ---------- 按钮 ---------- */
.btn-primary {
  width: 100%;
  padding: 15px;
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: .18em;
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #4d8a63 0%, var(--green-deep) 100%);
  box-shadow: 0 10px 20px -12px rgba(37, 84, 60, .95);
  transition: transform .16s ease, box-shadow .22s ease, filter .22s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -12px rgba(37, 84, 60, 1);
  filter: brightness(1.04);
}
.btn-primary:active { transform: translateY(0) scale(.994); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }

.btn-small {
  padding: 8px 16px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--green-deep);
  background: rgba(255, 255, 255, .7);
  border: 1.5px solid var(--green-light);
  border-radius: 11px;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-small:hover {
  border-color: var(--green-mid);
  background: var(--green-pale);
  transform: translateY(-1px);
}
.btn-small:active { transform: translateY(0); }

.header-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: -6px;
  margin-right: 8px;
}

/* 强调按钮（刷错题） */
.btn-strong {
  background: linear-gradient(135deg, #4d8a63, #25543c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px -9px rgba(37, 84, 60, .95);
}
.btn-strong:hover {
  background: linear-gradient(135deg, #56956c, #2d6446);
  color: #fff;
  border-color: transparent;
}

.btn-primary:focus-visible,
.btn-small:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid rgba(92, 154, 114, .45);
  outline-offset: 2px;
}

/* ---------- 登录页 ---------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 404px;
  padding: 46px 36px 38px;
  text-align: center;
  animation: fadeUp .45s ease both;
}
.login-card::before {
  /* 顶部一道压印感的细线，像信笺抬头 */
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
}
.title {
  font-size: 2.35rem;
  color: var(--green-deep);
  letter-spacing: .18em;
  text-indent: .18em;
  line-height: 1.3;
}
.subtitle {
  font-size: .9rem;
  color: var(--green-mid);
  margin: 10px 0 34px;
  letter-spacing: .32em;
  text-indent: .32em;
}
.subtitle::after {
  /* 标题下的一道细线，像古籍的界栏 */
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--green-light), var(--green-mid), var(--green-light), transparent);
}
.form-group { text-align: left; margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .85rem;
  color: var(--ink-2);
  margin-bottom: 7px;
  letter-spacing: .12em;
}
.form-group input {
  width: 100%;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fffef8;
  border: 1.5px solid var(--green-light);
  border-radius: 12px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.form-group input::placeholder { color: #b0bfb4; }
.form-group input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 4px rgba(92, 154, 114, .14);
}
.error-msg {
  color: var(--seal);
  font-size: .85rem;
  margin-top: 12px;
  min-height: 1.2em;
}
.float-actions {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.float-actions .icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
/* 背景音乐关闭时：图标加一道删除线，一眼能看出是关的 */
.icon-btn.music-off { text-decoration: line-through; opacity: .5; filter: grayscale(1); }

/* ---------- 顶栏 ---------- */
.app-page { padding-bottom: 64px; }
.top-bar {
  position: relative;   /* 跟随页面滚动，不再吸顶遮挡内容 */
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 980px;
  margin: 12px auto 0;
  padding: 12px 20px;
  background: #fffef6;
}
.logo {
  font-size: 1.22rem;
  font-weight: bold;
  color: var(--green-deep);
  letter-spacing: .08em;
  white-space: nowrap;
}
.logo-mark { margin-right: 6px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  font-size: .88rem;
  font-weight: bold;
  color: var(--green-deep);
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  background: #fffef8;
  border: 1.5px solid var(--green-light);
  border-radius: 12px;
  transition: all .18s ease;
}
.icon-btn:hover { border-color: var(--green-mid); transform: translateY(-1px); }
.icon-btn.muted { opacity: .55; filter: grayscale(1); }

/* ---------- 首页 ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green-deep);
  font-size: 1.08rem;
  letter-spacing: .14em;
  margin: 30px 0 14px;
}
.section-icon {
  flex: none;
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  padding: 4px;
  object-fit: contain;
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 20px;
}
.module-card {
  padding: 24px 22px 22px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .26s ease;
}
.module-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  opacity: .85;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px -20px rgba(34, 60, 44, .7), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.module-card:active { transform: translateY(-1px); }
.card-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  object-fit: contain;
  transition: transform .25s ease;
}
.module-card:hover .card-icon { transform: translateY(-2px) scale(1.05); }
.module-card h2 {
  font-size: 1.12rem;
  color: var(--green-deep);
  margin-bottom: 7px;
  letter-spacing: .04em;
}
.module-card p { font-size: .87rem; color: var(--ink-2); }
.card-arrow {
  position: absolute;
  right: 20px;
  top: 22px;
  color: rgba(63, 122, 88, .38);
  font-size: 1.1rem;
  transition: transform .22s ease, color .22s ease;
}
.module-card:hover .card-arrow { transform: translateX(3px); color: var(--green-mid); }

/* ---------- 面板通用 ---------- */
.quiz-panel {
  max-width: 820px;
  margin: 22px auto;
  padding: 28px 30px 26px;
  animation: fadeUp .3s ease both;
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px dashed var(--green-light);
}
.quiz-header h3 {
  font-size: 1.05rem;
  color: var(--green-deep);
  letter-spacing: .05em;
  font-weight: 700;
}
.badge {
  flex: none;
  padding: 6px 13px;
  font-size: .82rem;
  color: var(--green-deep);
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- 章节列表 ---------- */
.chapter-list { display: flex; flex-direction: column; gap: 14px; }
.chapter-item { padding: 16px 18px; transition: box-shadow .2s ease, transform .2s ease; }
.chapter-item.is-done { border-color: rgba(63, 122, 88, .55); background: linear-gradient(180deg, #fdfff9, #f2f8f1); }
.chapter-item.is-locked {
  background: linear-gradient(180deg, #f7f7f2, #efefe7);
  border-color: #dcdcd0;
  box-shadow: none;
}
.chapter-head { display: flex; align-items: center; gap: 12px; }
.chapter-index {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: .85rem;
  font-weight: bold;
  color: var(--green-deep);
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: 50%;
}
.is-locked .chapter-index { color: var(--ink-3); background: #eee; border-color: #ddd; }
.chapter-head h4 {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  color: var(--green-deep);
  line-height: 1.45;
}
.is-locked .chapter-head h4 { color: var(--ink-3); font-weight: 500; }
.status-pill {
  flex: none;
  padding: 4px 11px;
  font-size: .76rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill-done { color: #1f6b45; background: #e7f6ea; border-color: #bfe3c8; }
.pill-todo { color: #8a6a2c; background: #fbf4e2; border-color: #e9d9b3; }
.pill-locked { color: var(--ink-3); background: #f0f0e9; border-color: #dfdfd4; }
.chapter-actions { display: flex; gap: 10px; margin-top: 13px; padding-left: 46px; }
.chapter-note { margin-top: 8px; padding-left: 46px; font-size: .84rem; color: var(--ink-3); }

/* ---------- 刷题 / 考试内容 ---------- */
/* 断点续做提示条 */
.resume-note {
  margin: 0 0 16px;
  padding: 9px 14px;
  font-size: .85rem;
  color: #25543c;
  background: #eaf5ec;
  border: 1px solid #c6dcc9;
  border-radius: 10px;
  animation: popIn .25s ease both;
}

.quiz-content { min-height: 150px; }
#q-content {
  font-size: 1.16rem;
  line-height: 1.75;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--ink);
}
.quiz-hint {
  font-size: .82rem;
  color: var(--ink-3);
  letter-spacing: .04em;
  margin-bottom: 18px;
}
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  background: #fffdf6;
  border: 1.5px solid var(--green-light);
  border-radius: 13px;
  cursor: pointer;
  transition: all .16s ease;
}
.option-btn:hover {
  border-color: var(--green-mid);
  background: #fbfdf7;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.opt-letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: .86rem;
  font-weight: bold;
  color: var(--green-deep);
  background: var(--green-pale);
  border-radius: 50%;
  transition: all .16s ease;
}
.opt-text { flex: 1; }
.option-btn.correct {
  border-color: var(--green-mid);
  background: #eaf5ec;
  color: #1f4f38;
  font-weight: bold;
}
.option-btn.correct .opt-letter { background: var(--green-mid); color: #fff; }
.option-btn.wrong {
  border-color: var(--seal);
  background: var(--seal-pale);
  color: var(--seal);
  font-weight: bold;
}
.option-btn.wrong .opt-letter { background: var(--seal); color: #fff; }
.option-btn.locked { pointer-events: none; }
.option-btn.locked:not(.correct):not(.wrong) { opacity: .55; }

/* 考试里的单选圆点隐藏起来，改用字母圆圈表示选中 */
.option-btn { position: relative; }
.option-btn input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.option-btn.picked {
  border-color: var(--green-mid);
  background: #eaf5ec;
}
.option-btn.picked .opt-letter { background: var(--green-mid); color: #fff; }

.blank-input {
  width: 100%;
  padding: 15px;
  font-family: inherit;
  font-size: 1.08rem;
  color: var(--ink);
  background: #fffef8;
  border: 1.5px solid var(--green-light);
  border-radius: 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.blank-input::placeholder { color: #b0bfb4; }
.blank-input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 4px rgba(92, 154, 114, .14);
}
.quiz-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}
/* 考试页底部的「上一题 / 下一题 / 交卷」平均分宽，不出界 */
#view-exam .quiz-footer .btn-primary,
#view-exam .quiz-footer .btn-small {
  flex: 1;
  width: auto;
}

/* 判分反馈条 */
.feedback {
  margin-top: 16px;
  padding: 14px 16px;
  line-height: 1.65;
  font-size: .95rem;
  background: rgba(255, 255, 255, .82);
  border-left: 4px solid var(--seal);
  border-radius: 0 10px 10px 0;
  color: var(--seal);
  animation: popIn .24s ease both;
}

/* ---------- 考试 ---------- */
#exam-single-container { font-size: 1.02rem; line-height: 1.7; }
#exam-single-container .option-btn { cursor: pointer; }
#exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: bold;
  color: var(--seal);
  background: var(--seal-pale);
  border: 1px solid #eecfcb;
  border-radius: 999px;
  padding: 6px 14px;
}
.exam-scroll-area { max-height: 500px; overflow-y: auto; padding-right: 8px; }
.exam-item { margin-bottom: 18px; line-height: 1.65; }
.exam-item p { margin-bottom: 8px; }

/* ---------- 结果页 ---------- */
#result-score-area p:first-child { font-size: 1.6rem; letter-spacing: .04em; }
#result-score-area p + p { font-size: .95rem; color: var(--ink-2); margin-top: 6px; }

/* ---------- 学习档案 ---------- */
.chart-grid {
  display: flex;
  gap: 20px;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 18px;
}
.chart-container { width: 250px; display: flex; flex-direction: column; align-items: center; }
.time-label {
  margin-top: 12px;
  padding: 7px 16px;
  font-size: .88rem;
  font-weight: bold;
  color: var(--green-deep);
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--green-light);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* ---------- 登录进度条 ---------- */
.progress-wrap { margin-top: 18px; }
.progress-track {
  width: 100%;
  height: 11px;
  overflow: hidden;
  background: #e6efe6;
  border: 1px solid var(--green-light);
  border-radius: 999px;
}
.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9cfb4, #4a7c59, #25543c);
  background-size: 200% 100%;
  animation: flow 1.2s linear infinite;
  transition: width .25s ease;
}
.progress-text {
  margin-top: 10px;
  font-size: .82rem;
  color: var(--ink-2);
  letter-spacing: .1em;
}
@keyframes flow {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

/* ---------- 细节 ---------- */
#view-home { animation: fadeUp .35s ease both; }
.chapter-item:hover { box-shadow: 0 16px 28px -20px rgba(34, 60, 44, .55); }
.chapter-item.is-locked:hover { box-shadow: none; }
.option-btn:focus-visible,
.blank-input:focus-visible {
  outline: 3px solid rgba(92, 154, 114, .45);
  outline-offset: 2px;
}
::selection { background: rgba(92, 154, 114, .25); }
.exam-scroll-area::-webkit-scrollbar { width: 8px; }
.exam-scroll-area::-webkit-scrollbar-thumb { background: var(--green-light); border-radius: 8px; }
.exam-scroll-area::-webkit-scrollbar-track { background: transparent; }

/* ---------- 动效 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 移动端 ---------- */
@media screen and (max-width: 768px) {
  .container { padding: 0 14px; }
  .top-bar {
    margin: 8px 10px 0;
    padding: 10px 14px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .logo { font-size: .98rem; letter-spacing: .04em; }
  .top-actions { gap: 6px; margin-left: auto; }
  .user-chip {
    padding: 4px 9px;
    font-size: .76rem;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-bar .icon-btn { width: 34px; height: 34px; border-radius: 10px; font-size: .92rem; }
  .top-bar .btn-small { padding: 6px 10px; font-size: .82rem; }
  .section-title { margin: 24px 0 12px; }
  .module-grid { grid-template-columns: 1fr; gap: 14px; }
  .module-card { padding: 18px 18px 16px; }
  .card-icon { width: 52px; height: 52px; margin-bottom: 8px; }
  .section-icon { width: 38px; height: 38px; border-radius: 11px; }
  .module-card h2 { font-size: 1.05rem; }
  .card-arrow { display: none; }
  .options-grid { grid-template-columns: 1fr; }
  .quiz-panel { margin: 14px 10px; padding: 18px 16px; }
  .quiz-header { flex-wrap: wrap; row-gap: 10px; }
  .quiz-footer { flex-direction: column; }
  .quiz-footer button { width: 100%; }
  .chapter-actions { padding-left: 0; }
  .chapter-note { padding-left: 0; }
  .chart-container { width: 100%; }
  .login-card { padding: 38px 26px 32px; }
}









