/* ============================================================
   星程日历 · 全局样式
   深色渐变 / 玻璃拟态 / 细腻排版 / 微动效
   ============================================================ */

:root {
  --bg: #070713;
  --bg-2: #0b0b1e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0ff;
  --muted: #9aa3c2;
  --muted-2: #6b7290;
  --primary: #8b5cf6;
  --primary-2: #ec4899;
  --accent: #22d3ee;
  --grad: linear-gradient(120deg, #8b5cf6, #ec4899 55%, #f59e0b);
  --grad-soft: linear-gradient(120deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.18));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; color: inherit; }

::selection { background: rgba(139, 92, 246, 0.4); }

/* ---------- 背景 ---------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
  radial-gradient(1200px 800px at 15% -10%, #1b1147 0%, transparent 55%),
  radial-gradient(1000px 700px at 110% 20%, #2a1140 0%, transparent 50%),
  radial-gradient(900px 900px at 50% 120%, #0e1c45 0%, transparent 55%),
  linear-gradient(180deg, #070713 0%, #0a0a1d 100%);
}
.aurora { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); opacity: 0.5; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.aurora.a1 { background: #6d28d9; top: -140px; left: -120px; }
.aurora.a2 { background: #db2777; top: 30%; right: -160px; animation-delay: -6s; animation-duration: 26s; }
.aurora.a3 { background: #0ea5e9; bottom: -160px; left: 30%; animation-delay: -12s; animation-duration: 30s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}
.starfield { position: absolute; inset: 0; }
.starfield i {
  position: absolute; background: #fff; border-radius: 50%; opacity: 0;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

/* ---------- 顶部导航 ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(10, 10, 26, 0.72); backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--border); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: 0.5px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
  color: #fff; font-size: 16px; animation: spin-slow 10s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--muted); transition: color 0.25s, background 0.25s; }
.nav-menu a:hover { color: var(--text); background: var(--surface-2); }
.nav-menu a.active { color: #fff; background: linear-gradient(120deg, rgba(139,92,246,0.28), rgba(236,72,153,0.22)); box-shadow: inset 0 0 0 1px var(--border-strong); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 600;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
  will-change: transform; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(236, 72, 153, 0.45); }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-xs { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- 通用容器 / 区块 ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 600; transition: opacity 0.2s; }
.text-link:hover { opacity: 0.75; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55); }

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

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 132px 0 40px; position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.08);
  padding: 6px 16px; border-radius: 999px; letter-spacing: 1px;
}
.hero-title { font-size: clamp(40px, 7vw, 72px); font-weight: 900; line-height: 1.15; margin: 22px 0 18px; letter-spacing: 1px; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 560px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats span { color: var(--muted); font-size: 13px; letter-spacing: 1px; }

/* ---------- 事件卡片 ---------- */
.event-card { padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; cursor: pointer; }
.event-card:hover { transform: translateY(-5px); }
.ev-date { min-width: 74px; text-align: center; }
.ev-day { display: block; font-size: 13px; color: var(--muted); }
.ev-badge {
  display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; color: #0b0b1e;
}
.ev-badge.today { background: var(--grad); color: #fff; animation: pulse-badge 2s infinite; }
.ev-badge.tomorrow { background: rgba(34, 211, 238, 0.9); }
.ev-badge.later { background: rgba(139, 92, 246, 0.85); }
.ev-badge.past { background: rgba(148, 163, 184, 0.5); color: #fff; }
@keyframes pulse-badge { 0%,100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5);} 50% { box-shadow: 0 0 0 8px rgba(236, 72, 153, 0);} }
.ev-main { flex: 1; min-width: 0; }
.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ev-main h3 { font-size: 16px; font-weight: 700; line-height: 1.4; }
.ev-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ev-time { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; display: flex; gap: 6px; align-items: center; }

/* ---------- 类型标签 / chip ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid var(--border-strong); }

.filter-chip { padding: 8px 16px; border-radius: 999px; font-size: 13.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); transition: all 0.25s; }
.filter-chip:hover { color: var(--text); background: var(--surface-2); }
.filter-chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35); }

/* ---------- 明星卡片 ---------- */
.star-card { padding: 24px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.star-avatar {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: #fff; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--c, #8b5cf6), color-mix(in srgb, var(--c, #8b5cf6) 55%, #000));
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06), 0 14px 40px color-mix(in srgb, var(--c, #8b5cf6) 45%, transparent);
  position: relative; margin-bottom: 14px;
}
.star-avatar::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); }
.star-card h3 { font-size: 19px; font-weight: 800; }
.star-card .star-role { color: var(--muted); font-size: 13px; margin: 3px 0 10px; }
.star-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.star-tags span { font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,0.06); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }
.star-count { font-size: 12.5px; color: var(--muted-2); margin-bottom: 16px; }
.star-card .btn { width: 100%; }

.fav-btn {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; color: var(--muted-2);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); transition: all 0.25s;
}
.fav-btn:hover { transform: scale(1.12); color: var(--primary-2); }
.fav-btn.on { color: #fff; background: linear-gradient(135deg, #f43f5e, #ec4899); border-color: transparent; animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.6);} 60% { transform: scale(1.25);} 100% { transform: scale(1);} }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px 24px; position: relative; overflow: hidden; }
.step-num {
  font-size: 44px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; opacity: 0.9; line-height: 1;
}
.step h3 { margin: 14px 0 8px; font-size: 18px; font-weight: 800; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- 行程页：工具栏 ---------- */
.toolbar { display: flex; flex-direction: column; gap: 16px; padding: 118px 0 8px; }
.search-wrap { position: relative; max-width: 460px; }
.search-wrap input {
  width: 100%; padding: 13px 18px 13px 44px; border-radius: 999px; font-size: 14.5px;
  background: var(--surface-2); border: 1px solid var(--border-strong); outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2); }
.search-wrap::before { content: '🔍'; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: 0.7; }
.toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.select {
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; background: var(--surface-2);
  border: 1px solid var(--border-strong); outline: none; cursor: pointer; color: var(--text);
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
.select:focus { border-color: var(--primary); }
.select option { background: #14142e; color: var(--text); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.count-line { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

/* ---------- 空状态 ---------- */
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 0; font-size: 14px; }

/* ---------- 明星详情页 ---------- */
.detail-hero { padding: 118px 0 0; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.detail-hero .star-avatar { width: 120px; height: 120px; font-size: 42px; margin-bottom: 0; }
.detail-info { flex: 1; min-width: 260px; }
.detail-info h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.detail-info .role { color: var(--muted); margin: 4px 0 10px; }
.detail-info .desc { color: var(--muted); font-size: 14.5px; max-width: 640px; }
.detail-stats { display: flex; gap: 32px; margin-top: 18px; flex-wrap: wrap; }
.detail-stats b { display: block; font-size: 22px; font-weight: 800; }
.detail-stats span { font-size: 12.5px; color: var(--muted-2); }
.detail-actions { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.detail-actions .btn { width: 100%; }

/* 时间线 */
.timeline { position: relative; margin-top: 34px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, rgba(139,92,246,0.6), rgba(236,72,153,0.15)); }
.tl-item { position: relative; padding: 0 0 26px 44px; }
.tl-dot { position: absolute; left: 0; top: 20px; width: 24px; height: 24px; border-radius: 50%; background: var(--c, #8b5cf6); border: 4px solid rgba(255,255,255,0.85); box-shadow: 0 0 0 5px rgba(139,92,246,0.25); }
.tl-dot.today-dot { animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 5px rgba(236,72,153,0.3);} 50% { box-shadow: 0 0 0 12px rgba(236,72,153,0);} }
.tl-card { padding: 18px 20px; }
.tl-card h3 { font-size: 16.5px; font-weight: 800; margin: 8px 0 6px; }
.tl-card .ev-desc { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

/* ---------- 订阅帮助页 ---------- */
.help-hero { text-align: center; padding: 118px 0 30px; }
.help-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; }
.help-hero p { color: var(--muted); margin-top: 10px; max-width: 620px; margin-left: auto; margin-right: auto; }
.platform-card { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.platform-head { display: flex; align-items: center; gap: 14px; }
.platform-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--grad-soft); border: 1px solid var(--border-strong); }
.platform-card h3 { font-size: 18px; font-weight: 800; }
.platform-card p { color: var(--muted); font-size: 13.5px; }
.steps-ol { counter-reset: s; list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.steps-ol li { position: relative; padding-left: 34px; color: var(--muted); font-size: 13.5px; }
.steps-ol li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tip-box { background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.25); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: #b9e8f7; }

.link-box { display: flex; gap: 10px; margin-top: 12px; }
.link-box input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 13px; color: var(--accent); outline: none; }
.link-box .btn { padding: 12px 16px; font-size: 13px; }

/* ---------- 订阅弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(5, 5, 14, 0.75); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal-card { position: relative; width: min(460px, 100%); max-height: 90vh; overflow-y: auto; background: linear-gradient(180deg, #151532, #0c0c22); border: 1px solid var(--border-strong); border-radius: 24px; padding: 30px; box-shadow: 0 40px 120px rgba(0,0,0,0.6); animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--muted); font-size: 18px; transition: all 0.25s; }
.modal-close:hover { color: #fff; transform: rotate(90deg); }
.sub-modal { text-align: center; }
.sub-modal .star-avatar { margin: 0 auto 12px; width: 72px; height: 72px; font-size: 26px; }
.sub-modal h3 { font-size: 21px; font-weight: 800; }
.sub-modal .hint { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.qr-wrap { display: inline-block; position: relative; padding: 12px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.qr-wrap img { width: 220px; height: 220px; }
.qr-fallback { display: grid; place-items: center; width: 220px; height: 220px; color: #333; font-size: 12px; }
.qr-hint { color: var(--muted); font-size: 12.5px; margin: 12px 0 4px; }
.platform-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: rgba(20, 20, 46, 0.95); border: 1px solid var(--border-strong); color: var(--text); padding: 12px 22px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 300; backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.footer { margin-top: 80px; border-top: 1px solid var(--border); background: rgba(7, 7, 19, 0.6); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 40px 24px; text-align: center; }
.footer-brand { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.footer-inner p { color: var(--muted); font-size: 13px; }
.footer-muted { color: var(--muted-2); font-size: 12px !important; margin-top: 12px; }

/* ---------- 滚动显现动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .nav-menu { position: absolute; top: 100%; left: 12px; right: 12px; flex-direction: column; align-items: stretch; background: rgba(14, 14, 34, 0.96); backdrop-filter: blur(20px); border: 1px solid var(--border-strong); border-radius: 18px; padding: 12px; gap: 4px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: all 0.3s; }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a { padding: 12px 14px; }
  .nav-menu .btn { margin-top: 6px; }
  .nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  main, .nav-inner, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding-top: 44px; }
  .hero { padding-top: 110px; }
  .hero-stats { gap: 26px; }
  .toolbar { padding-top: 100px; }
  .detail-hero { justify-content: center; text-align: center; }
  .detail-hero .star-avatar { margin: 0 auto; }
  .detail-stats { justify-content: center; }
  .platform-row { grid-template-columns: 1fr; }
}
