/* ========== 基础重置 & CSS 变量 ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-deep: #0a0e1a;
  --bg-card: #121828;
  --bg-card-hover: #1a2238;
  --bg-surface: #0f1525;
  --text-primary: #e8eaf0;
  --text-secondary: #8b92a8;
  --text-muted: #5a6178;
  --accent: #7c8cf8;
  --accent-soft: rgba(124,140,248,0.12);
  --accent-glow: rgba(124,140,248,0.25);
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif: 'Noto Serif SC', serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ========== 顶部导航 ========== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 32px; height: 32px; color: var(--accent); }
.logo-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #e8eaf0, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav { display: flex; gap: 8px; }
.nav-link {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.nav-link:hover { color: var(--text-primary); background: var(--accent-soft); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

/* ========== 主视觉 ========== */
.hero {
  position: relative;
  padding: 160px 24px 80px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(124,140,248,0.08), transparent),
              radial-gradient(ellipse 60% 50% at 80% 60%, rgba(99,102,241,0.05), transparent);
}
.hero-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 50% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 25% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 85% 85%, rgba(255,255,255,0.3), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { 0%{opacity:.6} 100%{opacity:1} }
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #f0f2ff 0%, #a0a8d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  letter-spacing: 1px;
}
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 20px 40px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 60px;
  backdrop-filter: blur(10px);
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}
.stat-label { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.stat-divider { width: 1px; height: 32px; background: var(--border-light); }

/* ========== 文章区域 ========== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.section-subtitle { font-size: 14px; color: var(--text-muted); letter-spacing: 1px; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-glow);
  background: var(--bg-card-hover);
}
.article-card:hover .card-img img { transform: scale(1.05); }
.card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1f35, #141830);
  color: var(--text-muted); font-size: 40px;
}
.card-body { padding: 20px; }
.card-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.5px; }
.card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.read-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.article-card:hover .read-more { gap: 8px; }
.read-more svg { width: 14px; height: 14px; transition: var(--transition); }

/* ========== 骨架屏 ========== */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skeleton-img {
  width: 100%; height: 200px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, #1a2238 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-text {
  height: 16px; margin: 16px 20px 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, #1a2238 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-text.short { width: 60%; margin-bottom: 20px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ========== 文章详情弹层 ========== */
.article-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: var(--transition);
}
.article-modal.active { visibility: visible; opacity: 1; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
}
.modal-container {
  position: relative; z-index: 1;
  width: 90%; max-width: 720px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-modal.active .modal-container { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(124,140,248,0.2); border-color: var(--accent); }
.modal-body { max-height: 90vh; overflow-y: auto; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
.modal-hero-img {
  width: 100%; height: 320px;
  background: var(--bg-surface);
  overflow: hidden;
}
.modal-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-content { padding: 32px; }
.modal-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-date { font-size: 13px; color: var(--text-muted); }
.modal-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
}
.modal-text {
  font-size: 15px;
  line-height: 2;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.modal-text p { margin-bottom: 16px; }

/* ========== 白噪音页面 Hero ========== */
.noise-hero {
  position: relative;
  padding: 140px 24px 60px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(124,140,248,0.1), transparent),
              radial-gradient(ellipse 50% 40% at 20% 50%, rgba(99,102,241,0.06), transparent),
              radial-gradient(ellipse 50% 40% at 80% 70%, rgba(139,146,168,0.04), transparent);
}
.noise-hero-content { position: relative; z-index: 1; }
.noise-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f0f2ff 0%, #a0a8d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.noise-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

/* ========== 白噪音区域 ========== */
.noise-section {
  background: var(--bg-surface);
}
.noise-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* 播放器状态条 */
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  margin-bottom: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 60px;
  box-shadow: var(--shadow-card);
}
.player-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.player-name {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  opacity: 0.4;
}
.player-visualizer.active { opacity: 1; }
.player-visualizer span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  height: 4px;
  transition: height 0.15s ease;
}
.player-visualizer.active span {
  animation: visualize 0.8s ease-in-out infinite alternate;
}
.player-visualizer.active span:nth-child(1) { animation-delay: 0s; }
.player-visualizer.active span:nth-child(2) { animation-delay: 0.15s; }
.player-visualizer.active span:nth-child(3) { animation-delay: 0.3s; }
.player-visualizer.active span:nth-child(4) { animation-delay: 0.45s; }
.player-visualizer.active span:nth-child(5) { animation-delay: 0.6s; }
@keyframes visualize {
  0% { height: 4px; }
  100% { height: 18px; }
}

.player-controls { display: flex; align-items: center; gap: 8px; }
.player-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.player-btn:hover { color: var(--text-primary); border-color: var(--accent-glow); background: var(--accent-soft); }
.player-btn-main {
  width: 44px; height: 44px;
  background: var(--accent-soft);
  border-color: var(--accent-glow);
  color: var(--accent);
}
.player-btn-main:hover { background: var(--accent); color: #fff; }

.player-volume { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px var(--accent-glow);
}

/* 音景网格 */
.noise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.noise-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.noise-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.noise-card.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124,140,248,0.08), rgba(99,102,241,0.04));
  box-shadow: 0 0 24px var(--accent-glow);
}
.noise-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  border: 2px solid var(--border);
  transition: var(--transition);
  background: var(--bg-surface);
}
.noise-card.active .noise-icon { border-color: var(--accent); }
.noise-icon img { width: 100%; height: 100%; object-fit: cover; }
.noise-icon-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #1a1f35, #141830);
}
.noise-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.noise-card.active .noise-name { color: var(--accent); }

.noise-skeleton {
  height: 140px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-card) 25%, #1a2238 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ========== 睡眠测试页 ========== */
.test-hero {
  position: relative;
  padding: 140px 24px 60px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(124,140,248,0.1), transparent),
              radial-gradient(ellipse 50% 40% at 30% 70%, rgba(168,130,255,0.06), transparent);
}
.test-hero-content { position: relative; z-index: 1; }
.test-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f0f2ff 0%, #a0a8d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.test-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.test-section { background: var(--bg-surface); }
.test-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* 进度条 */
.test-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.test-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.test-progress-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 32px;
}

/* 题目 */
.test-question {
  display: none;
  animation: fadeSlide 0.35s ease;
}
.test-question.active { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.test-question h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.test-options { display: flex; flex-direction: column; gap: 12px; }
.test-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
  color: var(--text-secondary);
}
.test-option:hover {
  border-color: var(--accent-glow);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.test-option.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124,140,248,0.1), rgba(99,102,241,0.05));
  color: var(--text-primary);
}
.test-option-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.test-option.selected .test-option-radio {
  border-color: var(--accent);
}
.test-option.selected .test-option-radio::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* 导航按钮 */
.test-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}
.test-btn {
  padding: 12px 32px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-sans);
}
.test-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.test-btn-prev {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.test-btn-prev:not(:disabled):hover {
  border-color: var(--accent-glow);
  color: var(--text-primary);
}
.test-btn-next {
  background: var(--accent);
  color: #fff;
  margin-left: auto;
}
.test-btn-next:not(:disabled):hover {
  background: #6b7bf7;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* 结果页 */
.test-result { animation: fadeSlide 0.5s ease; }
.result-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.result-score-ring {
  position: relative;
  width: 140px; height: 140px;
  margin: 0 auto 24px;
}
.result-score-ring svg { width: 100%; height: 100%; }
.result-score-ring circle:last-of-type { transition: stroke-dashoffset 1.2s ease; }
.result-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.result-score-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}
.result-score-label {
  font-size: 14px;
  color: var(--text-muted);
  align-self: flex-end;
  padding-bottom: 6px;
}
.result-level {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}
.result-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* 各维度得分 */
.result-components {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
  text-align: center;
}
.result-comp {
  padding: 16px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.result-comp-score {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.result-comp-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* 建议 */
.result-tips {
  text-align: left;
  padding: 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}
.result-tips h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}
.result-tips ul {
  list-style: none;
  padding: 0;
}
.result-tips li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
}
.result-tips li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.test-btn-restart {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  margin-bottom: 20px;
}
.test-btn-restart:hover {
  background: var(--accent);
  color: #fff;
}
.result-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .test-inner { padding: 32px 16px 60px; }
  .test-question h3 { font-size: 18px; }
  .result-card { padding: 32px 20px; }
  .result-components { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ========== 即将上线 ========== */
.coming-soon {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.coming-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
  text-align: center;
}
.coming-title {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 40px;
  color: var(--text-secondary);
  letter-spacing: 2px;
}
.coming-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-card {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--accent-glow); transform: translateY(-2px); }
.feature-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: 16px;
  color: var(--accent);
}
.feature-card h4 {
  font-size: 16px; font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== 页脚 ========== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand .logo-text { font-size: 16px; }
.footer-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.footer-note { text-align: right; }
.footer-note p { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.footer-email { margin-top: 4px; }
.footer-email a { color: var(--accent); transition: var(--transition); }
.footer-email a:hover { opacity: 0.8; }
.footer-icp { margin-top: 8px; font-size: 11px; }
.footer-icp a { color: var(--text-muted); transition: var(--transition); }
.footer-icp a:hover { color: var(--accent); }

/* ========== 睡眠打卡页 ========== */
.checkin-hero {
  position: relative;
  padding: 140px 24px 60px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(124,140,248,0.1), transparent),
              radial-gradient(ellipse 50% 40% at 70% 70%, rgba(74,222,128,0.06), transparent);
}
.checkin-hero-content { position: relative; z-index: 1; }
.checkin-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #f0f2ff 0%, #a0a8d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.checkin-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.checkin-section { background: var(--bg-surface); }
.checkin-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.checkin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.checkin-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
/* 打卡表单 */
.checkin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.checkin-form-row-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
.checkin-form-group {
  margin-bottom: 20px;
}
.checkin-form-row .checkin-form-group { margin-bottom: 0; }
.checkin-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.checkin-label-hint { color: var(--text-muted); font-weight: 400; }
.checkin-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  transition: var(--transition);
  box-sizing: border-box;
}
.checkin-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.checkin-duration {
  padding: 10px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(124,140,248,0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-serif);
  text-align: center;
}
/* 星星评分 */
.checkin-stars {
  display: flex;
  gap: 6px;
}
.ci-star {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s;
}
.ci-star svg {
  width: 28px;
  height: 28px;
  fill: var(--border-light);
  stroke: none;
  transition: fill 0.2s;
}
.ci-star:hover { transform: scale(1.15); }
.ci-star.active svg { fill: #facc15; }
/* 备注输入 */
.checkin-textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  resize: vertical;
  transition: var(--transition);
  box-sizing: border-box;
}
.checkin-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.checkin-textarea::placeholder { color: var(--text-muted); }
/* 提交按钮 */
.checkin-submit {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  border: none;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
}
.checkin-submit:hover { background: #6b7bf7; box-shadow: 0 4px 20px var(--accent-glow); }
.checkin-submit:disabled { opacity: 0.5; cursor: not-allowed; }
/* 已打卡状态 - 保留兼容 */
.checkin-done { display: none; }
/* 图表 */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
  margin-bottom: 12px;
}
.chart-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-bar {
  display: inline-block;
  width: 12px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
}
.legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: #facc15;
}
/* 睡眠贴士 */
.checkin-tips { display: flex; flex-direction: column; gap: 12px; }
.checkin-tips-empty, .checkin-history-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.checkin-tip-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.checkin-tip-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
/* 历史记录 */
.checkin-history { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.history-item:hover { background: var(--bg-card-hover); }
.history-date {
  min-width: 72px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.history-date small { display: block; font-weight: 400; color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.history-info { flex: 1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.history-duration {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}
.history-time { font-size: 12px; color: var(--text-muted); }
.history-stars { font-size: 13px; color: #facc15; letter-spacing: 1px; }
.history-note { font-size: 12px; color: var(--text-muted); font-style: italic; flex-basis: 100%; }
.history-del {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.history-del:hover { background: rgba(248,113,113,0.15); color: #f87171; }
.history-del svg { width: 14px; height: 14px; }

/* ========== 管理员页面 ========== */
/* 登录 */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.admin-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.admin-login-icon {
  color: var(--accent);
  margin-bottom: 20px;
}
.admin-login-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
}
.admin-login-field { margin-bottom: 20px; }
.admin-login-btn { width: 100%; }
.admin-login-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: #f87171;
}
/* 通用按钮 */
.admin-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  transition: var(--transition);
  box-sizing: border-box;
}
.admin-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.admin-input::placeholder { color: var(--text-muted); }
.admin-textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.7;
}
.admin-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.admin-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-btn-primary {
  background: var(--accent);
  color: #fff;
}
.admin-btn-primary:hover { background: #6b7bf7; box-shadow: 0 4px 20px var(--accent-glow); }
.admin-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.admin-btn-outline:hover { border-color: var(--text-muted); color: var(--text-primary); }
/* 管理面板 */
.admin-panel {
  min-height: 100vh;
  background: var(--bg-surface);
  padding-top: 80px;
}
.admin-panel-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-header-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-header-actions { display: flex; gap: 10px; }
/* 文章列表 */
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-empty, .admin-loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 15px;
}
.admin-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.admin-item:hover { border-color: var(--accent-glow); box-shadow: var(--shadow-hover); }
.admin-item-img {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
}
.admin-item-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-date { font-size: 12px; color: var(--text-muted); }
.admin-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-btn-sm {
  padding: 6px 14px;
  border: none;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
}
.admin-btn-edit {
  background: var(--accent-soft);
  color: var(--accent);
}
.admin-btn-edit:hover { background: rgba(124,140,248,0.2); }
.admin-btn-del {
  background: rgba(248,113,113,0.1);
  color: #f87171;
}
.admin-btn-del:hover { background: rgba(248,113,113,0.2); }
/* 编辑弹窗 */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.admin-modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.admin-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.admin-modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.admin-form-group { margin-bottom: 20px; }
.admin-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
/* 图片上传 */
.admin-img-upload { cursor: pointer; }
.admin-img-upload.dragover .admin-img-preview { border-color: var(--accent); background: var(--accent-soft); }
.admin-img-preview {
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}
.admin-img-preview:hover { border-color: var(--accent); }
.admin-img-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}
.admin-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}
.admin-img-placeholder small { font-size: 12px; color: var(--text-muted); opacity: 0.7; }
.admin-img-change {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: var(--transition);
}
.admin-img-preview:hover .admin-img-change { opacity: 1; }
.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .nav { gap: 4px; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 120px 16px 60px; }
  .hero-stats { gap: 20px; padding: 16px 24px; flex-wrap: wrap; justify-content: center; }
  .main-content { padding: 48px 16px 60px; }
  .articles-grid { grid-template-columns: 1fr; gap: 16px; }
  .modal-container { width: 95%; max-height: 95vh; }
  .modal-hero-img { height: 200px; }
  .modal-content { padding: 20px; }
  .modal-title { font-size: 20px; }
  .player-bar { flex-wrap: wrap; border-radius: var(--radius); padding: 12px 16px; gap: 12px; }
  .player-volume { width: 100%; justify-content: center; }
  .volume-slider { flex: 1; }
  .noise-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .noise-card { padding: 16px 12px; }
  .noise-icon { width: 56px; height: 56px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-note { text-align: center; }
  .checkin-form-row { grid-template-columns: 1fr 1fr; }
  .checkin-form-row-4 { grid-template-columns: 1fr 1fr; }
  .checkin-inner { padding: 36px 16px 60px; }
  .chart-container { height: 240px; }
  .history-item { flex-wrap: wrap; }
  .admin-panel-inner { padding: 24px 16px 60px; }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .admin-item { flex-wrap: wrap; }
  .admin-item-img { width: 64px; height: 48px; }
  .admin-item-actions { width: 100%; justify-content: flex-end; }
  .admin-modal { padding: 12px; }
  .admin-modal-box { max-height: 95vh; }
  .admin-login-card { padding: 36px 24px; }
}
@media (max-width: 480px) {
  .nav-link { padding: 4px 8px; font-size: 12px; }
  .hero-title { letter-spacing: 1px; }
  .stat-divider { display: none; }
  .hero-stats { gap: 16px; }
}
