:root {
  color-scheme: dark;
  --bg: #08070d;
  --bg-soft: #0f0e18;
  --header-bg: rgba(13, 12, 22, 0.72);
  --card: #14121f;
  --input-bg: #1c1a2b;
  --text: #f4f2fb;
  --muted: #a29eb8;
  --border: #2a2639;
  --accent1: #8b5cf6;
  --accent2: #06b6d4;
  --accent3: #ec4899;
  --accent-soft: rgba(139, 92, 246, 0.18);
  --error: #ff4d67;
  --error-soft: rgba(255, 77, 103, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --up: #ff5a6e;
  --up-soft: rgba(255, 90, 110, 0.16);
  --down: #2fbf71;
  --down-soft: rgba(47, 191, 113, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --grad: linear-gradient(120deg, var(--accent1), var(--accent2) 50%, var(--accent3));
}

body.light {
  color-scheme: light;
  --bg: #f5f3fc;
  --bg-soft: #ece9f8;
  --header-bg: rgba(255, 255, 255, 0.78);
  --card: #ffffff;
  --input-bg: #f2f0fa;
  --text: #17141f;
  --muted: #645f78;
  --border: #ddd8ec;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --error: #d7002c;
  --error-soft: rgba(215, 0, 44, 0.1);
  --success: #15803d;
  --success-soft: rgba(52, 211, 153, 0.16);
  --up: #e11d48;
  --up-soft: rgba(225, 29, 72, 0.12);
  --down: #16a34a;
  --down-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 20px 60px rgba(80, 60, 160, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: var(--accent1); color: #fff; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 流动光斑背景 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 480px; height: 480px; left: -120px; top: -100px; background: var(--accent1); }
.orb-2 { width: 420px; height: 420px; right: -100px; top: 30%; background: var(--accent2); animation-delay: -6s; }
.orb-3 { width: 380px; height: 380px; left: 30%; bottom: -160px; background: var(--accent3); animation-delay: -12s; }
body.light .orb { opacity: 0.22; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-40px, 70px) scale(0.94); }
}

/* 头部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn, .theme-toggle {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.icon-btn:hover, .theme-toggle:hover { background: var(--input-bg); }
.icon-btn:active, .theme-toggle:active { transform: scale(0.96); }

/* 音乐均衡器动画 */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 40%; background: var(--accent1); border-radius: 2px; transition: background 0.2s; }
#music-toggle.playing .eq i { background: var(--accent2); animation: eq-bounce 0.9s ease-in-out infinite; }
#music-toggle.playing .eq i:nth-child(2) { animation-delay: 0.15s; }
#music-toggle.playing .eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eq-bounce {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -5%;
  background: url("assets/images/hero.jpg") center 30% / cover no-repeat;
  filter: brightness(1.18) saturate(1.05);
  animation: kenburns 24s ease-in-out infinite alternate;
  z-index: -2;
}
@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.12) translateY(-2%); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,7,13,0.18), rgba(8,7,13,0.55));
  z-index: -1;
}
body.light .hero-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.68));
}
.hero-content { max-width: 760px; }
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(42px, 7.5vw, 82px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 22px;
}
.hero-sub { color: var(--muted); font-size: clamp(16px, 2.4vw, 20px); max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--header-bg); backdrop-filter: blur(10px); }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.scroll-hint span {
  display: block;
  width: 26px; height: 42px;
  border: 2px solid var(--muted);
  border-radius: 14px;
  position: relative;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--muted);
  animation: scroll-dot 1.6s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* 分区通用 */
.section { max-width: 1120px; margin: 0 auto; padding: 110px 24px; }
.section-alt { max-width: none; padding-left: 0; padding-right: 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--accent2);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* 画廊 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover, .gallery-item:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(139, 92, 246, 0.35);
  outline: none;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 42px 16px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.72));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* 视频 */
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-alt .section-head { margin-left: auto; margin-right: auto; }
.video-wrap {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.video-wrap video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.video-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 74px; height: 74px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.video-play:hover { background: var(--accent1); transform: translate(-50%, -50%) scale(1.08); }
.video-wrap.playing .video-play { opacity: 0.3; }
.video-wrap.playing .video-play:hover { opacity: 1; }
.sound-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.1s ease;
}
.sound-btn:hover { background: var(--accent1); }
.sound-btn:active { transform: scale(0.94); }

/* 股票行情 */
.stock-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: -24px auto 34px;
  flex-wrap: wrap;
}
.stock-refresh {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.stock-refresh:hover { background: var(--input-bg); }
.stock-refresh:active { transform: scale(0.96); }
.stock-refresh.loading { opacity: 0.6; pointer-events: none; }
.stock-status { color: var(--muted); font-size: 13px; }
.stock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stock-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stock-card:hover { transform: translateY(-6px); border-color: var(--accent1); }
.stock-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stock-name { font-weight: 700; font-size: 17px; }
.stock-code { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.stock-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; }
.stock-change { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-top: 4px; }
.stock-change .pct { border-radius: 999px; padding: 2px 10px; }
.stock-card.up .stock-price, .stock-card.up .stock-change { color: var(--up); }
.stock-card.down .stock-price, .stock-card.down .stock-change { color: var(--down); }
.stock-card.flat .stock-price, .stock-card.flat .stock-change { color: var(--muted); }
.stock-card.up .pct { background: var(--up-soft); }
.stock-card.down .pct { background: var(--down-soft); }
.stock-card.flat .pct { background: var(--accent-soft); }
.stock-spark { display: block; width: 100%; height: 44px; margin-top: 14px; }

.stock-subhead {
  text-align: center;
  margin: 48px auto 24px;
  max-width: 640px;
}
.stock-subhead .kicker { margin-bottom: 8px; }
.stock-subhead h3 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.stock-rank {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.rank-item:hover { transform: translateY(-2px); border-color: var(--accent1); }
.rank-index { font-size: 14px; font-weight: 800; color: var(--muted); }
.rank-item:nth-child(1) .rank-index { color: var(--up); }
.rank-item:last-child .rank-index { color: var(--down); }
.rank-name { display: flex; flex-direction: column; min-width: 0; }
.rank-name .name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .code { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.rank-price { font-weight: 700; font-size: 15px; text-align: right; }
.rank-pct {
  min-width: 78px;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 4px 12px;
}
.rank-item.up .rank-price, .rank-item.up .rank-pct { color: var(--up); }
.rank-item.down .rank-price, .rank-item.down .rank-pct { color: var(--down); }
.rank-item.flat .rank-price, .rank-item.flat .rank-pct { color: var(--muted); }
.rank-item.up .rank-pct { background: var(--up-soft); }
.rank-item.down .rank-pct { background: var(--down-soft); }
.rank-item.flat .rank-pct { background: var(--accent-soft); }

/* 跑步记录 */
.run-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}
.run-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.run-stat-value {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.run-stat-label { color: var(--muted); font-size: 13px; }
.run-chart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.run-chart-title { color: var(--muted); font-size: 13px; margin-bottom: 18px; text-align: center; }
.run-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.run-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.run-bar-fill {
  width: 60%;
  max-width: 44px;
  background: var(--grad);
  border-radius: 8px 8px 3px 3px;
  min-height: 6px;
  transition: height 0.4s ease;
}
.run-bar-value { font-size: 12px; color: var(--text); font-weight: 600; }
.run-bar-label { font-size: 11px; color: var(--muted); }
.run-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.run-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.run-item:hover { transform: translateY(-2px); border-color: var(--accent1); }
.run-date { color: var(--muted); font-size: 13px; }
.run-date b { display: block; color: var(--text); font-size: 16px; }
.run-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.run-main-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.run-distance { font-weight: 800; font-size: 20px; }
.run-distance small { color: var(--muted); font-weight: 600; font-size: 12px; }
.run-meta { color: var(--muted); font-size: 13px; }
.run-bar-track { height: 6px; background: var(--input-bg); border-radius: 999px; overflow: hidden; }
.run-bar-track span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.run-side { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.run-pace { font-weight: 700; font-size: 16px; }
.run-duration { color: var(--muted); font-size: 13px; }

/* 联系表单 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 46px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input.invalid, textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 4px var(--error-soft);
}
.error { display: block; color: var(--error); font-size: 12px; margin-top: 6px; min-height: 18px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--accent1); cursor: pointer; }
.submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 980px;
  background: var(--grad);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.1s ease;
}
.submit-btn:hover { filter: brightness(1.08); }
.submit-btn:active { transform: scale(0.98); }
.success {
  color: var(--success);
  background: var(--success-soft);
  text-align: center;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 15px;
}

/* 灯箱 */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  animation: fade-in 0.25s ease;
}
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lightbox-close {
  position: absolute;
  top: 22px; right: 28px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 40px 24px 56px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

#celebration-canvas { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stock-grid { grid-template-columns: repeat(2, 1fr); }
  .run-stats { grid-template-columns: repeat(2, 1fr); }
  .run-item { grid-template-columns: 72px 1fr auto; gap: 10px; padding: 14px 14px; }
  .card { padding: 30px 22px; }
  .section { padding: 80px 20px; }
}
