/* 首页 · 深色电影感大片风（独立主题，不影响内页/后台） */

:root {
  --h-bg: #0b0c0f;
  --h-bg2: #101218;
  --h-ink: #f5f7fb;        /* 主标题 */
  --h-text: #c8cdd8;       /* 正文 */
  --h-muted: #8a93a4;      /* 弱化 */
  --h-faint: #565f70;      /* 极弱 */
  --h-line: rgba(255, 255, 255, 0.10);
  --h-line-soft: rgba(255, 255, 255, 0.06);
  --h-panel: rgba(255, 255, 255, 0.035);

  --h-cyan: #19c2ff;
  --h-blue: #2f6bff;
  --h-violet: #7b5bff;
  --h-grad: linear-gradient(115deg, #19c2ff 0%, #2f6bff 52%, #7b5bff 100%);

  --h-ease: cubic-bezier(.2, .8, .2, 1);
  --h-font-display: "Fraunces", ui-serif, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --h-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body.home {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--h-bg);
  color: var(--h-text);
  font-family: var(--h-font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* 背景（黑洞 + 流星星空）由 dark.css 的 .space-bg 统一提供 */

/* ---------- 顶栏 ---------- */

.home-top {
  position: relative; z-index: 5;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 26px 40px;
  display: flex; align-items: center; gap: 28px;
}
.home-brand {
  font-family: var(--h-font-display); font-size: 1.18rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--h-ink);
}
.home-brand .dot { background: var(--h-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.home-nav { display: flex; gap: 30px; margin-left: auto; }
.home-nav a {
  position: relative; font-size: 1rem; letter-spacing: .02em; font-weight: 500;
  color: #e3e8f0; transition: color .2s;
}
.home-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1.5px;
  background: var(--h-grad); border-radius: 2px; transition: right .3s var(--h-ease);
}
.home-nav a:hover { color: #fff; }
.home-nav a:hover::after { right: 0; }

/* ---------- 主区 ---------- */

.home-main {
  position: relative; z-index: 5;
  flex: 1; width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 24px 40px 40px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--h-muted);
  margin-bottom: 26px;
}
.kicker::before { content: ""; width: 34px; height: 1.5px; background: var(--h-grad); }

.hero-title {
  font-family: var(--h-font-display); color: var(--h-ink);
  font-size: clamp(3.2rem, 7.6vw, 6.4rem); line-height: .98; letter-spacing: -.035em;
  font-weight: 560; margin: 0 0 .34em; font-optical-sizing: auto;
  font-variation-settings: "opsz" 144;
}
.hero-title .em {
  font-style: italic; font-weight: 500;
  background: var(--h-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-lede {
  color: var(--h-text); font-size: 1.12rem; line-height: 1.7; max-width: 42ch; margin: 0 0 30px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.hero-meta span {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; letter-spacing: .04em; color: var(--h-muted);
}
.hero-meta span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--h-grad); box-shadow: 0 0 10px rgba(47, 107, 255, .7);
}

/* ---------- 兑换面板（玻璃质感卡片，重设计） ---------- */

.redeem-panel {
  position: relative; border-radius: 24px; padding: 32px 30px 26px;
  background: #101216;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 52px 120px -42px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 头部：eyebrow + 标题 + 步骤徽标 */
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.panel-eyebrow { font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--h-muted); margin-bottom: 9px; }
.panel-title { font-family: var(--h-font-display); font-size: 1.72rem; font-weight: 560; color: var(--h-ink); margin: 0; letter-spacing: -.01em; }
.panel-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--h-line); background: rgba(255, 255, 255, 0.04); font-size: .72rem; color: var(--h-muted); white-space: nowrap; }
.panel-badge .dot2 { width: 6px; height: 6px; border-radius: 50%; background: #e6ebf3; box-shadow: 0 0 8px rgba(230, 235, 243, .6); }
.panel-badge b { color: var(--h-ink); font-weight: 600; }

/* 字段 + 带图标输入 */
.h-field { margin-bottom: 20px; }
.h-field label { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--h-muted); margin-bottom: 10px; }
.h-input {
  width: 100%; padding: 15px 16px; font-size: 1.06rem; letter-spacing: .1em;
  color: var(--h-ink); background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--h-line); border-radius: 14px; outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.h-input::placeholder { color: var(--h-faint); letter-spacing: .02em; font-family: var(--h-font-sans); }
.h-input:focus { border-color: rgba(255, 255, 255, 0.42); background: rgba(255, 255, 255, 0.055); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.field-tip { font-size: .78rem; color: var(--h-faint); margin-top: 10px; }

/* 主按钮 */
.h-btn {
  width: 100%; margin-top: 4px; padding: 15px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 600; font-size: 1.02rem; letter-spacing: .02em; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 14px; cursor: pointer;
  background: #1b1e24;
  box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform .15s var(--h-ease), box-shadow .2s var(--h-ease), border-color .2s, background .2s;
}
.h-btn .arr { transition: transform .2s var(--h-ease); }
.h-btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.32); background: #23262e; box-shadow: 0 28px 54px -18px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.h-btn:hover .arr { transform: translateX(4px); }
.h-btn:active { transform: translateY(0) scale(.99); }
.h-btn .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.h-btn.is-loading { pointer-events: none; opacity: .92; }
.h-btn.is-loading .arr { display: none; }
.h-btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.h-alert {
  padding: 12px 15px; border-radius: 12px; margin-bottom: 18px; font-size: .9rem;
  background: rgba(210, 59, 59, 0.12); border: 1px solid rgba(210, 59, 59, 0.4); color: #ff9b9b;
}
.panel-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--h-line-soft);
  font-size: .84rem; color: var(--h-muted); text-align: center;
}
.panel-foot a { color: var(--h-ink); border-bottom: 1px solid var(--h-line); }
.panel-foot a:hover { border-color: var(--h-blue); }

/* ---------- 底栏：电影感索引 ---------- */

.home-foot {
  position: relative; z-index: 5;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 40px 30px;
  display: flex; align-items: center; gap: 18px;
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--h-faint);
}
.home-foot .idx { color: var(--h-muted); }
.home-foot .idx b { color: var(--h-ink); font-weight: 600; }
.home-foot .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--h-line), transparent); }
.home-foot .copy { letter-spacing: .04em; text-transform: none; }

/* ---------- 离场过渡：前景淡出，背景星空保留（与下一页背景连续） ---------- */

.home-top, .home-main, .home-foot { transition: opacity .3s var(--h-ease), transform .34s var(--h-ease); }
body.leaving .home-top, body.leaving .home-main, body.leaving .home-foot {
  opacity: 0; transform: translateY(-12px); pointer-events: none; animation: none;
}

/* ---------- 入场动画 ---------- */

.reveal { opacity: 0; transform: translateY(22px); animation: reveal .9s var(--h-ease) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; }
.d4 { animation-delay: .35s; } .d5 { animation-delay: .5s; } .d6 { animation-delay: .62s; }

@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
@keyframes sheen { from { background-position: 0% 0; } to { background-position: 220% 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 107, 255, .5); }
  70% { box-shadow: 0 0 0 10px rgba(47, 107, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 107, 255, 0); }
}
@keyframes orb-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(-7vw, 6vw) scale(1.14); } }
@keyframes orb-b { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vw, -5vw) scale(1.1); } }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .home-main { grid-template-columns: 1fr; gap: 30px; padding: 8px 24px 32px; }
  .home-top { padding: 20px 24px; }
  .home-foot { padding: 16px 24px 26px; }
  .hero-lede { margin-bottom: 24px; }
}
@media (max-width: 560px) {
  .home-top { flex-wrap: wrap; gap: 10px 16px; padding: 16px 18px; }
  .home-nav { gap: 18px; margin-left: 0; width: 100%; }
  .home-nav a { font-size: .9rem; }
  .home-main { padding: 4px 18px 28px; }
  .hero-title { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .hero-lede { font-size: 1.02rem; }
  .hero-meta { gap: 10px 18px; }
  .redeem-panel { padding: 24px 18px; }
  .panel-title { font-size: 1.5rem; }
  .home-foot { flex-wrap: wrap; gap: 6px 12px; }
  .home-foot .rule { display: none; }
  .home-foot .copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
