/* =========================================================
   TheSpaceLaunches · Global Theme & Reset
   设计语言：深空蓝黑底 + 亮蓝描边 + 火箭尾焰暖橙点缀 + 玻璃质感
   ========================================================= */

:root {
  /* —— 主背景色阶 —— */
  --space-bg-0: #04070f;   /* 页面底：深空黑 */
  --space-bg-1: #08102a;   /* 卡片底：深空蓝 */
  --space-bg-2: #0f1c3d;   /* 高亮卡片底 */
  --space-bg-3: #16244a;   /* 悬停态 */

  /* —— 强调色 —— */
  --accent-blue: #4cc9ff;       /* 主亮蓝（描边/标题/数字） */
  --accent-blue-strong: #7adfff;/* 高亮亮蓝 */
  --accent-blue-deep: #2b6ed4;  /* 次蓝（按钮 hover、阴影） */
  --accent-orange: #ff8a3d;     /* 尾焰暖橙 */
  --accent-orange-2: #ffb572;   /* 暖橙高亮 */
  --accent-green: #5ce39b;      /* Upcoming 状态 */
  --accent-red: #ff5c7a;        /* In-Flight 状态 */
  --accent-yellow: #ffd35c;     /* Completed 状态 */

  /* —— 文字 —— */
  --text-0: #ffffff;            /* 主文字 */
  --text-1: #c9d6e6;            /* 次文字 */
  --text-2: #8a99b3;            /* 弱文字 */
  --text-3: #5b6a85;            /* 极弱 */

  /* —— 描边与发光 —— */
  --border-glow: 1px solid rgba(76, 201, 255, 0.32);
  --border-glow-strong: 1px solid rgba(76, 201, 255, 0.55);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(76, 201, 255, 0.08) inset;
  --shadow-glow-blue: 0 0 16px rgba(76, 201, 255, 0.35);
  --shadow-glow-orange: 0 0 14px rgba(255, 138, 61, 0.45);

  /* —— 玻璃质感 —— */
  --glass-bg: rgba(15, 28, 61, 0.55);
  --glass-bg-strong: rgba(15, 28, 61, 0.8);

  /* —— 容器/布局 —— */
  --container-max: 1440px;
  --nav-h: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* —— 字体 —— */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Orbitron", "Space Grotesk", var(--font-body);
}

/* —— Reset —— */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--font-body);
  background: var(--space-bg-0);
  color: var(--text-0);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  /* 深空径向高光背景 */
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(43, 110, 212, 0.22), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 138, 61, 0.08), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(76, 201, 255, 0.10), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: 0.01em; }

/* —— 通用工具类 —— */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.muted { color: var(--text-2); }
.glow-blue { text-shadow: 0 0 12px rgba(76, 201, 255, 0.6); }

/* —— 玻璃质感卡片基底 —— */
.glass {
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* —— 标题样式 —— */
.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 18px;
  background: var(--accent-blue);
  border-radius: 2px;
  box-shadow: var(--shadow-glow-blue);
}
.section-title .count {
  margin-left: auto;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-2);
  letter-spacing: 0;
}

/* —— 状态标签 —— */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag--upcoming   { background: rgba(92, 227, 155, 0.12); color: var(--accent-green); border: 1px solid rgba(92, 227, 155, 0.4); }
.tag--in-flight  { background: rgba(255, 92, 122, 0.12); color: var(--accent-red);   border: 1px solid rgba(255, 92, 122, 0.4); }
.tag--completed  { background: rgba(255, 211, 92, 0.12); color: var(--accent-yellow);border: 1px solid rgba(255, 211, 92, 0.4); }
.tag--default    { background: rgba(76, 201, 255, 0.10); color: var(--accent-blue);  border: 1px solid rgba(76, 201, 255, 0.35); }

/* —— 主按钮 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent-blue-deep), var(--accent-blue));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-glow-blue);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(76,201,255,0.6); }
.btn--ghost {
  background: transparent;
  color: var(--text-1);
  border: 1px solid rgba(76, 201, 255, 0.35);
}
.btn--ghost:hover { color: var(--accent-blue); border-color: var(--accent-blue); }

/* —— 滚动条美化 —— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--space-bg-0); }
::-webkit-scrollbar-thumb { background: rgba(76, 201, 255, 0.25); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(76, 201, 255, 0.45); }

/* —— 选中态 —— */
::selection { background: rgba(76, 201, 255, 0.35); color: #fff; }

/* ===== Hero / explore 文案占位等宽（hydration 前稳定宽度） ===== */
.metric-placeholder {
  display: inline-block;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
  min-width: 3ch;
  color: var(--accent-blue);
  letter-spacing: 0.02em;
}

/* =========================================================
   Phase 3 (P2) — mobile performance & touch-zone
   Per mobile plan §2.6 (font sizes) and §2.7 (background /
   backdrop-filter / hot-zone). Desktop >= 1100 layout above
   is byte-for-byte identical to the source; rules below only
   fire at <= 767 / <= 480 so nothing on the desktop layout
   changes.
   ========================================================= */

@media (max-width: 767px) {
  /* §2.7 background-attachment: fixed is expensive on mobile and
     causes a brief blank-canvas glitch on scroll on some Android
     devices; degrade to scroll so the radial gradients stay cheap. */
  body {
    background-attachment: scroll;
  }

  /* §2.7 backdrop-filter blur stacks on top of every glass card and
     every page header on mobile GPUs is the single biggest paint
     cost in the C-side bundle. Drop the blur, raise the glass tint
     so contrast still holds. */
  .glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(15, 28, 61, 0.85);
  }

  /* §2.6 small helper text size was 11-12 px which is below the
     Apple HIG 12 pt and Material 12 sp minimums; raise to 12-13
     to keep labels readable without changing the 14 px body size. */
  .tag {
    font-size: 12px;
    padding: 5px 12px;
  }
  .section-title {
    font-size: 22px;
  }
  .section-title .count {
    font-size: 13px;
  }

  /* §2.6 main button hit area was 36 px tall (10 px padding + 16 px
     line). Bump vertical padding to clear 44 px (the WCAG 2.5.5
     recommended touch target) without inflating the visible glyph. */
  .btn {
    padding: 13px 22px;
  }
}

@media (max-width: 480px) {
  /* Single-column phones keep the same body size; the tag and
     button bump from 767 carries over. We only tighten gutter. */
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 36px 0;
  }
}
