/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 全局 ───────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --border:    rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text:      #f0f0f0;
  --text-muted:#888888;
  --accent:    #ffffff;
  --accent-dim: rgba(255,255,255,0.06);
  --green:     #3ecf8e;
  --red:       #ff4d4f;
  --radius:    14px;
  --radius-sm: 8px;
}

/* body 只做基础样式，不做 flex 居中（会破坏多 section 页面） */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ── 顶部导航（所有页面共用）────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--accent-dim); }
/* 邮箱展示 —— 小标签样式，低调不抢眼 */
.nav-user-email {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 10px;
  border-radius: 20px;
  cursor: default;
  user-select: none;
  letter-spacing: 0.01em;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-links a.primary {
  color: #0a0a0a;
  background: var(--accent);
  font-weight: 500;
}
.nav-links a.primary:hover { background: #e0e0e0; }

/* ── 首页专用：page-wrap 撑满宽度 ──────────────────────── */
.page-wrap {
  width: 100%;
  padding-top: 56px; /* 导航栏高度 */
}

/* ── 登录/注册卡片（居中布局，仅用于 auth 页面）────────── */
.auth-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
}
.card {
  width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
}
.card-logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--text);
}
.card-logo span { color: var(--text-muted); font-weight: 400; }
.card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.card .sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── 表单元素 ───────────────────────────────────────────── */
.field { margin-bottom: 12px; text-align: left; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}
input::placeholder { color: var(--text-muted); }
input:focus {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
}

/* ── 按钮 ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  letter-spacing: -0.01em;
  text-decoration: none;
}
/* 在 auth 卡片内按钮撑满宽度 */
.card .btn { width: 100%; margin-top: 8px; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-primary:hover { opacity: 0.88; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--accent-dim); }

/* ── 提示信息 ───────────────────────────────────────────── */
.error-msg {
  background: rgba(255,77,79,0.1);
  border: 1px solid rgba(255,77,79,0.25);
  color: #ff7875;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  text-align: left;
  display: none;
}
.success-msg {
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.25);
  color: var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  text-align: left;
  display: none;
}
.card-footer {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.card-footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.card-footer a:hover { border-color: var(--text-muted); }

/* ── 分割线 ─────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── 定价页（Typeless 风格，pricing.html 专用）──────────── */
/* 注：pricing.html 的主要样式写在页面内 <style> 中，       */
/*     此处仅保留跨页面共用的极少量辅助类。                  */

/* 旧版 .plan / .plans 已废弃，由 pricing.html 内联样式替代 */

/* ── 支付成功页 ─────────────────────────────────────────── */
.success-page {
  text-align: center;
  padding: 40px 20px;
}
.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(62,207,142,0.12);
  border: 1px solid rgba(62,207,142,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
}
.success-page h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.success-page p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* 导航 */
  .nav { padding: 0 16px; }
  .nav-logo { font-size: 15px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .nav-user-email { max-width: 100px; font-size: 11px; }

  /* 登录/注册卡片 */
  .card { width: 100%; border-radius: 16px; padding: 32px 20px; }
  .auth-wrap { padding: 72px 16px 32px; }

  /* 输入框：iOS 防自动缩放，font-size 必须 >= 16px */
  input[type="email"],
  input[type="password"],
  input[type="text"] { font-size: 16px; }

  /* 按钮最小点击高度 44px（Apple HIG 标准） */
  .btn { min-height: 44px; }

  /* 旧版定价页兼容 */
  .pricing-hero h1 { font-size: 34px; }
  .plan { min-width: 100%; }
}
