/* 魔方刷题系统 · 营销页设计 Token（深色模式） */
:root {
  --bg-deep: #05070d;
  --bg-base: #0a0f1e;
  --bg-elevated: #101828;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --primary: #10b981;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --cta: #f97316;
  --cta-hover: #ea6a0a;
  --cta-glow: rgba(249, 115, 22, 0.28);
  --danger: #f87171;
  --radius: 16px;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --font-heading: 'Poppins', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 60%, var(--bg-deep) 100%);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

.font-heading { font-family: var(--font-heading); }
.tnum { font-variant-numeric: tabular-nums; }

/* 环境光斑 */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 30px, 0) scale(1.12); }
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s var(--easing), box-shadow 0.25s var(--easing), background 0.2s var(--easing);
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-cta {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 8px 32px var(--cta-glow);
}
.btn-cta:hover { background: var(--cta-hover); box-shadow: 0 10px 40px var(--cta-glow); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
}
.badge-dot { width: 7px; height: 7px; border-radius: 999px; }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--easing), transform 0.6s var(--easing); }
.reveal.visible { opacity: 1; transform: none; }

/* FAQ */
details.faq { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .faq-icon { transition: transform 0.25s var(--easing); flex-shrink: 0; }
details.faq[open] summary .faq-icon { transform: rotate(45deg); }
details.faq .faq-body { padding: 0 20px 20px; color: var(--muted); }

/* 弹窗 */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--easing);
}
.modal-scrim.open { opacity: 1; pointer-events: auto; }
.modal-box {
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s var(--easing);
}
.modal-scrim.open .modal-box { transform: none; }

/* 表格 */
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table thead th { color: var(--muted); font-weight: 500; font-size: 13px; }

/* 手机框 mock */
.phone-frame {
  border: 1px solid var(--border);
  border-radius: 32px;
  background: #0b1220;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* 降级动效 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
