/* ================================
   红外芯片知识工坊 - 设计系统
   主色：红外感应色 #DC2626（深红）
   辅色：科技蓝 #1E40AF
   背景：深色科技风
================================ */

:root {
  --primary: #DC2626;
  --primary-light: #FCA5A5;
  --primary-dark: #991B1B;
  --accent: #F59E0B;
  --accent-light: #FDE68A;
  --blue: #3B82F6;
  --green: #10B981;
  --purple: #8B5CF6;
  --pink: #EC4899;
  --red: #EF4444;

  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-hover: #243248;
  --border: #334155;
  --border-light: #475569;

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
}

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

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

/* ===== 导航 ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex; gap: 4px; list-style: none;
}

.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ===== Hero区 ===== */
.hero {
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 100%;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(220,38,38,0.15), transparent);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(220,38,38,0.15);
  border: 1px solid rgba(220,38,38,0.3);
  color: var(--primary-light); font-size: 13px; font-weight: 500;
  padding: 4px 12px; border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -1px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: white; border: none; cursor: pointer;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 0.2s;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  cursor: pointer; padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 500;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 0.2s;
}

.btn-secondary:hover { background: var(--bg-card); border-color: var(--text-secondary); }

/* ===== 动画区 ===== */
.hero-animation {
  max-width: 600px; margin: 60px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; min-height: 64px;
  display: flex; align-items: center; justify-content: center;
}

.anim-item {
  display: none; text-align: center;
  animation: fadeIn 0.5s ease;
}

.anim-item.active { display: block; }

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

.anim-term {
  font-size: 20px; font-weight: 700; color: var(--accent);
  margin-bottom: 6px;
}

.anim-meaning { font-size: 14px; color: var(--text-secondary); }

/* ===== Stats ===== */
.stats {
  display: flex; gap: 0; justify-content: center;
  max-width: 500px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

.stat-item {
  flex: 1; padding: 20px 16px; text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 28px; font-weight: 800;
  color: var(--accent); display: block;
}

.stat-label {
  font-size: 13px; color: var(--text-secondary); margin-top: 2px;
}

/* ===== 分类卡片 ===== */
.section { padding: 60px 24px; max-width: 1100px; margin: 0 auto; }

.section-title {
  font-size: 24px; font-weight: 700; margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary); font-size: 15px; margin-bottom: 32px;
}

.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.category-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin: 0 auto 10px;
}

.category-name {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px; color: var(--text-muted);
}

/* ===== 知识卡片 ===== */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.knowledge-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: block; position: relative;
}

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

.knowledge-card.learned { border-color: rgba(16,185,129,0.4); }
.knowledge-card.learned::after {
  content: '✓';
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: white;
}

.card-origin {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 100px;
  display: inline-block; margin-bottom: 10px;
}

.card-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}

.card-meaning {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}

/* ===== 搜索框 ===== */
.search-bar {
  position: relative; max-width: 500px; margin: 0 0 24px;
}

.search-bar input {
  width: 100%; padding: 12px 16px 12px 44px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 15px; outline: none; transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--primary); }
.search-bar input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
}

/* ===== 过滤器 ===== */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(220,38,38,0.1); }

/* ===== 学习页 ===== */
.learn-container {
  max-width: 720px; margin: 0 auto; padding: 40px 24px;
}

.learn-progress-bar {
  background: var(--border); border-radius: 100px;
  height: 6px; margin-bottom: 32px; overflow: hidden;
}

.learn-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px; transition: width 0.4s ease;
}

.learn-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px; margin-bottom: 24px;
}

.learn-card-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}

.learn-id {
  background: var(--primary); color: white;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}

.learn-title { font-size: 26px; font-weight: 800; }

.learn-meaning {
  font-size: 17px; color: var(--accent); line-height: 1.6;
  padding: 16px; background: rgba(245,158,11,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; margin-bottom: 24px;
}

.learn-description {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 28px;
}

.learn-examples { margin-bottom: 28px; }

.learn-examples h4 {
  font-size: 14px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
}

.example-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 10px;
}

.example-word { font-size: 15px; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.example-meaning { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.example-explanation { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.learn-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.btn-learn-nav {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border); padding: 10px 20px;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}

.btn-learn-nav:hover { background: var(--bg-hover); }
.btn-learn-nav:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-mastered {
  background: var(--green); color: white; border: none;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}

.btn-mastered:hover { opacity: 0.9; }
.btn-mastered.done { background: var(--bg-card); color: var(--green); border: 1px solid var(--green); }

/* ===== 闪卡 ===== */
.flashcard-container {
  max-width: 580px; margin: 0 auto; padding: 40px 24px;
}

.flashcard-progress {
  text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 24px;
}

.flashcard-wrap {
  perspective: 1000px; height: 340px; margin-bottom: 28px; cursor: pointer;
}

.flashcard-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  position: relative;
}

.flashcard-wrap.flipped .flashcard-inner { transform: rotateY(180deg); }

.flashcard-front, .flashcard-back {
  position: absolute; width: 100%; height: 100%;
  backface-visibility: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
}

.flashcard-back { transform: rotateY(180deg); border-color: var(--primary); }

.flashcard-hint {
  font-size: 12px; color: var(--text-muted); margin-bottom: 20px; letter-spacing: 0.5px;
}

.flashcard-term {
  font-size: 28px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary);
}

.flashcard-origin {
  font-size: 12px; padding: 3px 10px; border-radius: 100px;
  display: inline-block;
}

.flashcard-answer {
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
}

.flashcard-answer strong { color: var(--accent); }

.flashcard-controls {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 20px;
}

.btn-fc {
  padding: 10px 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.2s;
}

.btn-fc-prev { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-fc-prev:hover { background: var(--bg-hover); }
.btn-fc-next { background: var(--primary); color: white; }
.btn-fc-next:hover { background: var(--primary-dark); }

.flashcard-shortcut {
  text-align: center; font-size: 12px; color: var(--text-muted);
}

.shortcut-key {
  display: inline-block; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 6px; font-size: 11px; margin: 0 2px;
}

/* ===== 进度页 ===== */
.progress-container {
  max-width: 800px; margin: 0 auto; padding: 40px 24px;
}

.progress-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 36px;
}

.progress-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}

.progress-stat-value {
  font-size: 36px; font-weight: 800; color: var(--accent);
}

.progress-stat-label {
  font-size: 13px; color: var(--text-muted); margin-top: 4px;
}

.progress-category-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

.progress-category-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 16px;
}

.progress-category-name { font-size: 14px; font-weight: 600; width: 80px; flex-shrink: 0; }

.progress-bar-wrap {
  flex: 1; height: 8px; background: var(--border); border-radius: 100px; overflow: hidden;
}

.progress-bar-fill {
  height: 100%; border-radius: 100px; transition: width 0.6s ease;
}

.progress-bar-label {
  font-size: 13px; color: var(--text-muted); width: 48px; text-align: right; flex-shrink: 0;
}

.mastered-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

.mastered-item {
  background: var(--bg-card); border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}

.mastered-check { color: var(--green); font-size: 16px; }

/* ===== 详情页 ===== */
.detail-container {
  max-width: 760px; margin: 0 auto; padding: 40px 24px;
}

.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 14px; text-decoration: none;
  margin-bottom: 24px; transition: color 0.2s;
}

.detail-back:hover { color: var(--text-primary); }

.detail-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; margin-bottom: 20px;
}

.detail-meaning-block {
  background: rgba(245,158,11,0.08); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 20px 0;
  font-size: 16px; color: var(--accent); line-height: 1.6;
}

.detail-description {
  font-size: 15px; color: var(--text-secondary); line-height: 1.9;
}

.detail-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 20px;
  color: var(--text-primary); padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.quiz-option {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  cursor: pointer; transition: all 0.2s; font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px;
}

.quiz-option:hover { border-color: var(--border-light); color: var(--text-primary); }
.quiz-option.correct { border-color: var(--green); background: rgba(16,185,129,0.1); color: var(--green); }
.quiz-option.wrong { border-color: var(--red); background: rgba(239,68,68,0.1); color: var(--red); }

.quiz-letter {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}

/* ===== 颜色标签 ===== */
.tag-行业基础 { background: rgba(59,130,246,0.15); color: #60A5FA; }
.tag-核心材料 { background: rgba(16,185,129,0.15); color: #34D399; }
.tag-性能指标 { background: rgba(245,158,11,0.15); color: #FCD34D; }
.tag-制造工艺 { background: rgba(239,68,68,0.15); color: #F87171; }
.tag-器件封装 { background: rgba(139,92,246,0.15); color: #A78BFA; }
.tag-图像系统 { background: rgba(236,72,153,0.15); color: #F472B6; }

/* ===== Footer ===== */
footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 40px 24px; text-align: center; margin-top: 80px;
}

.footer-tagline {
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px; color: var(--text-muted); max-width: 560px;
  margin: 0 auto; line-height: 1.7;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  /* 导航 */
  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(15,23,42,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 16px; border-radius: var(--radius-sm); }

  /* 汉堡菜单 */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* Hero */
  .hero { padding: 60px 16px 48px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 14px; line-height: 1.6; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons a { width: 100%; justify-content: center; }
  .hero-animation { margin: 40px auto 0; padding: 16px; }
  .anim-term { font-size: 18px; }
  .anim-meaning { font-size: 13px; }

  /* Stats */
  .stats { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
  .stat-item:last-child { border-bottom: none; }
  .stat-value { font-size: 24px; }

  /* Section */
  .section { padding: 40px 16px; }
  .section-title { font-size: 20px; }
  .section-subtitle { font-size: 14px; margin-bottom: 24px; }

  /* 分类卡片 */
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-card { padding: 16px 12px; }
  .category-icon { width: 36px; height: 36px; font-size: 18px; }
  .category-name { font-size: 13px; }

  /* 知识卡片 */
  .cards-grid { grid-template-columns: 1fr; gap: 12px; }
  .knowledge-card { padding: 16px; }
  .card-title { font-size: 15px; }
  .card-meaning { font-size: 13px; }

  /* 搜索框 */
  .search-bar { margin: 0 0 16px; }
  .search-bar input { font-size: 14px; padding: 10px 14px 10px 40px; }

  /* 过滤器 */
  .filter-bar { gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .filter-btn { padding: 6px 12px; font-size: 12px; white-space: nowrap; }

  /* 学习页 */
  .learn-container { padding: 24px 16px; }
  .learn-progress-bar { margin-bottom: 24px; }
  .learn-card { padding: 20px 16px; margin-bottom: 16px; }
  .learn-card-header { gap: 12px; margin-bottom: 20px; }
  .learn-id { width: 36px; height: 36px; font-size: 14px; }
  .learn-title { font-size: 20px; }
  .learn-meaning { font-size: 15px; padding: 14px; margin-bottom: 20px; }
  .learn-description { font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
  .learn-examples h4 { font-size: 13px; margin-bottom: 12px; }
  .example-item { padding: 14px; }
  .example-word { font-size: 14px; }
  .example-explanation { font-size: 12px; }

  .learn-nav { flex-direction: column; gap: 10px; }
  .btn-learn-nav, .btn-mastered { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }

  /* 闪卡 */
  .flashcard-container { padding: 24px 16px; }
  .flashcard-progress { font-size: 13px; margin-bottom: 16px; }
  .flashcard-wrap { height: 300px; margin-bottom: 20px; }
  .flashcard-front, .flashcard-back { padding: 24px 20px; }
  .flashcard-hint { font-size: 11px; margin-bottom: 16px; }
  .flashcard-term { font-size: 22px; }
  .flashcard-answer { font-size: 14px; }
  .flashcard-controls { flex-direction: column; gap: 10px; }
  .btn-fc { width: 100%; justify-content: center; padding: 12px 16px; }
  .flashcard-shortcut { display: none; }

  /* 进度页 */
  .progress-container { padding: 24px 16px; }
  .page-header { padding: 24px 0 24px; }
  .page-title { font-size: 24px; }
  .progress-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
  .progress-stat-card { padding: 16px; }
  .progress-stat-value { font-size: 28px; }
  .progress-stat-label { font-size: 12px; }
  .progress-category-list { gap: 10px; }
  .progress-category-row { padding: 14px; gap: 12px; }
  .progress-category-name { width: 70px; font-size: 13px; }
  .progress-bar-label { width: 40px; font-size: 12px; }
  .mastered-list { grid-template-columns: 1fr; }

  /* 详情页 */
  .detail-container { padding: 24px 16px; }
  .detail-back { margin-bottom: 16px; }
  .detail-header { padding: 20px; margin-bottom: 16px; }
  .detail-header h1 { font-size: 22px; }
  .detail-meaning-block { padding: 14px; font-size: 15px; }
  .detail-description { font-size: 14px; line-height: 1.7; }
  .detail-section { padding: 20px; margin-bottom: 16px; }
  .detail-section h3 { font-size: 15px; margin-bottom: 16px; }
  .quiz-option { padding: 12px 14px; font-size: 13px; }

  /* 按钮 */
  .btn-primary, .btn-secondary { padding: 10px 18px; font-size: 14px; width: 100%; justify-content: center; }

  /* Footer */
  footer { padding: 32px 16px; margin-top: 60px; }
  .footer-tagline { font-size: 16px; }
  .footer-desc { font-size: 13px; }
}

/* 小屏手机 */
@media (max-width: 375px) {
  .hero-title { font-size: 24px; }
  .category-grid { grid-template-columns: 1fr; }
  .progress-stats { grid-template-columns: 1fr; }
}

/* 桌面端隐藏菜单按钮 */
.menu-toggle { display: none; }

/* ===== 通用工具 ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-header { padding: 48px 24px 0; max-width: 1100px; margin: 0 auto; }
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.page-subtitle { font-size: 15px; color: var(--text-secondary); }
