/* frontend/styles.css — 内测名额抢购 · 浅色多巴胺（00后）主题 */
:root {
  --magenta: #EC1490;
  --cyan: #0EA5C9;
  --cyan-bright: #2EE6FF;
  --violet: #7C3AED;
  --text: #241436;
  --muted: rgba(36, 20, 54, 0.62);
  --faint: rgba(36, 20, 54, 0.42);
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.86);
  --border: rgba(124, 58, 237, 0.18);
  --border-strong: rgba(124, 58, 237, 0.32);
  --radius: 18px;
  --btn-deep: #1B0A2C;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-color: #F5F3FF;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(70% 45% at 88% 4%, rgba(255, 46, 147, 0.14), transparent 62%),
    radial-gradient(60% 45% at 6% 96%, rgba(46, 230, 255, 0.18), transparent 62%),
    linear-gradient(180deg, #F8F5FF 0%, #F1ECFE 50%, #ECE6FD 100%);
  background-attachment: fixed;
}

.app {
  min-height: 100vh;
  padding: 56px 24px 64px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* 顶部眉标 */
.eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--violet);
}

.title {
  font-size: 44px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--text);
}

/* 关键短语渐变高亮（如「限量开放」） */
.grad { color: var(--magenta); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(120deg, var(--cyan), var(--magenta), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.subtitle {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 28px;
}

.divider {
  width: 100%;
  height: 2px;
  margin: 22px 0;
  background: var(--border);
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
  opacity: 0.65;
}

/* ====== 倒计时卡片 ====== */
.countdown-box {
  position: relative;
  padding: 34px 24px;
  text-align: center;
  margin-bottom: 28px;
  background: var(--card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
/* 顶部流光条 */
.countdown-box::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  opacity: 0.9;
}

.countdown-label {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--faint);
}

.countdown-time {
  display: inline-block;
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.35));
  will-change: transform;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .countdown-time {
    background: linear-gradient(120deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
/* 每秒 tick 脉冲（JS 逐秒重置该类触发） */
.countdown-time.tick { animation: tickPulse 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes tickPulse {
  0%   { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(236, 20, 144, 0.7)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.35)); }
}

.countdown-units {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 2px;
}

/* ====== 名额卡片 ====== */
.quota-box {
  position: relative;
  padding: 34px 24px;
  text-align: center;
  margin-bottom: 18px;
  background: var(--card-strong);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: cardGlow 2.6s ease-in-out infinite;
}
@keyframes cardGlow {
  0%, 100% { box-shadow: 0 14px 40px rgba(124, 58, 237, 0.14), 0 0 0 rgba(236, 20, 144, 0), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  50%      { box-shadow: 0 14px 40px rgba(124, 58, 237, 0.14), 0 0 42px rgba(236, 20, 144, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}

.quota-label {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--faint);
}

.quota-number {
  display: inline-block;
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
  color: var(--magenta);
  animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: transform, filter;
}
/* 渐变流光数字（支持 background-clip:text 时启用） */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .quota-number {
    background: linear-gradient(120deg, var(--cyan), var(--magenta), var(--violet), var(--cyan));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both,
               quotaShimmer 4s linear infinite,
               quotaGlow 2.2s ease-in-out infinite;
  }
}
@keyframes quotaShimmer { to { background-position: 300% 0; } }
@keyframes quotaGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(236, 20, 144, 0.30)) drop-shadow(0 0 22px rgba(14, 165, 201, 0.18)); }
  50%      { filter: drop-shadow(0 0 16px rgba(236, 20, 144, 0.55)) drop-shadow(0 0 40px rgba(14, 165, 201, 0.30)); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.55) translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.quota-total { font-size: 14px; margin-top: 12px; color: var(--muted); }

.dept-name { text-align: center; font-size: 13px; color: var(--faint); margin-bottom: 28px; }

/* ====== 按钮（CTA：gradient-word-sweep 充能词） ====== */
.btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 18px 24px;
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
/* 主按钮：深底 + 泛光，供充能渐变字读取 */
.btn:not(:disabled) {
  background: linear-gradient(120deg, #2A1245, var(--btn-deep));
  border: 1px solid rgba(124, 58, 237, 0.55);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35), 0 0 26px rgba(255, 46, 147, 0.28);
  animation: btnGlow 2.8s ease-in-out infinite;
}
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35), 0 0 18px rgba(255, 46, 147, 0.20); }
  50%      { box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35), 0 0 34px rgba(255, 46, 147, 0.45); }
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
  background: rgba(36, 20, 54, 0.08);
  color: var(--faint);
  box-shadow: none;
  cursor: not-allowed;
}

/* 充能词：gradient-word-sweep —— 快速左→右扫充（波前最亮）后转入稳态泛光呼吸 */
.btn-text { color: var(--cyan-bright); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .btn:not(:disabled) .btn-text {
    background: linear-gradient(120deg, #2EE6FF, #FF2E93, #7C3AED, #2EE6FF);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gwsCharge 0.75s cubic-bezier(0.25, 0.9, 0.3, 1) 0.15s both,
               gwsBreathe 2.8s ease-in-out 1.05s infinite;
  }
}
@keyframes gwsCharge {
  from { background-position: 130% 0; filter: brightness(2)    drop-shadow(0 0 14px rgba(255, 46, 147, 0.9)); }
  to   { background-position: 0% 0;   filter: brightness(1)    drop-shadow(0 0 6px  rgba(46, 230, 255, 0.5)); }
}
@keyframes gwsBreathe {
  0%, 100% { filter: brightness(1)    drop-shadow(0 0 6px  rgba(46, 230, 255, 0.5)); }
  50%      { filter: brightness(1.16) drop-shadow(0 0 18px rgba(255, 46, 147, 0.75)); }
}
.btn:disabled .btn-text { color: var(--faint); }

.btn-outline {
  background: transparent;
  color: var(--violet);
  border: 1.5px solid var(--border-strong);
  box-shadow: none;
}

/* ====== 状态页 ====== */
.status-icon {
  font-size: 76px;
  margin-bottom: 22px;
  line-height: 1;
  color: var(--magenta);
  filter: drop-shadow(0 0 16px rgba(236, 20, 144, 0.45)) drop-shadow(0 0 40px rgba(14, 165, 201, 0.25));
  animation: popIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.status-title { font-size: 32px; font-weight: 900; margin-bottom: 12px; color: var(--text); }
.status-desc { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 30px; }

/* 身份信息卡 */
.id-card {
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.10);
}
.id-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(36, 20, 54, 0.08);
}
.id-row:last-child { border-bottom: none; }
.id-label { color: var(--faint); font-weight: 600; }
.id-value { font-weight: 700; color: var(--text); }

/* 加载 */
.loading { text-align: center; padding: 90px 0; }
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(36, 20, 54, 0.12);
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--faint); }

/* 活动规则 */
.rules { margin-top: auto; padding-top: 30px; }
.rules-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; letter-spacing: 1px; color: var(--violet); }
.rules-list { list-style: none; font-size: 13px; line-height: 1.9; color: var(--muted); }
.rules-list li { padding-left: 18px; position: relative; }
.rules-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 7px; height: 7px;
  background: linear-gradient(120deg, var(--cyan), var(--magenta));
  border-radius: 2px;
}

/* 无障碍：尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .countdown-time.tick,
  .quota-number,
  .quota-box,
  .status-icon,
  .btn:not(:disabled),
  .btn:not(:disabled) .btn-text { animation: none !important; }
  .btn { transition: none !important; }
}
