/* @author lu */
/* ============================================
   大健康平台 - 基础样式
   自然绿色主题 + 深色/浅色模式适配
   ============================================ */

/* ---------- Dark模式（默认） ---------- */
:root {
  --primary: #34D399;
  --primary-light: #6EE2A8;
  --accent: #34D399;
  --success: #5AD895;
  --warning: #E89A3C;
  --danger: #E55C5C;
  --purple: #AF52DE;

  --bg-body: #000000;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.09);

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);

  --border-glass: rgba(255, 255, 255, 0.10);
  --border-light: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(52, 211, 153, 0.5);

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);

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

  --header-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 系统偏好 Light ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --primary: #0CA678;
    --primary-light: #34D399;
    --accent: #0CA678;
    --success: #3AA876;
    --warning: #E89A3C;
    --danger: #E55C5C;
    --purple: #AF52DE;

    --bg-body: #FCF8F1;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-hover: rgba(255, 255, 255, 0.92);

    --text-primary: #1B2A41;
    --text-secondary: #7B8A97;
    --text-tertiary: #9AA7B2;

    --border-glass: rgba(15, 60, 40, 0.08);
    --border-light: rgba(15, 60, 40, 0.06);
    --border-focus: rgba(12, 166, 120, 0.35);

    --shadow-glass: 0 8px 32px rgba(15, 60, 40, 0.08);
  }
}

/* ---------- 手动强制 Light ---------- */
html.light-theme {
  --primary: #0CA678;
  --primary-light: #34D399;
  --success: #3AA876;
  --warning: #E89A3C;
  --danger: #E55C5C;
  --purple: #AF52DE;

  --bg-body: #FCF8F1;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(255, 255, 255, 0.92);

  --text-primary: #1B2A41;
  --text-secondary: #7B8A97;
  --text-tertiary: #9AA7B2;

  --border-glass: rgba(15, 60, 40, 0.08);
  --border-light: rgba(15, 60, 40, 0.06);
  --border-focus: rgba(12, 166, 120, 0.35);

  --shadow-glass: 0 8px 32px rgba(15, 60, 40, 0.08);
}

/* ---------- 手动强制 Dark ---------- */
html.dark-theme {
  --primary: #34D399;
  --primary-light: #6EE2A8;
  --success: #5AD895;
  --warning: #E89A3C;
  --danger: #E55C5C;
  --purple: #AF52DE;

  --bg-body: #000000;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.09);

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);

  --border-glass: rgba(255, 255, 255, 0.10);
  --border-light: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(52, 211, 153, 0.5);

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(45, 139, 95, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(78, 203, 143, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(58, 168, 118, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

@media (prefers-color-scheme: light) {
  body::before {
    background:
      radial-gradient(ellipse at 15% 15%, rgba(253, 231, 190, 0.85) 0%, transparent 55%),
      radial-gradient(ellipse at 85% 85%, rgba(209, 245, 228, 0.9) 0%, transparent 55%),
      radial-gradient(ellipse at 60% 45%, rgba(252, 244, 227, 0.5) 0%, transparent 60%);
  }
  .btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,245,247,0.9) 100%);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: inset 0 1px 1px rgba(255,255,255,1), 0 4px 16px rgba(0,0,0,0.06);
  }
}

html.light-theme body::before {
  background:
    radial-gradient(ellipse at 15% 15%, rgba(253, 231, 190, 0.85) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(209, 245, 228, 0.9) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 45%, rgba(252, 244, 227, 0.5) 0%, transparent 60%);
}

html.light-theme .btn-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,245,247,0.9) 100%);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 1px 1px rgba(255,255,255,1), 0 4px 16px rgba(0,0,0,0.06);
}

/* ============================================
   页面顶部导航（H5）
   ============================================ */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + var(--safe-top));
  padding: var(--safe-top) 12px 0;
  display: flex;
  align-items: center;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.header-left h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 50%;
  transition: background 0.15s;
}
.back-btn:active {
  background: var(--bg-glass-hover);
}

html.light-theme .page-header {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html.dark-theme body::before {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(45, 139, 95, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(78, 203, 143, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(58, 168, 118, 0.06) 0%, transparent 60%);
}

/* 容器 */
.container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

/* 页面内容区 */
.page-content {
  padding-top: calc(var(--header-height) + var(--safe-top));
  padding-bottom: 96px;
  min-height: 100vh;
}

/* 沉浸式封面页（课程/门店详情）内容从顶部开始，Header 悬浮在封面上 */
.page-content.cover-page {
  padding-top: 0 !important;
}

/* JS 自动注入底部 TabBar 时，统一保证内容不被遮挡 */
body.has-tab-bar .page-content {
  padding-bottom: 96px !important;
}

/* 无 TabBar 的页面 */
.page-content.no-tab {
  padding-bottom: 24px;
}

/* ============================================
   排版
   ============================================ */
.text-headline {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.text-subtitle {
  font-size: 17px;
  font-weight: 600;
}

.text-body {
  font-size: 16px;
  font-weight: 400;
}

.text-caption {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.text-small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* ============================================
   简约图标系统（替代emoji）
   ============================================ */
.icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.icon-text-sm {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.icon-text-lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.tab-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: transparent;
  color: currentColor;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid currentColor;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-item.active .tab-icon-wrap {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  opacity: 0.5;
}

.search-icon::after {
  content: '';
  position: absolute;
  top: 70%;
  left: 70%;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

/* ============================================
   毛玻璃核心类
   ============================================ */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid var(--border-glass);
}

.glass-strong {
  background: var(--bg-card);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  border: 1px solid var(--border-glass);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid var(--border-light);
}

@media (prefers-color-scheme: light) {
  .glass-dark {
    background: rgba(0, 0, 0, 0.04);
  }
}

html.light-theme .glass-dark {
  background: rgba(0, 0, 0, 0.04);
}

html.dark-theme .glass-dark {
  background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   通用液态玻璃表面（轻量版，无伪元素）
   ============================================ */
.glass-surface {
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(20px) saturate(130%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(130%) brightness(1.05);
  border-top: 1px solid rgba(255,255,255,0.35);
  border-left: 1px solid rgba(255,255,255,0.20);
  border-right: 1px solid rgba(255,255,255,0.20);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 8px 32px rgba(0,0,0,0.15);
  border-radius: var(--radius-lg);
}

/* ============================================
   卡片
   ============================================ */
.glass-card {
  /* 统一液态玻璃 */
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.08) 100%);
  backdrop-filter: blur(6px) saturate(130%) brightness(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(130%) brightness(1.05);
  border-top: 1px solid rgba(255,255,255,0.40);
  border-left: 1px solid rgba(255,255,255,0.22);
  border-right: 1px solid rgba(255,255,255,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 8px 32px rgba(0,0,0,0.25),
    0 2px 8px rgba(0,0,0,0.15);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.50) 0%,
    rgba(255,255,255,0.25) 35%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,255,255,0.0) 55%,
    rgba(255,255,255,0.0) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.7;
}

.glass-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 40%;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.glass-card:active {
  transform: scale(0.98);
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.10) 100%);
}

@media (prefers-color-scheme: light) {
  .glass-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,1),
      0 4px 20px rgba(0,0,0,0.06),
      0 1px 3px rgba(0,0,0,0.04);
  }
}

html.light-theme .glass-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 4px 20px rgba(0,0,0,0.06),
    0 1px 3px rgba(0,0,0,0.04);
}
html.light-theme .list-item {
  background: #ffffff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 4px 16px rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.88);
}
html.light-theme .list-item:active {
  background: rgba(0,0,0,0.04);
}
html.light-theme .list-item .arrow {
  color: rgba(0,0,0,0.35);
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .btn {
    white-space: normal;
    word-break: break-word;
  }
}

.btn-primary {
  background: linear-gradient(135deg, #34D399 0%, #0CA678 100%);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 24px rgba(12, 166, 120, 0.35);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 3px 12px rgba(0,0,0,0.2);
}

.btn-success {
  background: linear-gradient(180deg, rgba(58,168,118,0.45) 0%, rgba(45,139,95,0.55) 100%);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 6px 24px rgba(0,0,0,0.18);
}

.btn-danger {
  background: linear-gradient(180deg, rgba(229,92,92,0.35) 0%, rgba(200,70,70,0.45) 100%);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 6px 24px rgba(0,0,0,0.18);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.28), 0 4px 16px rgba(0,0,0,0.12);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: var(--radius-full);
}

/* ============================================
   输入框
   ============================================ */
.glass-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 16px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  transform: translateZ(0);
}

.glass-input:focus {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.06) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 0 0 3px var(--border-focus);
}

.glass-input::placeholder {
  color: var(--text-tertiary);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================
   列表
   ============================================ */
.glass-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.12), 0 8px 24px rgba(0,0,0,0.12);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

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

.list-item:active {
  background: var(--bg-glass-hover);
}

.list-item .arrow {
  color: var(--text-tertiary);
  font-size: 18px;
}

/* ============================================
   标签
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.tag-primary {
  background: linear-gradient(180deg, rgba(78,203,143,0.1) 0%, rgba(45,139,95,0.06) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--primary);
  border: 1px solid rgba(78,203,143,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.tag-success {
  background: linear-gradient(180deg, rgba(58,168,118,0.1) 0%, rgba(45,139,95,0.06) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--success);
  border: 1px solid rgba(58,168,118,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.tag-warning {
  background: linear-gradient(180deg, rgba(232,154,60,0.1) 0%, rgba(200,120,40,0.06) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--warning);
  border: 1px solid rgba(232,154,60,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.tag-danger {
  background: linear-gradient(180deg, rgba(229,92,92,0.1) 0%, rgba(200,70,70,0.06) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--danger);
  border: 1px solid rgba(229,92,92,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.tag-purple {
  background: linear-gradient(180deg, rgba(175,82,222,0.1) 0%, rgba(130,50,180,0.06) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: var(--purple);
  border: 1px solid rgba(175,82,222,0.18);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

/* ============================================
   间距工具
   ============================================ */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-enter {
  animation: fadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 10px;
}
.page-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

img[src=""] {
  visibility: hidden;
}

/* ============================================
   Loading
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@media (prefers-color-scheme: light) {
  .loading-overlay {
    background: rgba(0,0,0,0.25);
  }
}

html.light-theme .loading-overlay {
  background: rgba(0,0,0,0.25);
}

html.dark-theme .loading-overlay {
  background: rgba(0,0,0,0.5);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.empty-state .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state .title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state .desc {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ============================================
   PC 端响应式适配
   ============================================ */
@media (min-width: 768px) {
  body {
    padding: 0 24px 24px;
  }
  .container {
    max-width: 960px;
    padding: 0 32px;
  }
  .page-content {
    padding-top: 72px;
    padding-bottom: 40px;
  }
}

/* 全局隐藏滚动条 */
::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; }
