/* OpusChat 官网样式 —— 深色现代主题，与卡密后台同一套配色 */
:root {
  --bg: #0b0e1a;
  --bg2: #0f1221;
  --card: #161b30;
  --card2: #1a2138;
  --line: #28304f;
  --fg: #e8ecf7;
  --mut: #9aa6c8;
  --acc: #6ea8fe;
  --acc2: #3b82f6;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(110, 168, 254, 0.12), transparent 55%),
    var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--acc); text-decoration: none; }
a:hover { color: #9cc4ff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- 顶部导航 ---------- */
header.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 14, 26, 0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--mut); font-size: 14px; }
.nav-links a:hover { color: var(--fg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--acc2); color: #fff; border: 0; border-radius: 10px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: var(--acc); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--fg); }
.btn.ghost:hover { border-color: var(--acc); }
.btn.lg { padding: 14px 26px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 通用区块 ---------- */
section { padding: 72px 0; }
.eyebrow { color: var(--acc); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 14px 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.5vw, 34px); margin: 0 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 19px; margin: 0 0 8px; }
.lead { font-size: 18px; color: var(--mut); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero .note { margin-top: 16px; color: var(--mut); font-size: 13px; }

/* ---------- 特性网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.feature .ic {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 14px;
  background: rgba(59,130,246,.15); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 20px;
}
.feature p { color: var(--mut); margin: 0; font-size: 14px; }

/* ---------- 定价 ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.tier {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column;
}
.tier.popular { border-color: var(--acc2); box-shadow: 0 0 0 1px var(--acc2), 0 12px 40px rgba(59,130,246,.18); }
.tier .badge { align-self: flex-start; font-size: 11px; color: #9cc4ff; background: #1e3a5f; padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.tier .name { font-size: 16px; font-weight: 700; }
.tier .price { font-size: 30px; font-weight: 800; margin: 10px 0 2px; }
.tier .price small { font-size: 14px; color: var(--mut); font-weight: 500; }
.tier .desc { color: var(--mut); font-size: 13px; min-height: 38px; }
.tier ul { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.tier li { font-size: 14px; color: var(--fg); padding: 6px 0 6px 24px; position: relative; }
.tier li::before { content: "✓"; color: var(--ok); position: absolute; left: 0; }

/* ---------- 法务/长文页 ---------- */
.doc { max-width: 820px; }
.doc h1 { font-size: 34px; }
.doc h2 { font-size: 22px; margin-top: 34px; }
.doc p, .doc li { color: #c9d2ea; font-size: 15px; }
.doc .updated { color: var(--mut); font-size: 13px; margin-bottom: 30px; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 10px; padding: 14px 16px; color: var(--mut); font-size: 14px; }

/* ---------- 成功页 / 卡密展示 ---------- */
.keybox {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; max-width: 560px; margin: 24px auto; text-align: center;
}
.key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px; letter-spacing: 1px; color: var(--ok);
  background: #0c1020; border: 1px dashed var(--line); border-radius: 10px;
  padding: 16px; margin: 16px 0; word-break: break-all; user-select: all;
}
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--acc);
  border-radius: 50%; animation: spin 0.9s linear infinite; margin: 12px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 页脚 ---------- */
footer.site {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0; color: var(--mut); font-size: 14px;
}
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--mut); }
.foot-links a:hover { color: var(--fg); }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}
@media (max-width: 520px) {
  .tiers { grid-template-columns: 1fr; }
}

/* ---------- i18n 语言切换（默认英文，可切中文） ---------- */
.i18n-zh { display: none; }
html[lang="zh"] .i18n-en { display: none; }
html[lang="zh"] .i18n-zh { display: revert; }
.lang-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; line-height: 1;
}
.lang-toggle:hover { border-color: var(--acc); color: var(--fg); }
