/* ==========================================================================
   Codex下载站 - codex.xiazai.lol
   纯静态、零依赖、面向国内访问优化(系统字体,无外部资源请求)
   ========================================================================== */

:root {
  --bg: #0b0f17;
  --bg-soft: #0f1522;
  --surface: #131b2b;
  --surface-2: #182234;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e6eaf2;
  --muted: #96a2b8;
  --accent: #10a37f;
  --accent-strong: #0c8a6b;
  --accent-light: #3dd6b0;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: none;
}
.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  flex: none;
}
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a.active { color: var(--text); font-weight: 600; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-strong); }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(16, 163, 127, 0.18), transparent 65%),
    radial-gradient(500px 260px at 85% 10%, rgba(61, 214, 176, 0.1), transparent 60%);
  text-align: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(16, 163, 127, 0.4);
  background: rgba(16, 163, 127, 0.1);
  color: var(--accent-light);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
}
.hero h1 {
  font-size: 40px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent) 20%, var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  max-width: 720px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 17px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.hero-url {
  font-size: 13px;
  color: var(--muted);
}
.hero-url code {
  color: var(--accent-light);
  background: rgba(16, 163, 127, 0.08);
  border: 1px solid rgba(16, 163, 127, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: Consolas, Monaco, monospace;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 34px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #14b98f);
  color: #fff;
  box-shadow: 0 8px 24px rgba(16, 163, 127, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(16, 163, 127, 0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-lg { padding: 16px 44px; font-size: 18px; }
.btn-sm { padding: 9px 22px; font-size: 14px; }

/* ---------- 界面截图 ---------- */
.screenshot {
  max-width: 780px;
  margin: 36px auto 0;
  text-align: center;
}
.screenshot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  display: block;
  background: #0a0e15;
}
.screenshot figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 区块 ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 46px; }
.section-head h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(16, 163, 127, 0.5); transform: translateY(-3px); }
.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card p { color: var(--muted); font-size: 14.5px; }
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(16, 163, 127, 0.12);
  border: 1px solid rgba(16, 163, 127, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex: none;
}
.card-icon svg { width: 22px; height: 22px; }
.card .card-foot { margin-top: 16px; }

/* 下载卡片 */
.dl-card { text-align: left; }
.dl-card .os {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-light);
  background: rgba(16, 163, 127, 0.1);
  border: 1px solid rgba(16, 163, 127, 0.3);
  border-radius: 6px;
  padding: 2px 10px;
  margin-bottom: 14px;
}
.dl-card ul {
  list-style: none;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 14px;
}
.dl-card ul li { padding: 3px 0; }
.dl-card ul li::before { content: "✓ "; color: var(--accent-light); }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- 数据指标 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
}
.stat b {
  display: block;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  color: var(--text);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
td { color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* ---------- 代码块 ---------- */
.code-block {
  position: relative;
  background: #0a0e15;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
  color: var(--text);
  overflow-x: auto;
  margin: 14px 0;
}
.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: inherit;
}
.code-block .copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------- 下载地址展示 ---------- */
.dl-banner {
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.14), rgba(61, 214, 176, 0.06));
  border: 1px solid rgba(16, 163, 127, 0.35);
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
  margin-bottom: 48px;
}
.dl-banner h2 { font-size: 24px; margin-bottom: 8px; }
.dl-banner p { color: var(--muted); margin-bottom: 20px; font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent-light);
  flex: none;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 14.5px;
}
.faq-item .faq-answer a { word-break: break-all; }

/* ---------- 版本动态 ---------- */
.changelog { max-width: 820px; margin: 0 auto; }
.log-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.log-item:last-child { border-bottom: none; }
.log-date {
  flex: none;
  width: 96px;
  color: var(--accent-light);
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  padding-top: 2px;
}
.log-item h3 { font-size: 16px; margin-bottom: 6px; }
.log-item p { color: var(--muted); font-size: 14.5px; }

/* ---------- 面包屑 ---------- */
.crumbs {
  padding: 24px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-light); }
.crumbs span { margin: 0 8px; color: var(--border-strong); }

/* ---------- 页面标题(子页) ---------- */
.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.page-head .page-desc { color: var(--muted); max-width: 760px; }

/* ---------- 正文 ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 48px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}
.prose h2:first-child { margin-top: 24px; }
.prose p { color: var(--muted); margin-bottom: 14px; font-size: 15.5px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { color: var(--muted); padding-left: 24px; margin-bottom: 14px; font-size: 15.5px; }
.prose li { margin-bottom: 8px; }
.prose li strong { color: var(--text); }

/* ---------- 提示框 ---------- */
.tip {
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  margin: 16px 0;
  border: 1px solid;
}
.tip-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.35);
  color: #a8c6f0;
}
.tip-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f0d9a8;
}
.tip-ok {
  background: rgba(16, 163, 127, 0.08);
  border-color: rgba(16, 163, 127, 0.35);
  color: #a8e6d4;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 52px 0 28px;
  margin-top: 72px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-grid h4 { font-size: 15px; margin-bottom: 14px; }
.footer-grid p { color: var(--muted); font-size: 13.5px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 9px; }
.footer-grid ul a { color: var(--muted); font-size: 13.5px; }
.footer-grid ul a:hover { color: var(--accent-light); }
.friend-links {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.friend-links a { color: var(--text); }
.friend-links a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .steps, .stats { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 30px; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 24px; }
  .main-nav { gap: 16px; }
  .main-nav a:not(.nav-cta) { display: none; }
  .log-item { flex-direction: column; gap: 6px; }
}
