/* ============================================
   调饮培训 - 主样式表
   移动优先 / 响应式设计
   ============================================ */

/* ---------- 重置与基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #7FB069;
  --primary-dark: #5a8a4a;
  --secondary: #FFB300;
  --accent: #E91E63;
  --text-primary: #2c2c2c;
  --text-secondary: #6b6b6b;
  --text-tertiary: #9e9e9e;
  --bg-main: #fafaf7;
  --bg-card: #ffffff;
  --bg-section: #f5f3ee;
  --border: #ebe8e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ---------- 移动端隐藏 Hero 饮品图 ---------- */
.hero-drinks-preview { display: none; }
@media (min-width: 640px) { .hero-drinks-preview { display: block; } }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.drink-card-emoji,
.detail-hero-emoji,
.nav-icon,
.skill-icon,
.tea-card-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ---------- View 切换 ---------- */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* ---------- Hero 区域 ---------- */
.hero {
  position: relative;
  padding: 60px 20px 80px;
  overflow: hidden;
  color: white;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7FB069 0%, #5a8a4a 50%, #4a7a3a 100%);
  z-index: 0;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,179,0,0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* 技巧页 Hero 变体 */
.hero-bg-skills {
  background: linear-gradient(135deg, #D4A574 0%, #8B6914 50%, #5a4a2a 100%);
}

.hero-bg-skills::before {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(127,176,105,0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.hero-bg-skills::after {
  content: "🍵";
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 80px;
  opacity: 0.12;
  transform: rotate(-15deg);
}

.hero-bg::after {
  content: "🍃";
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 80px;
  opacity: 0.15;
  transform: rotate(-25deg);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.hero-drinks-preview {
  position: absolute;
  top: 0;
  right: -100px;
  width: 500px;
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.6) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.hero-drinks-img {
  width: 100%;
  height: auto;
  filter: blur(1px);
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: 15px;
  opacity: 0.92;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.25);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  opacity: 0.85;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.3);
}

/* ---------- 快速导航 ---------- */
.quick-nav {
  display: flex;
  gap: 10px;
  padding: 20px;
  background: var(--bg-card);
  margin: -30px 16px 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 5;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-item:hover, .nav-item:active {
  background: var(--bg-section);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.nav-icon {
  font-size: 24px;
  line-height: 1;
}

/* ---------- 通用 Section ---------- */
.section {
  padding: 50px 16px 30px;
  scroll-margin-top: 20px;
}

.section-tea { background: linear-gradient(180deg, transparent, rgba(127,176,105,0.05) 50%, transparent); }
.section-skills { background: linear-gradient(180deg, transparent, rgba(255,179,0,0.04)); }

.section-header { text-align: center; margin-bottom: 30px; }

.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 8px auto 0;
  border-radius: 2px;
}

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

/* ---------- 筛选标签 ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 16px;
  margin: 0 -16px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover { border-color: var(--primary); color: var(--primary-dark); }

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(127,176,105,0.3);
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: rgba(0,0,0,0.06);
  border-radius: 100px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
}
.filter-chip.active .chip-count { background: rgba(255,255,255,0.25); }

/* ---------- 排序栏 ---------- */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.sort-label {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.sort-btn {
  padding: 4px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.sort-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.sort-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- 饮品卡片 ---------- */
.drinks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.drink-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.drink-card:hover, .drink-card:active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.drink-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  overflow: hidden;
}

.drink-card-emoji {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  transition: var(--transition);
}

.drink-card:hover .drink-card-emoji { transform: scale(1.15) rotate(-5deg); }

.drink-card-photo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  transition: var(--transition);
}

.drink-card:hover .drink-card-photo { transform: scale(1.08); }

.drink-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}

.drink-badge {
  padding: 3px 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 10px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  width: fit-content;
}

.drink-badge.designated { background: rgba(127,176,105,0.95); color: white; }
.drink-badge.creative { background: rgba(255,143,0,0.95); color: white; }

.drink-card-difficulty {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 2px;
  z-index: 3;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 100px;
}

.difficulty-dot {
  width: 6px;
  height: 6px;
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
}

.difficulty-dot.active { background: #FF6B6B; }

.drink-card-body { padding: 14px 12px 16px; flex: 1; display: flex; flex-direction: column; }

.drink-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  line-height: 1.3;
}

.drink-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.drink-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.drink-card-meta span { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- 茶底卡片 ---------- */
.tea-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }

.tea-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-left: 4px solid var(--primary);
}

.tea-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  color: white;
  font-weight: 700;
}

.tea-card-content { flex: 1; }

.tea-card-name { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

.tea-card-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.tea-info-item {
  background: var(--bg-section);
  padding: 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.tea-info-label {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.tea-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.tea-card-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
}

.tea-card-tips {
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(127,176,105,0.06), rgba(127,176,105,0.02));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127,176,105,0.12);
}

.tea-tip-item {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tea-tip-item:not(:last-child) { border-bottom: 1px dashed rgba(127,176,105,0.15); }

.tea-tip-bullet { flex-shrink: 0; color: var(--primary); font-weight: 700; }

/* ---------- 冲泡注意事项 ---------- */
.section-tea-notes { background: linear-gradient(180deg, transparent, rgba(255,179,0,0.04) 50%, transparent); }

.tea-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tea-note-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tea-note-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.tea-note-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.tea-note-content { flex: 1; min-width: 0; }

.tea-note-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tea-note-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- 技巧卡片 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skill-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.skill-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.skill-icon {
  font-size: 32px;
  line-height: 1;
}

.skill-content { width: 100%; }

.skill-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }

.skill-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.skill-tips {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  animation: fadeIn 0.2s ease;
}

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

.skill-tip-item {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.skill-tip-bullet { flex-shrink: 0; color: var(--primary); font-weight: 700; }

/* ---------- 测验页 Hero ---------- */
.hero-bg-quiz {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.hero-bg-quiz::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.hero-bg-quiz::after {
  content: "📝";
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 80px;
  opacity: 0.12;
  transform: rotate(-10deg);
}

/* ---------- 测验组件 ---------- */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quiz-progress-text {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
  white-space: nowrap;
}

.quiz-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.quiz-question { margin-bottom: 20px; }

.quiz-q-num {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.quiz-q-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
}

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

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-section);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  text-align: left;
  transition: var(--transition);
  cursor: pointer;
  width: 100%;
}

.quiz-option:hover { border-color: #667eea; background: rgba(102,126,234,0.05); }

.quiz-option.selected {
  border-color: #667eea;
  background: rgba(102,126,234,0.1);
}

.quiz-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.quiz-option.selected .quiz-option-letter {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.quiz-option-text { flex: 1; }

.quiz-nav {
  display: flex;
  gap: 12px;
}

.quiz-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.quiz-btn-prev {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.quiz-btn-prev:hover:not(:disabled) { background: var(--bg-section); }

.quiz-btn-next {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.quiz-btn-next:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(102,126,234,0.4); }

.quiz-btn-submit {
  background: linear-gradient(135deg, #7FB069, #5a8a4a);
  color: white;
}

.quiz-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(127,176,105,0.4); }

/* ---------- 测验结果 ---------- */
.quiz-result { text-align: center; }

.quiz-result-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.quiz-result-grade {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
}

.quiz-result-num {
  font-size: 36px;
  font-weight: 800;
}

.quiz-result-num small { font-size: 18px; font-weight: 600; opacity: 0.6; }

.quiz-result-msg {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.quiz-result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.quiz-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.quiz-stat-num { font-size: 28px; font-weight: 800; }

.quiz-stat-label { font-size: 12px; color: var(--text-tertiary); }

.quiz-result-detail { text-align: left; margin-bottom: 24px; }

.quiz-detail-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.quiz-detail-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--border);
}

.quiz-detail-item.correct { border-left-color: #7FB069; }
.quiz-detail-item.wrong { border-left-color: #E91E63; }
.quiz-detail-item.unanswered { border-left-color: var(--text-tertiary); }

.quiz-detail-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.quiz-detail-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.quiz-detail-status {
  font-size: 14px;
  font-weight: 700;
}

.quiz-detail-item.correct .quiz-detail-status { color: #7FB069; }
.quiz-detail-item.wrong .quiz-detail-status { color: #E91E63; }
.quiz-detail-item.unanswered .quiz-detail-status { color: var(--text-tertiary); }

.quiz-detail-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.quiz-detail-answers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.quiz-correct-answer { color: #7FB069; }

.quiz-result-actions {
  display: flex;
  gap: 12px;
}

.quiz-btn-retry {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.quiz-btn-retry:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(102,126,234,0.4); }

.quiz-btn-back {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.quiz-btn-back:hover { background: var(--bg-section); }

/* ---------- 详情页 ---------- */
.detail-header {
  position: relative;
  padding: 60px 20px 30px;
  color: white;
  overflow: hidden;
}

.detail-back {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.detail-back:hover { background: white; transform: scale(1.05); }

.detail-hero-emoji {
  font-size: 100px;
  text-align: center;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
  margin-bottom: 16px;
  line-height: 1;
}

.detail-hero-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
  border: 4px solid rgba(255,255,255,0.5);
}

.detail-hero-name {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-hero-subtitle {
  font-size: 14px;
  opacity: 0.95;
  text-align: center;
  margin-bottom: 20px;
}

.detail-hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-tag {
  padding: 5px 12px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.3);
}

.detail-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  margin: 0 -4px;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.detail-meta-label { font-size: 10px; opacity: 0.85; }
.detail-meta-value { font-size: 14px; font-weight: 700; }

.detail-meta-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.3); }

.detail-body {
  background: var(--bg-main);
  margin-top: -20px;
  border-radius: 30px 30px 0 0;
  padding: 30px 20px 40px;
  position: relative;
  z-index: 2;
}

.detail-section { margin-bottom: 32px; }

.detail-section-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.detail-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* 描述 */
.detail-description {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

/* 配料表 */
.ingredients-list {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ingredient-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

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

.ingredient-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.ingredient-info { flex: 1; min-width: 0; }

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

.ingredient-note { font-size: 12px; color: var(--text-tertiary); }

.ingredient-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(127,176,105,0.1);
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ingredients-extra {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(255,179,0,0.08), rgba(255,143,0,0.05));
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1.5px dashed rgba(255,179,0,0.3);
}

.ingredients-extra-title {
  font-size: 14px;
  font-weight: 700;
  color: #B26A00;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 工具 */
.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-item {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tool-item::before { content: "🔧"; font-size: 12px; }

/* 步骤 */
.steps-list { display: flex; flex-direction: column; gap: 0; position: relative; }

.steps-list::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

.step-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  position: relative;
  align-items: flex-start;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(127,176,105,0.3);
}

.step-content {
  flex: 1;
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.step-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }

.step-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

/* 小贴士 */
.tips-list {
  background: linear-gradient(135deg, #fffaeb 0%, #fff5dc 100%);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 1px solid rgba(255,179,0,0.2);
}

.tips-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tips-item:not(:last-child) { border-bottom: 1px dashed rgba(255,179,0,0.2); }

.tips-bullet { flex-shrink: 0; color: #F57C00; font-weight: 700; }

/* ---------- 成果展示 ---------- */
.detail-poster {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.detail-poster img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- 焦点样式 ---------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
.filter-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 50;
}

.back-top.visible { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, transparent, rgba(127,176,105,0.05));
}

.footer-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.footer-sub { font-size: 12px; color: var(--text-tertiary); }

/* ---------- 平板 ---------- */
@media (min-width: 640px) {
  .hero { padding: 80px 32px 100px; }
  .hero-title { font-size: 48px; }
  .hero-subtitle { font-size: 17px; }
  .hero-drinks-preview { width: 600px; right: -80px; }
  .quick-nav { margin: -40px 32px 0; padding: 24px; }
  .section { padding: 60px 32px 40px; }
  .section-title { font-size: 30px; }
  .drinks-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .drink-card-name { font-size: 17px; }
  .drink-card-subtitle { font-size: 13px; }
  .tea-cards { grid-template-columns: repeat(3, 1fr); }
  .tea-notes-grid { grid-template-columns: repeat(4, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-hero-name { font-size: 40px; }
  .detail-hero-emoji { font-size: 120px; }
  .detail-hero-photo { width: 220px; height: 220px; }
  .detail-body { padding: 40px 32px 50px; max-width: 760px; margin-left: auto; margin-right: auto; }
}

/* ---------- 桌面 ---------- */
@media (min-width: 1024px) {
  .hero { padding: 100px 40px 120px; }
  .hero-title { font-size: 60px; }
  .hero-content { max-width: 700px; }
  .hero-drinks-preview { width: 800px; right: -120px; opacity: 0.2; }
  .quick-nav { max-width: 700px; margin: -40px auto 0; }
  .section { max-width: 1100px; margin: 0 auto; padding: 80px 40px 50px; }
  .drinks-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .drink-card-img { font-size: 80px; }
  .detail-hero-photo { width: 260px; height: 260px; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-header { padding: 80px 40px 50px; }
  .detail-back { top: 24px; left: 32px; }
  .back-top { right: 32px; bottom: 32px; }
}

/* ---------- 底部导航栏 (移动端) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  justify-content: center;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active svg {
  filter: drop-shadow(0 2px 6px rgba(127,176,105,0.4));
}

.bottom-nav-item svg {
  transition: var(--transition);
}

/* 移动端隐藏快速导航，添加底部 padding */
@media (max-width: 639px) {
  .quick-nav { display: none; }
  body { padding-bottom: 60px; }
  .back-top { bottom: 80px; }
}

/* 平板及以上隐藏底部导航 */
@media (min-width: 640px) {
  .bottom-nav { display: none; }
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.drink-card { animation: fadeInUp 0.5s ease-out backwards; }
.drink-card:nth-child(1) { animation-delay: 0.05s; }
.drink-card:nth-child(2) { animation-delay: 0.1s; }
.drink-card:nth-child(3) { animation-delay: 0.15s; }
.drink-card:nth-child(4) { animation-delay: 0.2s; }
.drink-card:nth-child(5) { animation-delay: 0.25s; }
.drink-card:nth-child(6) { animation-delay: 0.3s; }
.drink-card:nth-child(7) { animation-delay: 0.35s; }
.drink-card:nth-child(8) { animation-delay: 0.4s; }
.drink-card:nth-child(n+9) { animation-delay: 0.45s; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-item { animation: slideInRight 0.4s ease-out backwards; }
.step-item:nth-child(1) { animation-delay: 0.05s; }
.step-item:nth-child(2) { animation-delay: 0.1s; }
.step-item:nth-child(3) { animation-delay: 0.15s; }
.step-item:nth-child(4) { animation-delay: 0.2s; }
.step-item:nth-child(5) { animation-delay: 0.25s; }
.step-item:nth-child(6) { animation-delay: 0.3s; }
.step-item:nth-child(7) { animation-delay: 0.35s; }
.step-item:nth-child(8) { animation-delay: 0.4s; }
.step-item:nth-child(n+9) { animation-delay: 0.45s; }

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 详情页激活时滚动重置 */
body.detail-active { overflow-x: hidden; }

/* 详情页激活时移除移动端底部多余 padding */
@media (max-width: 639px) {
  body.detail-active { padding-bottom: 0; }
}
