/* GachaCalc — 深色电竞风 */
:root {
  --bg: #0d0a1a;
  --surface: #17122b;
  --surface-2: #1f1838;
  --border: #2c2350;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --gold: #f59e0b;
  --ink: #ece6fa;
  --ink-soft: #b3a8d4;
  --ink-faint: #7d719f;
  --green: #34d399;
  --red: #f87171;
  --maxw: 1100px;
  --radius: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* 导航 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,10,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero { padding: 72px 0 48px; text-align: center; }
.hero .container { max-width: 780px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent-2);
  background: rgba(34,211,238,0.1); padding: 4px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 18px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; color: var(--ink-soft); max-width: 620px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block; font-weight: 600; padding: 12px 24px; border-radius: 10px;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7c3aed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

/* 工具卡片网格 */
.section { padding: 48px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: 26px; letter-spacing: -0.01em; margin-bottom: 6px; }
.section-head p { color: var(--ink-soft); font-size: 15px; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card .icon { font-size: 28px; }
.card h3 { font-size: 18px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent-2); text-decoration: none; }
.card p { font-size: 14px; color: var(--ink-soft); flex: 1; }
.card .tag {
  align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--accent-2);
  background: rgba(34,211,238,0.1); padding: 3px 10px; border-radius: 999px;
}
.card .go { font-size: 14px; font-weight: 600; color: var(--accent-2); }

/* 计算器页 */
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 12px; }
.article-header .byline { font-size: 14px; color: var(--ink-faint); }
.article-body h2 { font-size: 23px; margin: 36px 0 14px; letter-spacing: -0.01em; }
.article-body h3 { font-size: 18px; margin: 26px 0 10px; }
.article-body p { margin-bottom: 16px; font-size: 16px; color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 8px; font-size: 16px; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }

/* 计算器组件 */
.calc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; margin: 24px 0;
}
.calc label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.calc input, .calc select {
  width: 100%; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--ink); font-size: 15px; font-family: var(--font-mono);
}
.calc input:focus, .calc select:focus { outline: none; border-color: var(--accent); }
.calc .field { margin-bottom: 16px; }
.calc .row { display: flex; gap: 14px; }
.calc .row .field { flex: 1; }
.calc button {
  width: 100%; padding: 14px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background .15s ease;
}
.calc button:hover { background: #7c3aed; }
.result {
  margin-top: 20px; padding: 20px; background: var(--surface-2); border-radius: 10px;
  border: 1px solid var(--border);
}
.result .big {
  font-size: 32px; font-weight: 700; color: var(--accent-2);
  font-family: var(--font-mono); letter-spacing: -0.01em;
}
.result .big .unit { font-size: 16px; color: var(--ink-faint); font-weight: 400; }
.result .sub { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.result-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.result-item .k { font-size: 12px; color: var(--ink-faint); }
.result-item .v { font-size: 18px; font-weight: 600; font-family: var(--font-mono); }

/* 概率条 */
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .3s ease; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--ink-faint); font-weight: 600; font-size: 13px; }
td { color: var(--ink); }
tr:hover td { background: rgba(139,92,246,0.05); }

/* 相关文章 */
.related { padding: 40px 0 56px; }
.related .container { max-width: var(--maxw); }

/* 广告位 */
.ad-slot {
  margin: 40px auto; border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface); min-height: 100px; display: flex; align-items: center;
  justify-content: center; color: var(--ink-faint); font-size: 13px;
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font-size: 14px; margin-bottom: 12px; color: var(--ink); }
.foot-grid a { display: block; color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }
.foot-grid a:hover { color: var(--accent-2); }
.foot-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-faint); }

/* 响应式 */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-mobile { display: none; }
  .calc .row { flex-direction: column; gap: 0; }
  .result-grid { grid-template-columns: 1fr; }
}
