/* =========================================================
   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: 200;
  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);
}

.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-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-banner {
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(88, 224, 255, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(9, 30, 56, 0.92), rgba(7, 21, 42, 0.88));
  border-color: rgba(122, 221, 255, 0.14);
}

.wulong-banner-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wulong-emblem {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 30%, rgba(160, 235, 255, 0.22), rgba(24, 80, 164, 0.10) 72%);
  border: 1px solid rgba(148, 224, 255, 0.14);
  overflow: hidden;
}

.wulong-dragon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wulong-title {
  color: var(--silver-light);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.wulong-sub {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}

.wulong-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 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;
}

.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: column;
    align-items: stretch;
  }

  .spa-player-controls {
    justify-content: space-between;
  }

  .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;
}

.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) {
  .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;
  }

  .wulong-banner-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   工具类
   ========================================================= */
.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;
}

/* Logo Styles */
#logo-bar { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); left: 20px; z-index: 100; display: flex; 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; }
