/* =========================================================
   Reset轻释放 — 完整 UI 样式系统
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

/* ── 设计令牌 ── */
:root {
  /* 品牌色 - 奢华纯黑与香槟/钛银 */
  --bs-primary: #000000;
  --bs-grad-a: #111111;
  --bs-grad-b: #222222;

  /* 背景 - OLED 纯黑 -> 升级为深空紫蓝 */
  --bg-void: #050410;
  --bg-deep: #050410;
  --bg-card: rgba(18, 18, 18, 0.4);
  --bg-card-hover: rgba(30, 30, 30, 0.6);
  --bg-glass: rgba(15, 15, 15, 0.4);
  --bg-glass-strong: rgba(5, 5, 5, 0.85);

  /* 奢华金属色系 - 钛银、香槟金、极光微青 */
  --neon-blue: #A0C4FF;
  --neon-cyan: #E0E6ED;
  --neon-purple: #BDB2FF;
  --neon-pink: #FFC6FF;
  --neon-gold: #D4AF37;
  --neon-green: #90E0EF;
  --neon-red: #FFADAD;

  /* 文本颜色 - 极致留白与低对比度高级感 */
  --silver: #C0C8D0;
  --silver-light: #F0F4F8;
  --text: rgba(255, 255, 255, 0.95);
  --text-dim: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.50);
  --text-glow: rgba(255, 255, 255, 0.03);

  /* 边框与高级光泽 - 液态金属反光 */
  --border: rgba(255, 255, 255, 0.04);
  --border-glow: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.02);
  --glow-inner: inset 0 1px 0px rgba(255, 255, 255, 0.12), inset 1px 0 0px rgba(255, 255, 255, 0.04);

  /* 阴影系统 - 深邃下沉 */
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.9);
  --shadow-xl: 0 40px 100px rgba(0, 0, 0, 1);

  /* 辉光 - 极度克制 */
  --glow-cyan: 0 0 40px rgba(224, 230, 237, 0.05);
  --glow-blue: 0 0 40px rgba(160, 196, 255, 0.05);

  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 12px;
  --radius: 28px;
  --radius-lg: 36px;
  --radius-full: 9999px;

  --font-mono: "SF Mono", "Roboto Mono", Menlo, monospace;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background-color: #050410;
  color: var(--text);
  font-family: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App 容器 ── */
#app-container {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  background-color: #050410;
  background-image: 
    radial-gradient(ellipse 100% 70% at 50% -10%, rgba(112, 36, 185, 0.45) 0%, rgba(49, 46, 129, 0.2) 40%, transparent 80%),
    radial-gradient(ellipse 80% 80% at -10% 40%, rgba(37, 99, 235, 0.18) 0%, rgba(30, 58, 138, 0.05) 60%, transparent 100%),
    radial-gradient(ellipse 90% 90% at 110% 80%, rgba(88, 28, 135, 0.25) 0%, rgba(30, 64, 175, 0.15) 50%, transparent 100%),
    linear-gradient(160deg, rgba(15, 10, 35, 0.2) 0%, rgba(5, 5, 15, 0.7) 60%, rgba(2, 2, 5, 0.98) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

/* ── 背景 Canvas ── */
#starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── 环境光条 ── */
#ambience-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(112, 36, 185, 0), rgba(112, 36, 185, 0.95), rgba(37, 99, 235, 0.95), rgba(112, 36, 185, 0.95), rgba(112, 36, 185, 0));
  opacity: var(--ambience-alpha, 0.25);
  filter: blur(8px);
  transform-origin: 50% 50%;
  animation: ambience-breathe 3.8s ease-in-out infinite;
}

@keyframes ambience-breathe {
  0%, 100% { transform: scaleX(0.92); }
  50% { transform: scaleX(1); }
}

/* =========================================================
   排版系统 (Typography)
   ========================================================= */
h1, h2, h3, .page h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, #fff 30%, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, #fff 60%, var(--silver));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: var(--fs-sm);
  color: var(--text-dim); /* 提升副标题对比度 */
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.section-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #FFFFFF, var(--neon-blue));
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* =========================================================
   页面系统
   ========================================================= */
.page {
  display: none;
  width: 100%;
  min-height: 100%;
  padding: 84px 20px calc(80px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

.page.active {
  display: block;
  animation: page-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 内容区域 ── */
#content-area {
  flex: 1;
  display: none;
  min-height: 0;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

#content-area::-webkit-scrollbar { display: none; }

/* =========================================================
   卡片系统 (Cards) - 奢侈品级液态玻璃与金属边缘
   ========================================================= */
.card {
  padding: 16px 20px;
  margin-bottom: var(--space-lg);
  background: var(--bg-glass);
  border-radius: var(--radius);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

/* 顶部高光切割线 */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0.8;
}

/* 深邃光晕叠加层 */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.08), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.08), transparent 50%);
  pointer-events: none;
  opacity: 0.6;
}

.card > * { position: relative; z-index: 1; }

.tap-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tap-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), var(--glow-blue);
  background: var(--bg-card-hover);
}

.tap-card:active {
  transform: scale(0.98);
  border-color: var(--border-glow);
  background: var(--bg-glass-strong);
}

/* ── 动作卡片 ── */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.action-card {
  text-align: left;
  padding: 14px 16px;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

/* 高级纯粹的 SVG 容器 */
.action-card .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver-light);
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow-sm), inset 0 1px 1px rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 20px;
}

/* SVG 颜色继承与光晕 */
.action-card .icon svg {
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

.action-card .name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--silver-light);
}

.action-card .desc {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-dim);
  font-weight: 500;
  flex: 1;
}

/* =========================================================
   脑健康页 / 列表系统
   ========================================================= */
#freq {
  --spa-accent: #7be9ff;
}

#detect .subtitle,
#freq .subtitle,
#gym .subtitle,
#mall .subtitle,
#profile .subtitle {
  margin-bottom: 14px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.24);
}

.health-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(132px, 0.8fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(149, 202, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(14, 29, 65, 0.96), rgba(10, 21, 44, 0.94));
  border: 1px solid rgba(255,255,255,0.08);
}

.health-hero-copy {
  min-width: 0;
}

.health-hero-kicker {
  color: rgba(232, 211, 153, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.health-hero-title {
  margin-top: 8px;
  color: var(--silver-light);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.health-hero-desc {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
}

.health-hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.health-hero-art img {
  width: 100%;
  max-width: 188px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow:
    0 16px 36px rgba(6, 12, 26, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.seg-btn {
  min-height: 42px;
  padding: 10px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition);
}

.seg-btn.active {
  color: #03111f;
  background: linear-gradient(135deg, rgba(171, 233, 255, 0.96), rgba(72, 196, 255, 0.92));
  box-shadow: 0 10px 20px rgba(0, 188, 255, 0.22);
}

.spa-panel {
  display: none;
}

.spa-panel.active {
  display: block;
  animation: page-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.spa-panel-intro {
  margin: -6px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.spa-list {
  margin-bottom: 16px;
}

.list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(109, 214, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 24px rgba(2, 8, 18, 0.22);
}

.list-item:last-child {
  margin-bottom: 0;
}

.list-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--silver-light);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  flex-shrink: 0;
}

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

.list-title {
  color: var(--silver-light);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.list-desc {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

#freq .list-item .btn {
  flex-shrink: 0;
}

.spa-action-btn {
  min-width: 56px;
  padding: 4px 10px;
  font-size: 12px;
}

.spa-empty-card {
  padding: 18px 16px;
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.spa-detail-trigger {
  cursor: pointer;
}

.spa-detail-trigger .list-content {
  cursor: pointer;
}

.spa-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
}

#spa-tab-freq .list-item.selected {
  border-color: rgba(104, 218, 255, 0.34);
  background: linear-gradient(180deg, rgba(102, 212, 255, 0.10), rgba(255,255,255,0.03));
  box-shadow:
    0 14px 28px rgba(0, 188, 255, 0.12),
    inset 0 1px 0 rgba(184, 240, 255, 0.16);
}

#spa-tab-freq .list-item.selected .list-icon {
  color: #04131f;
  background: linear-gradient(135deg, rgba(190, 244, 255, 0.98), rgba(104, 214, 255, 0.95));
}

.wulong-section-title {
  margin-top: 10px;
}

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

.wulong-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.wulong-category-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1;
}

.spa-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spa-detail-cover-wrap {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.spa-detail-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.spa-detail-summary {
  margin-top: 18px;
  color: var(--silver-light);
  font-size: 14px;
  line-height: 1.8;
}

.spa-detail-body {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
}

.spa-detail-body p {
  margin: 0 0 12px;
}

.wulong-card {
  min-height: 112px;
  padding: 14px;
  margin-bottom: 0;
  background:
    radial-gradient(circle at top right, rgba(105, 217, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
}

.wulong-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wulong-seal {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #03111f;
  background: linear-gradient(135deg, rgba(196, 245, 255, 0.95), rgba(95, 208, 255, 0.90));
  box-shadow: 0 8px 18px rgba(0, 188, 255, 0.18);
}

.wulong-name {
  color: var(--silver-light);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.wulong-desc {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

.spa-desc-multiline {
  white-space: normal;
  line-height: 1.5;
}

.rt-title {
  color: var(--silver-light);
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.spa-player {
  margin-top: 18px;
  margin-bottom: 0;
  background:
    radial-gradient(circle at top right, rgba(119, 231, 255, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(8, 28, 58, 0.94), rgba(5, 18, 39, 0.92));
  border-color: rgba(136, 226, 255, 0.14);
}

.spa-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spa-player-meta {
  min-width: 0;
  flex: 1;
}

.spa-player-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spa-badge-playing {
  background: rgba(0,229,255,0.12);
  color: rgba(0,229,255,0.92);
  border: 1px solid rgba(0,229,255,0.22);
}

.spa-title-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spa-player-subtitle {
  margin-top: 6px;
  font-size: 11px;
}

.spa-player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.spa-player-body {
  margin-top: 12px;
}

.spa-range {
  width: 100%;
}

.spa-player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-dim);
}

.spa-player-mode-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spa-player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.spa-volume-label {
  font-size: 10px;
  color: var(--text-dim);
}

.spa-volume-range {
  flex: 1;
}

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

  .spa-player-top {
    flex-direction: row; /* 在手机端也保持横向排列，以免头像和文字断行 */
    align-items: center;
  }

  .spa-player-controls {
    justify-content: flex-end;
    gap: 6px;
  }

  .gym-tools-row,
  .gym-exercise-head,
  .sleep-state-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .sleep-monitor-btn {
    width: 100%;
  }
}


#sleepIdleState {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

#sleepIdleState .hero-icon {
  margin: 0;
  margin-right: 16px;
  flex-shrink: 0;
}

#sleepIdleState .sleep-text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#sleepIdleState .sleep-monitor-title {
  font-size: 16px;
  margin-bottom: 4px;
}

#sleepIdleState .sleep-monitor-copy {
  font-size: 12px;
  margin-bottom: 0;
}

#sleepIdleState .sleep-monitor-btn {
  width: auto;
  padding: 8px 16px;
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 12px;
}

.sleep-monitor-card {
  text-align: center;
  padding: 20px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(117, 98, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(14, 28, 65, 0.94), rgba(6, 18, 40, 0.88));
  border-color: rgba(166, 167, 255, 0.12);
}

.sleep-monitor-state {
  position: relative;
  z-index: 1;
}

.hero-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  font-size: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 24px rgba(2, 8, 22, 0.24);
  color: var(--silver-light);
}

.sleep-monitor-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.sleep-monitor-copy {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sleep-monitor-btn {
  width: 60%;
  padding: 12px;
}

.sleep-monitor-active-title {
  font-size: 14px;
  color: #FFFFFF;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.35); opacity: 1; }
}

.sleep-state-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.sleep-state-item {
  text-align: center;
}

.sleep-state-icon {
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--silver-light);
  display: flex;
  justify-content: center;
}

.sleep-state-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.audio-visualizer {
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  margin: 0 auto 18px;
}

.audio-bar {
  width: 6px;
  min-height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(119, 231, 255, 0.95), rgba(96, 112, 255, 0.38));
  box-shadow: 0 0 10px rgba(119, 231, 255, 0.18);
}

.sleep-monitor-timer {
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 20px;
  font-family: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", sans-serif;
  font-variant-numeric: tabular-nums;
}

.sleep-monitor-stop {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  box-shadow: none;
}

.detect-report-title {
  margin-top: 24px;
}

.detect-report-list {
  margin-bottom: 0;
}

.report-score-green {
  color: var(--neon-green);
}

.report-score-gold {
  color: var(--neon-gold);
}

.gym-panel {
  display: block;
}

.gym-panel-intro {
  margin: -6px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.gym-tools-card {
  padding: 12px;
}

.gym-tools-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gym-select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.gym-video-list {
  display: grid;
  gap: 10px;
}

.gym-video-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gym-video-icon {
  font-size: 18px;
}

.gym-video-content {
  min-width: 0;
  flex: 1;
}

.gym-video-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gym-video-meta {
  font-size: 11px;
}

.gym-fav-btn {
  font-size: 16px;
  margin-left: 10px;
}

.gym-exercise-card {
  padding: 12px;
}

.gym-exercise-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gym-exercise-title {
  font-size: 14px;
  font-weight: 600;
}

.gym-exercise-copy {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

.gym-exercise-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--silver);
}

.gym-steps {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.gym-step-card {
  padding: 12px;
  margin-bottom: 0;
}

.gym-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gym-step-copy {
  min-width: 0;
}

.gym-step-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gym-step-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

.gym-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,229,255,0.92);
}

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

.metric-item {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), var(--glow-inner);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.metric-label {
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-value {
  color: var(--silver-light);
  font-size: 20px;
  font-weight: 700;
  font-family: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.score-big {
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 8px;
  font-family: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", sans-serif;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #ffffff 30%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(255,255,255,0.15));
}

.score-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.score-green-glow {
  color: var(--neon-green);
  text-shadow: 0 0 20px var(--neon-green);
}

.score-purple-glow {
  color: var(--neon-purple);
  text-shadow: 0 0 20px var(--neon-purple);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag.green {
  color: #b7f7d0;
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.26);
}

.tag.gold {
  color: #ffe0a3;
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.26);
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  background: linear-gradient(180deg, var(--bg-deep) 40%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.page-header .subtitle {
  margin-bottom: 0;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 24px;
  color: var(--silver-light);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.back-btn:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
}

.page-header-main {
  min-width: 0;
  flex: 1;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), var(--glow-inner);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.plan-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(66,176,255,0.16));
  border: 1px solid rgba(255,255,255,0.14);
}

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

.plan-info .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--silver-light);
}

.plan-info .desc {
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}

.progress-container {
  margin-bottom: 14px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.95)) !important;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 0 8px rgba(255,255,255,0.2);
}

.progress-last {
  margin-bottom: 0;
}

.compact-card {
  padding: 14px;
}

.section-top-gap {
  margin-top: 24px;
}

.report-summary-card,
.sleep-report-summary {
  background:
    radial-gradient(circle at top right, rgba(119, 231, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(10, 28, 58, 0.94), rgba(7, 18, 38, 0.90));
  border-color: rgba(140, 224, 255, 0.14);
}

.report-summary-copy {
  font-size: 13px;
  line-height: 1.65;
  color: var(--silver);
}

.sleep-score-label {
  color: var(--neon-purple);
}

.sleep-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.metric-cyan {
  color: #FFFFFF;
}

.metric-purple {
  color: var(--neon-purple);
}

.metric-gold {
  color: var(--neon-gold);
}

.ai-analysis-card {
  padding: 16px;
  background: rgba(139, 92, 246, 0.10);
  border-color: rgba(139, 92, 246, 0.30);
}

.report-highlight-item {
  padding: 8px 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.report-highlight-item-last {
  padding: 8px 0 0;
}

.report-highlight-title {
  font-size: 13px;
}

.report-highlight-desc {
  font-size: 11px;
}

.trend-card {
  padding: 16px;
}

.trend-bars {
  height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 16px;
}

.trend-bar {
  flex: 1;
  border-radius: 8px 8px 0 0;
  background: rgba(139, 92, 246, 0.28);
}

.trend-bar-72 { height: 72%; }
.trend-bar-80 { height: 80%; }
.trend-bar-84 { height: 84%; }
.trend-bar-89 { height: 89%; }
.trend-bar-91 { height: 91%; }
.trend-bar-93 { height: 93%; }
.trend-bar-100 { height: 100%; }

.trend-bar-current {
  background: var(--neon-purple);
  box-shadow: 0 0 10px var(--neon-purple);
}

.trend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.trend-label-current {
  color: var(--neon-purple);
}

.report-note {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 30px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.overlay.active {
  display: flex;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.66);
  backdrop-filter: blur(8px);
}

.overlay-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(11, 28, 56, 0.96), rgba(6, 16, 34, 0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
  animation: overlay-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.overlay-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.overlay-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.overlay-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-field-label {
  font-size: 10px;
  color: var(--text-dim);
}

.overlay-cache-hint {
  font-size: 10px;
  color: var(--text-dim);
}

.profile-metric-grid {
  margin-bottom: 24px;
}

.profile-metric-card {
  padding: 12px;
  text-align: center;
  margin-bottom: 0;
}

.profile-metric-wide {
  grid-column: span 2;
}

.profile-metric-value {
  font-size: 20px;
  font-weight: 200;
}

.profile-metric-label {
  font-size: 10px;
  color: var(--text-dim);
}

.profile-menu-card {
  padding: 0;
}

.profile-menu-item {
  margin-bottom: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  box-shadow: none;
  padding: 14px 16px;
}

.profile-menu-item-last {
  border-bottom: 0;
}

.menu-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 18px;
}

/* 脑管家 AI 形象头像动效 */
.butler-avatar-container {
  position: relative;
  width: 96px; /* 增大以看清表情 */
  height: 96px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: butler-float 4s ease-in-out infinite;
}

.butler-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
  background: #111;
}

.butler-avatar-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(160, 196, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: butler-breathe 3s ease-in-out infinite;
}

@keyframes butler-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes butler-breathe {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.butler-hero-card,
.butler-result-card,
.butler-recommendation-card,
.butler-profile-card {
  margin-bottom: 18px;
  text-align: center; /* 让脑管家内容默认居中 */
}

.butler-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(224, 230, 237, 0.72);
  margin-bottom: 10px;
}

.butler-title,
.butler-result-title,
.butler-recommendation-title,
.butler-profile-title {
  font-size: 20px;
  line-height: 1.45;
  color: var(--silver-light);
  margin-bottom: 10px;
}

.butler-chat-bubble::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent rgba(255,255,255,0.08) transparent;
}

.butler-copy,
.butler-result-copy,
.butler-recommendation-copy,
.butler-profile-copy {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.butler-question {
  margin: 18px 0 12px;
  font-size: 15px;
  color: var(--text);
}

.butler-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.butler-chip {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--silver-light);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  transition: all var(--transition);
}

.butler-chip.is-active {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 10px 22px rgba(255,255,255,0.06);
}

.butler-result-top,
.butler-recommend-row,
.butler-profile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.butler-result-top {
  margin-bottom: 12px;
}

.butler-state-badge,
.butler-recommend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--silver-light);
  font-size: 12px;
}

.butler-result-time,
.butler-recommend-label {
  font-size: 12px;
  color: var(--text-dim);
}

.butler-recommend-row {
  margin-top: 16px;
}

.butler-recommend-meta,
.butler-profile-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.butler-actions {
  margin-top: 16px;
}

.butler-inline-btn {
  min-height: 38px;
}

.quiz-card {
  margin-top: 30px;
}

.quiz-step-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.quiz-question {
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 24px;
  color: var(--silver-light);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.07);
  transition: all var(--transition);
  cursor: pointer;
}

.quiz-option:last-child {
  margin-bottom: 0;
}

.quiz-option.selected {
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255,255,255,0.03));
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.08);
}

.radio-circle {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.24);
  position: relative;
}

.quiz-option.selected .radio-circle {
  border-color: rgba(255, 255, 255, 0.8);
}

.quiz-option.selected .radio-circle::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.quiz-actions .btn {
  flex: 1;
}

.mall-cart-btn {
  gap: 8px;
}

.mall-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: rgba(255, 222, 170, 0.98);
  font-size: 10px;
  font-weight: 700;
}

.mall-quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mall-quick-actions .btn {
  flex: 1;
}

.mall-status-text {
  margin-top: 12px;
  color: rgba(255, 227, 182, 0.86);
  font-size: 11px;
  line-height: 1.65;
}

.mall-product-grid,
.mall-order-list,
.mall-feature-list,
.mall-trust-grid,
.mall-cart-list {
  display: grid;
  gap: 12px;
}

.mall-product-card,
.mall-order-card,
.mall-cart-item,
.mall-empty-card,
.mall-trust-card,
.mall-feature-card,
.mall-spec-card {
  margin-bottom: 0;
}

.mall-product-card {
  padding: 0;
  overflow: hidden;
}

.mall-product-media {
  height: 190px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mall-product-img,
.mall-detail-img,
.mall-cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mall-product-fallback,
.mall-cart-item-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(28, 24, 18, 0.96), rgba(16, 16, 18, 0.92));
  color: rgba(255, 220, 176, 0.94);
  font-size: 18px;
  font-weight: 700;
}

.mall-product-body {
  padding: 14px;
}

.mall-product-tag {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 186, 93, 0.16);
  color: rgba(255, 225, 178, 0.94);
  font-size: 10px;
  font-weight: 700;
}

.mall-product-name {
  color: var(--silver-light);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.mall-product-desc {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.65;
}

.mall-product-price {
  margin-top: 12px;
  color: rgba(255, 225, 178, 0.98);
  font-size: 20px;
  font-weight: 700;
}

.mall-product-actions,
.mall-buy-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.mall-product-actions .btn,
.mall-buy-actions .btn {
  flex: 1;
}

.mall-trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mall-trust-card {
  padding: 14px 12px;
}

.mall-trust-title {
  color: var(--silver-light);
  font-size: 13px;
  font-weight: 700;
}

.mall-trust-desc {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

.mall-empty-card {
  padding: 18px 16px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.mall-order-card {
  padding: 14px;
}

.mall-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mall-order-id {
  color: var(--silver-light);
  font-size: 13px;
  font-weight: 700;
}

.mall-order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.22);
  color: #b7f7d0;
  font-size: 10px;
  font-weight: 700;
}

.mall-order-meta,
.mall-order-total {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.65;
}

.mall-order-total {
  color: rgba(255, 225, 178, 0.94);
  font-weight: 700;
}

.mall-detail-card {
  padding: 0;
  overflow: hidden;
}

.mall-detail-media {
  height: 240px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.016));
}

.mall-detail-body {
  padding: 12px 14px;
}

.mall-detail-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 186, 93, 0.16);
  color: rgba(255, 225, 178, 0.96);
  font-size: 10px;
  font-weight: 700;
}

.mall-detail-title {
  margin-top: 10px;
  color: var(--silver-light);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.mall-detail-price {
  margin-top: 10px;
  color: rgba(255, 225, 178, 0.98);
  font-size: 26px;
  font-weight: 700;
}

.mall-detail-price-note {
  margin-left: 8px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
}

.mall-detail-desc {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.75;
}

.mall-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mall-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
}

.mall-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.mall-qty-label {
  color: var(--silver-light);
  font-size: 12px;
  font-weight: 600;
}

.mall-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.mall-stepper-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--silver-light);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mall-stepper-input {
  width: 48px;
  border: 0;
  background: transparent;
  color: var(--silver-light);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.mall-position-card,
.mall-form-card {
  padding: 16px;
}

.mall-position-item + .mall-position-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mall-position-name,
.mall-feature-name,
.mall-form-title {
  color: var(--silver-light);
  font-size: 14px;
  font-weight: 700;
}

.mall-position-desc,
.mall-feature-desc {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.65;
}

.mall-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mall-spec-card {
  padding: 14px;
}

.mall-spec-label {
  color: var(--text-dim);
  font-size: 10px;
  margin-bottom: 8px;
}

.mall-spec-value {
  color: var(--silver-light);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.mall-cart-item {
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.mall-cart-item-media {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.mall-cart-item-body {
  min-width: 0;
  flex: 1;
}

.mall-cart-item-name {
  color: var(--silver-light);
  font-size: 14px;
  font-weight: 700;
}

.mall-cart-item-desc {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
}

.mall-cart-item-price {
  margin-top: 8px;
  color: rgba(255, 225, 178, 0.94);
  font-size: 14px;
  font-weight: 700;
}

.mall-cart-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.mall-remove-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 196, 196, 0.92);
  font-size: 11px;
  cursor: pointer;
}

.mall-cart-summary {
  margin-top: 16px;
}

.mall-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
}

.mall-summary-row + .mall-summary-row {
  margin-top: 8px;
}

.mall-summary-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--silver-light);
  font-size: 14px;
  font-weight: 700;
}

.mall-full-btn {
  width: 100%;
  margin-top: 16px;
}

.mall-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.mall-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
  font-size: 11px;
}

.mall-field-full {
  grid-column: 1 / -1;
}

.mall-form-field input,
.mall-form-field textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--silver-light);
  padding: 12px 14px;
  font-family: inherit;
  outline: none;
}

.mall-form-field textarea {
  resize: vertical;
  min-height: 88px;
}

.mall-option-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mall-option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--silver-light);
  font-size: 12px;
  line-height: 1.6;
}

.mall-option-card input {
  accent-color: #FFFFFF;
}

.mall-checkout-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mall-checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
}

.mall-checkout-row strong {
  color: var(--silver-light);
}

@media (max-width: 380px) {
  .health-hero-card {
    grid-template-columns: 1fr;
  }

  .health-hero-art img {
    max-width: 100%;
  }

  .action-grid,
  .metric-grid,
  .rt-top-grid,
  .wulong-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .action-card {
    padding: 10px 12px;
  }
  .action-card .icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .plan-item {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .plan-time {
    width: auto;
  }
}

/* =========================================================
   工具类
   ========================================================= */
.text-gradient {
  background: linear-gradient(135deg, #fff, var(--silver));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow-cyan {
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

.text-glow-blue {
  text-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}

/* 全局选择样式 */
::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}


/* =========================================================
   微动效与呼吸感系统 (Micro-interactions & Breathing)
   ========================================================= */

/* 1. 极致呼吸感 (Breathing Glow) - 缓慢的明暗交替，如生命体征 */
@keyframes luxury-breathe {
  0%, 100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
    transform: scale(1);
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.4));
    transform: scale(1.02);
  }
}

.hero-icon i, .score-big {
  animation: luxury-breathe 4s ease-in-out infinite;
}

/* 2. 悬浮微动 (Floating) - 极其缓慢的上下浮动，打破死板 */
@keyframes luxury-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.action-card .icon, .list-icon {
  animation: luxury-float 6s ease-in-out infinite;
}
/* 给不同图标错开动画时间，显得更自然 */
.action-card:nth-child(even) .icon { animation-delay: -3s; }
.list-item:nth-child(even) .list-icon { animation-delay: -2s; }
.plan-item:nth-child(even) .plan-icon { animation-delay: -1s; }

/* 3. 瀑布流优雅入场 (Staggered Fade-in Up) */
@keyframes fade-in-up-luxury {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page.active .card,
.page.active .list-item,
.page.active .plan-item,
.page.active .section-title {
  animation: fade-in-up-luxury 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 利用 nth-child 实现交错延迟 */
.page.active > *:nth-child(1) { animation-delay: 0.05s; }
.page.active > *:nth-child(2) { animation-delay: 0.10s; }
.page.active > *:nth-child(3) { animation-delay: 0.15s; }
.page.active > *:nth-child(4) { animation-delay: 0.20s; }
.page.active > *:nth-child(5) { animation-delay: 0.25s; }
.page.active > *:nth-child(6) { animation-delay: 0.30s; }
.page.active > *:nth-child(7) { animation-delay: 0.35s; }
.page.active > *:nth-child(8) { animation-delay: 0.40s; }

/* 4. 按钮光泽扫过 (Button Sweep Shine) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
  text-decoration: none;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(220, 225, 235, 0.95));
  color: #000;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--silver-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.96);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  animation: sweep-shine 5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes sweep-shine {
  0% { left: -100%; }
  20%, 100% { left: 200%; }
}

/* 5. 底部导航激活状态的微小弹性跳动 */
@keyframes nav-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.nav-item.active .icon .icon-active {
  animation: nav-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* =========================================================
   Bottom Navigation Bar (Luxury Edition)
   ========================================================= */
#nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  z-index: 500;
}

.nav-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  padding-top: 8px;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-item .icon {
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  position: relative;
}

.nav-luxury-svg {
  width: 28px;
  height: 28px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.9);
  display: block;
}

.stroke-elem {
  stroke: url(#nav-grad-inactive);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.solid-fill {
  fill: url(#nav-grad-inactive);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item .label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: rgba(156,163,175,1); /* Lightened inactive state */
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 导航项激活态 */
.nav-item.active .nav-luxury-svg {
  transform: scale(1.15) translateY(-4px);
}

.nav-item.active .stroke-elem {
  stroke: url(#nav-grad-active);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.nav-item.active .solid-fill {
  fill: url(#nav-grad-active);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.nav-item.active .label {
  color: #FFFFFF;
  font-weight: 600;
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* 底部发光指示条 */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #FFFFFF;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.4);
}

.nav-item.active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
  bottom: 4px;
}

/* 全局脑管家悬浮头像 */
.global-butler-avatar {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  z-index: 9999;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(147, 112, 219, 0.3);
  animation: float-core 4s ease-in-out infinite alternate;
  background: rgba(8, 22, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.global-butler-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logo Styles */
#logo-bar { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); left: 20px; z-index: 100; display: none; align-items: center; gap: 10px; }
.mini-logo { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; overflow: hidden; }
.splash-logo { width: 80px; height: 80px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 10; }

/* Splash Screen */
#splash {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 24px calc(100px + env(safe-area-inset-bottom, 0px));
  background: transparent; /* 让底层 Canvas 的星空透出来 */
  overflow: hidden;
}

#splash.active {
  display: flex;
}

/* 动态流星背景 */
.meteor-system {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.meteor {
  position: absolute;
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(160,196,255,0.8), rgba(255,255,255,0));
  border-radius: 999px;
  opacity: 0;
  transform: rotate(-35deg);
  filter: drop-shadow(0 0 10px rgba(160,196,255,0.5));
  animation: meteor-fall 6s linear infinite;
}

.meteor:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.meteor:nth-child(2) { top: 30%; left: 60%; animation-delay: 2.5s; width: 100px; }
.meteor:nth-child(3) { top: 5%; left: 80%; animation-delay: 4s; width: 180px; }
.meteor:nth-child(4) { top: 40%; left: 10%; animation-delay: 1.2s; width: 120px; }

@keyframes meteor-fall {
  0% { transform: rotate(-35deg) translateX(-200px); opacity: 0; }
  10% { opacity: 1; }
  20% { transform: rotate(-35deg) translateX(400px); opacity: 0; }
  100% { transform: rotate(-35deg) translateX(400px); opacity: 0; }
}

.splash-content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

/* Slogan 动画 - 改为高级感 2x2 网格排版 */
.splash-slogan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 36px;
  margin-bottom: 24px;
}

.slogan-item {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  margin-left: 0.5em; /* 光学居中抵消 letter-spacing */
  opacity: 0;
  transform: translateY(10px);
  animation: slogan-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slogan-item:nth-child(1) { animation-delay: 0.4s; }
.slogan-item:nth-child(2) { animation-delay: 0.5s; }
.slogan-item:nth-child(3) { animation-delay: 0.6s; }
.slogan-item:nth-child(4) { animation-delay: 0.7s; }

@keyframes slogan-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* 3D 星球舞台 */
.splash-planet-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 0px;
  perspective: 1500px;
  transform-style: preserve-3d;
}

.splash-brand-lockup {
  margin: -20px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-brand-subtitle {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-left: 0.15em;
  text-transform: uppercase;
  text-align: center;
  /* 科技感液态金属/冰川光泽渐变 */
  background: linear-gradient(180deg, #FFFFFF 0%, #E0E6ED 40%, #A0C4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* 使用 drop-shadow 避免 text-shadow 在透明字体上的重影问题，营造深空发光感 */
  filter: drop-shadow(0 4px 24px rgba(160, 196, 255, 0.6)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* 有机光晕 - 深度重构为多中心、非对称动感辉光 */
.planet-aura {
  position: absolute;
  inset: -80px;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.planet-aura::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 40% 40%, rgba(78, 136, 255, 0.3) 0%, transparent 60%),
    radial-gradient(circle at 60% 60%, rgba(112, 36, 185, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
  filter: blur(40px);
  animation: aura-drift 10s ease-in-out infinite alternate;
}

.planet-aura::after {
  content: '';
  position: absolute;
  inset: 20%;
  background: radial-gradient(circle, rgba(160, 196, 255, 0.15) 0%, transparent 70%);
  filter: blur(20px);
  transform: rotate(45deg);
  animation: aura-pulse-irregular 7s ease-in-out infinite;
}

@keyframes aura-drift {
  0% { transform: translate(-5%, -5%) scale(1); opacity: 0.7; }
  100% { transform: translate(5%, 5%) scale(1.1); opacity: 1; }
}

@keyframes aura-pulse-irregular {
  0%, 100% { transform: scale(1) rotate(45deg); opacity: 0.4; }
  33% { transform: scale(1.2, 0.9) rotate(50deg); opacity: 0.8; }
  66% { transform: scale(0.9, 1.1) rotate(40deg); opacity: 0.6; }
}

/* 核心星球 - 增强 3D 深度 */
.planet-main {
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  z-index: 10;
  transform-style: preserve-3d;
  animation: planet-float 6s ease-in-out infinite;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.planet-layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
}

/* 基础球体 - 使用更细腻的渐变模拟受光面 */
.planet-base {
  background: 
    radial-gradient(circle at 30% 30%, 
      #6a9dff 0%, 
      #2a52be 30%, 
      #0f1c4d 60%,
      #020512 90%);
  z-index: 11;
}

/* 纹理层 - 增加动态的“云层”感 */
.planet-texture {
  background: url('https://coresg-normal.trae.ai/api/ide/v1/text_to_image?prompt=abstract%20ethereal%20planet%20surface%20texture%20blue%20and%20purple%20wisps%20swirls&image_size=square') center/cover;
  opacity: 0.25;
  mix-blend-mode: overlay;
  animation: texture-rotate 60s linear infinite;
  z-index: 12;
}

@keyframes texture-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 阴影层 - 修正阴影逻辑，使其具有厚度感 */
.planet-shadow {
  background: radial-gradient(circle at 75% 75%, 
    rgba(0,0,0,0.95) 0%, 
    rgba(0,0,0,0.6) 40%, 
    transparent 85%);
  z-index: 13;
  transform: translateZ(2px);
}

/* 增加一层侧光 (Rim Light) */
.planet-specular {
  background: 
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.4) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(160,196,255,0.2) 0%, transparent 30%);
  filter: blur(5px);
  z-index: 14;
  transform: translateZ(5px);
}

/* 大气层 - 增加厚度感 */
.planet-atmosphere {
  box-shadow: 
    inset 0 0 40px rgba(78, 136, 255, 0.4),
    0 0 30px rgba(78, 136, 255, 0.2),
    inset -10px -10px 30px rgba(0,0,0,0.8);
  z-index: 15;
  transform: translateZ(8px);
}

.planet-core-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transform: translateZ(40px);
}

.planet-core-logo img {
  width: 65%;
  height: 65%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%; /* 核心修复：确保 Logo 为圆形 */
  filter: drop-shadow(0 0 15px rgba(78, 136, 255, 0.8)) brightness(1.2);
  animation: logo-glow-pulse 4s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #1e3799; /* 垫底颜色，防止图片边缘透明白边 */
}

@keyframes logo-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(78, 136, 255, 0.8)) brightness(1.1); transform: scale(1); }
  50% { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8)) brightness(1.3); transform: scale(1.03); }
}

/* 3D 轨道与卫星 - 深度重构体积感 */
.satellite-orbit {
  position: absolute;
  inset: -45px; /* 缩减轨道半径，使布局更和谐 */
  transform: rotateX(70deg) rotateY(15deg);
  transform-style: preserve-3d;
  z-index: 5;
}

.satellite-planet {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: orbit-rotation 12s linear infinite;
  transform-style: preserve-3d;
}

.planet-sphere {
  position: absolute;
  top: -10px; /* 匹配缩小后的尺寸 */
  left: 50%;
  width: 20px; /* 缩小卫星体积，与主星比例更协调 */
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  /* 强化球体受光渐变，使其看起来更圆润立体 */
  background: radial-gradient(circle at 35% 35%, 
    #ffffff 0%, 
    #a0c4ff 20%, 
    #3f66f1 50%, 
    #0a1a4a 90%,
    #000 100%);
  box-shadow: 
    0 0 15px rgba(78, 136, 255, 0.4),
    inset -3px -3px 6px rgba(0,0,0,0.8);
  /* 关键：确保卫星在绕行时始终垂直面向观察者，且具有 3D 厚度感 */
  transform: rotateX(-70deg) rotateY(-15deg); 
  transform-style: preserve-3d;
}

/* 增加卫星的大气辉光层 */
.planet-sphere::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 196, 255, 0.3) 0%, transparent 70%);
  filter: blur(2px);
}

/* 卫星环前后遮挡逻辑 - 优化深度感 */
.planet-ring-back, .planet-ring-front {
  display: none;
}

/* 动态流星 - 移除 CSS 流星，改用 JS 驱动以获得更好的性能和随机性 */
.meteor-system { display: none; }

@keyframes orbit-rotation {
  from { transform: rotateZ(0deg); }
  to { transform: rotateZ(360deg); }
}

@keyframes planet-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* Footer */
.splash-footer {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.btn-start-3d {
  position: relative;
  padding: 16px 48px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-start-3d:active {
  transform: scale(0.95);
}

.btn-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(78, 136, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-start-3d:hover .btn-glow {
  opacity: 1;
}

/* ── Auth 页面样式 ── */
#auth {
  display: none;
  background: #050410;
}

#auth.active {
  display: flex;
  flex-direction: column;
}

.auth-card {
  margin-top: 20px;
  padding: 32px 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}

.auth-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  height: 52px;
  padding: 0 20px;
  color: #fff;
  font-size: var(--fs-base);
  outline: none;
  transition: all var(--transition);
}

.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.03);
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action .auth-input {
  flex: 1;
  padding-right: 110px;
}

.input-with-action .btn-sm {
  position: absolute;
  right: 8px;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 12px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.social-login {
  margin-top: 60px;
  padding: 0 40px;
}

.social-login .divider {
  position: relative;
  text-align: center;
  margin-bottom: 30px;
}

.social-login .divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.social-login .divider span {
  position: relative;
  background: #050410;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.social-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-dim);
  transition: all var(--transition);
  cursor: pointer;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-2px);
}

.social-icon[disabled],
.social-icon.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.social-icon[disabled]:hover,
.social-icon.is-disabled:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  transform: none;
}

.social-icon-rich {
  width: 108px;
  height: 78px;
  border-radius: 22px;
  flex-direction: column;
  gap: 8px;
  font-size: 22px;
  font-family: inherit;
}

.social-icon-rich span {
  font-size: 12px;
  font-weight: 600;
}

.auth-alt-note {
  margin-top: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-method-card,
.auth-steps-card,
.auth-help-card,
.spa-detail-card {
  margin-top: 20px;
  padding: 24px 20px;
}

.auth-method-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 12px;
}

.auth-qr-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(109, 214, 255, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-method-note,
.auth-help-support {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}

.auth-step-list,
.auth-help-list {
  display: grid;
  gap: 10px;
}

.auth-step-item,
.auth-help-item {
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}

.auth-step-item strong,
.auth-help-item strong {
  color: var(--silver-light);
}

.auth-method-actions,
.spa-detail-actions {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.auth-qr-svg {
  width: 176px;
  height: 176px;
  display: block;
}

.auth-qr-placeholder {
  max-width: 220px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}

.auth-qr-placeholder strong {
  display: block;
  margin-bottom: 8px;
  color: var(--silver-light);
}

.auth-method-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  color: #0b1220;
  background: linear-gradient(135deg, #ffffff, #d7e5ff);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* 移除多余的旧卫星结构，保持极简高级感 */
.satellite-panel { display: none; }

.satellite-panel-left {
  right: 100%;
  margin-right: 2px;
}

.satellite-panel-right {
  left: 100%;
  margin-left: 2px;
}

.btn-start {
  min-width: 180px;
  height: 54px;
  padding: 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.03);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.05em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  z-index: 100; /* 确保在所有装饰层之上 */
  overflow: hidden;
  transition: all 0.4s ease;
  animation: splash-button-breathe 4s ease-in-out infinite;
  pointer-events: auto !important; /* 强制开启交互 */
}

.btn-start:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-start:active {
  transform: scale(0.96);
}

.btn-start::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  animation: splash-button-sheen 4s ease-in-out infinite;
}

@keyframes splash-container-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes splash-logo-breathe {
  0%, 100% { transform: translateY(0) rotateZ(0deg) scale(1); }
  50% { transform: translateY(-2px) rotateZ(-1deg) scale(1.02); }
}

@keyframes splash-logo-core {
  0%, 100% { transform: translateZ(0) scale(1); opacity: 1; }
  50% { transform: translateZ(2px) scale(1.01); opacity: 0.99; }
}

@keyframes splash-halo-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.74; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes logo-planet-drift {
  0%, 100% {
    transform: translateZ(42px) rotateX(12deg) rotateY(-14deg);
  }
  50% {
    transform: translateZ(48px) rotateX(8deg) rotateY(-6deg);
  }
}

@keyframes logo-band-shift-a {
  0%, 100% {
    transform: rotate(-13deg) translateX(-4px) scaleX(1.02);
    opacity: 0.68;
  }
  50% {
    transform: rotate(-11deg) translateX(6px) scaleX(0.98);
    opacity: 0.84;
  }
}

@keyframes logo-band-shift-b {
  0%, 100% {
    transform: rotate(-10deg) translateX(5px);
    opacity: 0.46;
  }
  50% {
    transform: rotate(-8deg) translateX(-6px);
    opacity: 0.72;
  }
}

@keyframes meteor-fly {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-28deg) scaleX(0.7);
  }
  10% {
    opacity: 1;
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(520px, 220px, 0) rotate(-28deg) scaleX(1.05);
  }
}

@keyframes splash-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes splash-button-breathe {
  0%, 100% {
    box-shadow:
      0 16px 32px rgba(8, 12, 28, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }
  50% {
    box-shadow:
      0 18px 38px rgba(80, 98, 170, 0.28),
      0 0 24px rgba(214, 223, 255, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }
}

@keyframes splash-button-sheen {
  0%, 18% { left: -42%; opacity: 0; }
  28% { opacity: 1; }
  52% { left: 118%; opacity: 0; }
  100% { left: 118%; opacity: 0; }
}


/* --- 脑健康数字大屏 Dashboard --- */
.dashboard-container {
    margin: 20px -16px 32px -16px;
    padding: 24px 16px;
    background: linear-gradient(180deg, rgba(14, 29, 65, 0.7) 0%, rgba(8, 12, 28, 0.4) 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
}

.dashboard-title i {
    color: #40C4FF;
    font-size: 20px;
}

.dashboard-tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.dash-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dash-tab.is-active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dash-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

/* 顶部的大卡片跨两列 */
.dash-card.full-width {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(64, 196, 255, 0.1) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(64, 196, 255, 0.2);
}

.dash-card-title {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-card-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'DIN Alternate', -apple-system, sans-serif;
    line-height: 1.1;
    margin-bottom: 4px;
}

.dash-card-unit {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-weight: normal;
}

.dash-card-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.dash-trend {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.trend-up {
    color: #40C4FF;
    background: rgba(64, 196, 255, 0.1);
}

.trend-down {
    color: #B388FF;
    background: rgba(179, 136, 255, 0.1);
}

/* 光晕颜色 */
.glow-cyan { color: #40C4FF; text-shadow: 0 0 16px rgba(64,196,255,0.4); }
.glow-purple { color: #B388FF; text-shadow: 0 0 16px rgba(179,136,255,0.4); }
.glow-gold { color: #FFD54F; text-shadow: 0 0 16px rgba(255,213,79,0.4); }
.glow-green { color: #69F0AE; text-shadow: 0 0 16px rgba(105,240,174,0.4); }

.dash-chart-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.dash-chart-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dashboard UI Enhancement */
.dash-ai-insight {
  display: flex;
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.15) 0%, rgba(78, 136, 255, 0.1) 100%);
  border: 1px solid rgba(147, 112, 219, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
  gap: 16px;
  box-shadow: inset 0 0 20px rgba(147, 112, 219, 0.05);
}
.empty-insight {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  box-shadow: none;
}
.insight-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
}
.insight-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.insight-text {
  flex-grow: 1;
}
.insight-text strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.insight-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin: 0;
}
.insight-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(147, 112, 219, 0.2);
  color: #d1b3ff;
  border-radius: 100px;
}

.dash-layer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 12px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}
.dash-layer-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 14px;
  background: linear-gradient(to bottom, #9370db, #4e88ff);
  border-radius: 2px;
}

.dash-skeleton {
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  text-align: center;
  padding: 24px 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.skeleton-chart-wave {
  width: 100%;
  height: 60px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 10px);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  margin-bottom: 16px;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  position: relative;
}
.skeleton-chart-wave::after {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.skeleton-radar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.15);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.skeleton-radar::before {
  content: '';
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
}
.skeleton-bar-chart {
  width: 100px;
  height: 60px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.skeleton-bar-chart div {
  width: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px 4px 0 0;
}
.skeleton-bar-chart div:nth-child(1) { height: 30%; }
.skeleton-bar-chart div:nth-child(2) { height: 70%; }
.skeleton-bar-chart div:nth-child(3) { height: 50%; }

.skeleton-cta {
  margin-top: 16px;
  padding: 8px 24px;
  font-size: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--silver-light);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}
.skeleton-cta:hover {
  background: rgba(255,255,255,0.1);
}
.dash-ai-insight, .dash-layer-title {
    grid-column: 1 / -1;
    width: 100%;
}
.managed-article {
    width: min(640px, calc(100vw - 24px));
    max-height: 85vh;
    padding: 24px;
    border: 1px solid rgba(136, 153, 176, 0.35);
    border-radius: 18px;
    background: #08162a;
    color: #e3edf4;
}
.managed-article::backdrop { background: rgba(0, 0, 0, 0.7); }
.managed-close { float: right; padding: 8px 14px; color: #e3edf4; background: transparent; border: 1px solid #65798d; border-radius: 8px; }
.managed-article-body { clear: both; padding-top: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.managed-article-body img { max-width: 100%; border-radius: 10px; }
.managed-article-body p { white-space: pre-wrap; }
.managed-site-notice { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 12px; width: min(600px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #65798d; border-radius: 12px; background: #08162a; color: #e3edf4; font-size: 13px; }
.managed-site-notice span { flex: 1; overflow-wrap: anywhere; }
.managed-site-notice button { padding: 6px 10px; background: transparent; border: 1px solid #65798d; color: inherit; border-radius: 6px; }
