/* ============================================================
   译林英语六上学习站 - 全局样式
   面向小学六年级孩子的友好明亮风格
   ============================================================ */

:root {
  --primary: #4A90D9;
  --primary-dark: #2F6FB3;
  --primary-light: #E8F1FB;
  --accent: #F5A623;
  --accent-light: #FFF3DC;
  --green: #27AE60;
  --green-light: #E8F8EE;
  --red: #E74C3C;
  --red-light: #FDECEA;
  --purple: #8E6BC5;
  --purple-light: #F0EAFB;
  --text: #2C3E50;
  --text-light: #7F8C8D;
  --bg: #F5F8FC;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
  --shadow-hover: 0 4px 20px rgba(44, 62, 80, 0.15);
  --radius: 14px;
}

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

html {
  font-size: 16px;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 0.6rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(47, 111, 179, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo .logo-icon {
  font-size: 1.6rem;
}

.logo small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
  display: block;
  line-height: 1.2;
}

.top-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.top-nav .nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-family: inherit;
}

.top-nav .nav-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.top-nav .nav-btn.active {
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 600;
}

/* ---------- 主内容区 ---------- */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1rem 4rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-light), #DCEBFB);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero h1 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.hero p {
  color: var(--text-light);
  font-size: 1rem;
}

.hero .hero-emoji {
  font-size: 3.5rem;
}

/* 单元卡片区 */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.8rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), transparent);
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}

.unit-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
  position: relative;
}

.unit-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.unit-card .unit-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.unit-card .unit-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.3rem 0 0.2rem;
}

.unit-card .unit-cn {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

.unit-card .progress-mini {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #ECF0F1;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2ECC71);
  border-radius: 999px;
  width: 0;
  transition: width 0.4s;
}

/* 功能导航卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
  margin-top: 0.6rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
}

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

.feature-card .feature-emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 0.5rem;
}

.feature-card .feature-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-card .feature-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* ---------- 单词学习页 ---------- */
.learning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.back-btn {
  background: var(--white);
  border: 1px solid #DCE6F2;
  color: var(--primary-dark);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.back-btn:hover {
  background: var(--primary-light);
}

/* 单元选择条 */
.unit-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.unit-tab {
  background: var(--white);
  border: 2px solid #E0E8F2;
  color: var(--text);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-family: inherit;
}

.unit-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.unit-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* 单词卡片学习 */
.word-study-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.word-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.word-card .word-en {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 1px;
  word-break: break-word;
}

.word-card .word-phon {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.word-card .word-cn {
  font-size: 1.4rem;
  color: var(--text);
  margin-top: 0.8rem;
  font-weight: 600;
}

.word-card .speak-btn {
  margin-top: 1.2rem;
  background: var(--accent);
  border: none;
  color: var(--white);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(245, 166, 35, 0.4);
}

.word-card .speak-btn:hover {
  transform: scale(1.1);
}

.word-card .word-index {
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.card-actions .action-btn {
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn.primary {
  background: var(--primary);
  color: var(--white);
}

.action-btn.primary:hover {
  background: var(--primary-dark);
}

.action-btn.ghost {
  background: var(--white);
  color: var(--text-light);
  border: 2px solid #E0E8F2;
}

.action-btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- 课文跟读页 ---------- */
.text-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}

.text-section .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--primary-light);
}

.text-section .section-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.text-section .section-name .badge {
  font-size: 0.7rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  font-weight: 600;
}

.text-section .print-btn {
  border: 1px solid var(--primary-light);
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.text-section .print-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.sentence-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sentence {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.sentence:hover {
  background: var(--primary-light);
}

.sentence.playing {
  background: var(--accent-light);
}

.sentence .play-ico {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.sentence.playing .play-ico {
  background: var(--accent);
  color: var(--white);
}

.sentence .sent-text {
  flex: 1;
}

.sentence .sent-en {
  font-size: 1.05rem;
  font-weight: 500;
}

.sentence .sent-cn {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.sentence .record-btn {
  flex-shrink: 0;
  border: none;
  background: var(--green-light);
  color: var(--green);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.sentence .record-btn:hover {
  background: var(--green);
  color: var(--white);
}

.sentence .record-btn.recording {
  background: var(--red);
  color: var(--white);
  animation: pulse 1s infinite;
}

.sentence .record-btn.listening {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.text-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.text-toolbar .tool-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid #DCE6F2;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
  font-family: inherit;
}

.text-toolbar .tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.text-toolbar .tool-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.text-toolbar .speed-select {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #DCE6F2;
  background: var(--white);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

/* ---------- 图文互动卡片 ---------- */
.scene-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--primary-light), #DCEBFB);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.scene-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.scene-card .scene-emoji {
  font-size: 2.6rem;
  flex-shrink: 0;
}

.scene-card .scene-info {
  flex: 1;
}

.scene-card .scene-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.scene-card .scene-cn {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.scene-card .scene-zoom-hint {
  font-size: 1.2rem;
  opacity: 0.6;
}

/* ---------- 课本原图图文互动 ---------- */
.text-pages {
  background: linear-gradient(135deg, var(--primary-light), #E8F1FB);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.tp-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.tp-img {
  display: none;
  max-width: 100%;
  max-height: 46vh;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: zoom-in;
  border: 3px solid var(--white);
}

.tp-img.active {
  display: inline-block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0.3; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.tp-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.tp-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.tp-arrow:hover {
  background: var(--primary);
  color: var(--white);
}

.tp-ind {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
  min-width: 3rem;
}

.tp-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

.scene-title-line {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 0.7rem;
  letter-spacing: 1px;
}

.scene-cn-line {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* ---------- 跟读结果 ---------- */
.follow-zone {
  margin-top: 0.4rem;
}

.follow-result {
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  margin-top: 0.3rem;
}

.follow-result.good {
  background: var(--green-light);
  border: 1px solid #A8E6C1;
}

.follow-result.mid {
  background: var(--accent-light);
  border: 1px solid #F7DCA8;
}

.follow-result.bad {
  background: var(--red-light);
  border: 1px solid #F5C2B9;
}

.follow-result .fr-score {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.follow-result.good .fr-score { color: var(--green); }
.follow-result.mid .fr-score { color: var(--accent); }
.follow-result.bad .fr-score { color: var(--red); }

.follow-result .fr-said {
  color: var(--text);
}

.follow-result .fr-ans {
  color: var(--text-light);
  font-size: 0.82rem;
}

/* excellent 喝彩 */
.celebrate-box {
  text-align: center;
  padding: 0.6rem 0;
}

.celebrate-box .celebrate-emoji {
  font-size: 4rem;
}

.celebrate-box .celebrate-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), #FF7A59);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  margin: 0.5rem 0;
}

.celebrate-box .celebrate-sub {
  color: var(--text-light);
  font-size: 0.95rem;
}

.celebrate-box .celebrate-beans {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  margin-top: 0.8rem;
}

/* ---------- 默写页 ---------- */
.dictation-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  max-width: 760px;
  margin: 0 auto;
}

.dict-mode-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.dict-mode-tab {
  flex: 1;
  min-width: 160px;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 2px solid #E0E8F2;
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: inherit;
}

.dict-mode-tab:hover {
  border-color: var(--primary);
}

.dict-mode-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dict-mode-tab .mode-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.dict-mode-tab .mode-desc {
  font-size: 0.78rem;
  color: var(--text-light);
}

.dict-question {
  text-align: center;
  padding: 1.4rem 1rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dict-question .q-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.dict-question .q-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.dict-question .listen-hint {
  margin-top: 0.8rem;
}

.dict-input-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dict-input {
  flex: 1;
  min-width: 220px;
  padding: 0.8rem 1.1rem;
  border: 2px solid #E0E8F2;
  border-radius: 12px;
  font-size: 1.1rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}

.dict-input:focus {
  border-color: var(--primary);
}

.dict-input.correct {
  border-color: var(--green);
  background: var(--green-light);
}

.dict-input.wrong {
  border-color: var(--red);
  background: var(--red-light);
}

.dict-submit-btn {
  padding: 0.8rem 1.8rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.dict-submit-btn:hover {
  background: var(--primary-dark);
}

.dict-result {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.05rem;
  min-height: 2rem;
  font-weight: 600;
}

.dict-result.ok {
  color: var(--green);
}

.dict-result.no {
  color: var(--red);
}

.dict-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.dict-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* 结果统计 */
.dict-done {
  text-align: center;
  padding: 1.6rem;
}

.dict-done .big-score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
}

.dict-done .score-detail {
  color: var(--text-light);
  margin: 0.5rem 0 1rem;
}

/* 错词本 */
.wrong-list {
  margin-top: 1.6rem;
}

.wrong-list h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wrong-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--red-light);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wrong-item .wi-en {
  font-weight: 700;
  color: var(--red);
}

.wrong-item .wi-cn {
  color: var(--text-light);
  font-size: 0.88rem;
}

.wrong-item .wi-ok-btn {
  border: none;
  background: var(--green);
  color: var(--white);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}

/* ---------- 练习页 ---------- */
.quiz-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  max-width: 760px;
  margin: 0 auto;
}

.quiz-question {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0.5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  padding: 0.9rem 1.2rem;
  border: 2px solid #E0E8F2;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  text-align: left;
}

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

.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-light);
}

.quiz-option.wrong {
  border-color: var(--red);
  background: var(--red-light);
}

/* ---------- 学习报告 ---------- */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.report-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.report-card .rc-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.report-card .rc-label {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.report-card .rc-emoji {
  font-size: 1.6rem;
}

/* 单元进度明细 */
.unit-progress-list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}

.unit-progress-list h3 {
  margin-bottom: 0.9rem;
}

.up-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #ECF2F5;
  flex-wrap: wrap;
}

.up-row:last-child {
  border-bottom: none;
}

.up-name {
  min-width: 200px;
  font-weight: 600;
  font-size: 0.95rem;
}

.up-bar {
  flex: 1;
  min-width: 120px;
  height: 10px;
  background: #ECF2F1;
  border-radius: 999px;
  overflow: hidden;
}

.up-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2ECC71);
  border-radius: 999px;
  width: 0;
  transition: width 0.4s;
}

.up-pct {
  font-size: 0.85rem;
  color: var(--text-light);
  min-width: 48px;
  text-align: right;
}

/* 学习记录时间线 */
.record-timeline {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.record-timeline h3 {
  margin-bottom: 0.9rem;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #ECF2F1;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.record-item:last-child {
  border-bottom: none;
}

.record-item .ri-time {
  color: var(--text-light);
  min-width: 100px;
  font-size: 0.82rem;
}

.record-item .ri-text {
  flex: 1;
}

.record-item .ri-stars {
  color: var(--accent);
  letter-spacing: 2px;
}

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-mask.show {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin-bottom: 0.8rem;
}

.modal-box .modal-body {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.modal-box .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* ---------- 通用按钮/提示 ---------- */
.btn {
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

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

.btn-green:hover {
  background: #1E9E54;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: #E09512;
}

.btn-ghost {
  background: var(--white);
  color: var(--text);
  border: 2px solid #E0E8F2;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--text);
  color: var(--white);
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 300;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 空状态 */
.empty-tip {
  text-align: center;
  color: var(--text-light);
  padding: 2.4rem 1rem;
  font-size: 0.95rem;
}

.empty-tip .big-emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 0.6rem;
}

/* ---------- Grammar time 语法板块 ---------- */
.grammar-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}

.grammar-table-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed var(--primary-light);
}

.gt-tip {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-light);
}

.verb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
}

.verb-item {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.verb-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(74, 144, 217, 0.25);
}

.verb-item:active {
  transform: scale(0.97);
}

.verb-item .v-a {
  font-weight: 700;
  color: var(--primary-dark);
}

.verb-item .v-arrow {
  color: var(--accent);
  font-weight: 700;
}

.verb-item .v-b {
  font-weight: 700;
  color: var(--red);
}

.verb-item .v-zh {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-light);
}

.ordinal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.ordinal-item {
  background: var(--accent-light);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.ordinal-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(245, 166, 35, 0.3);
}

.ordinal-item:active {
  transform: scale(0.97);
}

.ordinal-item .o-abbr {
  font-weight: 700;
  color: var(--accent);
  min-width: 2.6rem;
}

.ordinal-item .o-en {
  font-weight: 700;
  color: var(--text);
}

.ordinal-item .o-zh {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-light);
}

@media (max-width: 420px) {
  .verb-grid {
    grid-template-columns: 1fr;
  }

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

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .topbar {
    padding: 0.5rem 0.9rem;
  }

  .main {
    padding: 0.8rem 0.7rem 3rem;
  }

  .hero {
    padding: 1.4rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .word-card {
    padding: 1.4rem;
    min-height: 200px;
  }

  .word-card .word-en {
    font-size: 2rem;
  }

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

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

@media (max-width: 420px) {
  .unit-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
/* 全站页脚：备案号展示 */
.site-footer {
  text-align: center;
  padding: 18px 16px 22px;
  color: var(--text-light, #8a93a6);
  font-size: 0.78rem;
  line-height: 1.8;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.site-footer a {
  color: var(--text-light, #8a93a6);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.35);
  text-underline-offset: 4px;
  margin-left: 6px;
  transition: color .2s;
}
.site-footer a:hover {
  color: #fff;
  text-decoration-color: #fff;
}
