/* ============================================================
   DeepSleep 官网样式
   视觉与 APP 夜间主题对齐（docs/04_UIUX_设计规范 v2.2）
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  /* 品牌色（夜间紫罗兰） */
  --color-primary: #6B7FD7;
  --color-primary-light: #8B9FE8;
  --color-primary-dark: #5A6BC4;
  --color-primary-gradient: #8B5CF6;

  /* 背景 */
  --bg-deepest: #080B14;
  --bg-primary: #0D1220;
  --bg-card: #141929;
  --bg-hover: #1A2138;

  /* 文字 */
  --text-primary: #E8ECF5;
  --text-secondary: #9AA3B8;
  --text-tertiary: #5A6578;

  /* 边框 */
  --border-color: #1E2640;
  --border-light: #252D45;

  /* 功能色 */
  --color-warning: #E8A23B;
  --color-info: #3D9FE8;
  --color-error: #E05C5C;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 80px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-navbar: 0 2px 10px rgba(0, 0, 0, 0.2);

  /* 布局 */
  --container-width: 1200px;
  --breakpoint-tablet: 1023px;
  --breakpoint-mobile: 767px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 40px;
  border-radius: var(--radius-full);
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease,
    border-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 24px; font-size: 14px; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 127, 215, 0.35);
}
.btn-orange {
  background: linear-gradient(90deg, #FF6B35, #FF8C5A);
  color: #fff;
}
.btn-orange:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
}
.btn-ghost {
  border: 1px solid var(--text-tertiary);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-store {
  gap: 14px;
  padding: 14px 32px;
  background: var(--bg-card);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
}
.btn-store small {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  text-align: left;
}
.btn-store:hover { background: var(--bg-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
  background: rgba(13, 18, 32, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-navbar);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links > a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.nav-links > a:hover { color: var(--text-primary); }
.nav-links > .nav-cta-mobile { display: none; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-deepest) 0%, #1A2A5E 100%);
  padding: 120px 0 100px;
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute;
  right: 8%;
  bottom: -10%;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 127, 215, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.hero-badge {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(107, 127, 215, 0.14);
  color: var(--color-primary-light);
  font-size: 13px;
  letter-spacing: 2px;
}
.hero-title {
  font-size: 56px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 0 40px rgba(107, 127, 215, 0.35);
}
.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
}
.hero-actions { display: flex; gap: 16px; margin-top: 8px; }
.hero-chips {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-chips li {
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: rgba(20, 25, 41, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}
.hero-moon {
  position: absolute;
  right: 8%;
  bottom: 12%;
  z-index: 1;
  filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- 通用区块 ---------- */
.section { padding: 100px 0 110px; }
.section-alt { background: var(--bg-deepest); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 52px;
}
.section-kicker {
  font-size: 14px;
  color: var(--color-primary-light);
  letter-spacing: 3px;
}
.section-title {
  font-size: 34px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: var(--space-lg); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease,
    border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--bg-hover);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}
.card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.card p a { color: var(--color-primary-light); }
.card p a:hover { text-decoration: underline; }

.card-icon {
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(107, 127, 215, 0.1);
  margin-bottom: 18px;
}

/* ---------- 使用场景 ---------- */
.scene-tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-warning);
  margin-bottom: 10px;
}
.scenario-card h3 { margin-bottom: 8px; }

/* ---------- VIP 定价 ---------- */
.vip-grid { align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; }
.plan-highlight {
  border: 1.5px solid var(--color-primary);
  background: linear-gradient(180deg, rgba(107, 127, 215, 0.08) 0%, var(--bg-card) 60%);
}
.plan-tag {
  position: absolute;
  top: 20px; right: 20px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
}
.plan-name { font-size: 18px; font-weight: 600; color: var(--text-secondary); }
.plan-highlight .plan-name { color: var(--color-primary-light); }
.plan-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
}
.plan-highlight .plan-price { color: #fff; }
.plan-price small { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.plan-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.plan-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}
.plan-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(107, 127, 215, 0.4);
}
.vip-note {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- 下载区 ---------- */
.download {
  background: linear-gradient(180deg, var(--bg-deepest) 0%, var(--bg-primary) 100%);
  padding: 110px 0 120px;
}
.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.download-actions { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.download-version { font-size: 13px; color: var(--text-tertiary); }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-deepest);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-company { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.footer-text { font-size: 13px; color: var(--text-tertiary); }
.footer-text a:hover { color: var(--color-info); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--text-tertiary); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--color-info); }
.footer-note { max-width: 720px; }

/* ---------- 滚动动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 法务子页（用户协议 / 隐私政策 / 会员协议 / 退款政策） ---------- */
.legal-page {
  padding: 140px 0 100px;
  background: var(--bg-primary);
}
.legal-container {
  max-width: 820px;
}
.legal-container h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.legal-container h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.legal-container p, .legal-container ul {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 10px;
}
.legal-container ul { padding-left: 20px; list-style: disc; }
.legal-container strong { color: var(--text-primary); }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  text-align: left;
  color: var(--text-secondary);
}
.legal-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 42px; }
  .section-title { font-size: 30px; }
}

@media (max-width: 767px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed;
    top: 72px; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: min(72vw, 300px);
    padding: 28px 24px;
    background: rgba(13, 18, 32, 0.98);
    box-shadow: var(--shadow-hover);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > .nav-cta-mobile { display: inline-flex; }
  .nav-actions .btn { display: none; }
  .hamburger { display: flex; }
  .hero { min-height: 90vh; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-moon { width: 80px; height: 80px; right: 6%; }
  .section { padding: 72px 0 80px; }
  .section-title { font-size: 28px; }
  .section-head { margin-bottom: 36px; }
  .plan-price { font-size: 30px; }
  .download-actions { flex-direction: column; width: 100%; max-width: 320px; }
}
