/* ============================================================
   AI 搞钱工具箱 · 站点样式 v1.0
   视觉体系：青绿主色 + 暖橙强调，浅色简洁卡片风
   ============================================================ */
:root {
  --bg: #f6f8f9;
  --card: #ffffff;
  --ink: #1c2b33;
  --muted: #5f7280;
  --brand: #0f766e;
  --brand-dark: #0b5a54;
  --brand-soft: #e6f4f2;
  --accent: #ea580c;
  --accent-soft: #fef0e6;
  --danger: #dc2626;
  --line: #e4eaec;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 42, 51, 0.06), 0 4px 14px rgba(16, 42, 51, 0.05);
  --shadow-hover: 0 4px 10px rgba(16, 42, 51, 0.08), 0 10px 28px rgba(16, 42, 51, 0.09);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 58px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 17px; color: var(--ink);
  letter-spacing: 0.5px; white-space: nowrap;
}
.logo .logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #14919b);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  padding: 6px 12px; border-radius: 8px; color: var(--muted);
  font-size: 14px; white-space: nowrap;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.nav-cta {
  background: var(--brand); color: #fff; font-weight: 600;
}
.nav a.nav-cta:hover { background: var(--brand-dark); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 30px; text-align: center; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.hero-stats {
  display: flex; justify-content: center; gap: 34px; margin-top: 22px; flex-wrap: wrap;
}
.hero-stats .stat b { font-size: 24px; color: var(--brand); font-weight: 800; }
.hero-stats .stat span { display: block; font-size: 13px; color: var(--muted); }

/* ---------- 区块 ---------- */
.section { padding: 26px 0; }
.section-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px;
}
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-head .sub { color: var(--muted); font-size: 13px; }
.section-head .more { margin-left: auto; font-size: 13px; }

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

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block; color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card .card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.card .card-meta { margin-top: 12px; font-size: 12px; color: #8ba1ad; display: flex; gap: 10px; flex-wrap: wrap; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.badge-hot { background: var(--accent-soft); color: var(--accent); }
.badge-new { background: #e8f5ee; color: #15803d; }
.badge-free { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- 分类磁贴 ---------- */
.cat-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cat-tile .cat-icon { font-size: 24px; }
.cat-tile b { font-size: 14px; display: block; }
.cat-tile span { font-size: 12px; color: var(--muted); }

/* ---------- 工具页通用 ---------- */
.tool-page { max-width: 760px; margin: 0 auto; padding: 34px 20px 60px; }
.tool-page .tool-head { text-align: center; margin-bottom: 26px; }
.tool-page .tool-head .tool-emoji { font-size: 40px; }
.tool-page .tool-head h1 { font-size: 24px; font-weight: 800; margin-top: 8px; }
.tool-page .tool-head p { color: var(--muted); margin-top: 6px; font-size: 14px; }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.panel h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.panel .hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

label.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
label.opt:hover { border-color: var(--brand); }
label.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
label.opt input { margin-top: 4px; accent-color: var(--brand); }
label.opt b { font-size: 14px; display: block; }
label.opt span { font-size: 12.5px; color: var(--muted); }

.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 26px; border-radius: 10px; transition: background 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--brand-dark); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-ghost:hover { background: var(--brand-soft); }

.result {
  border-radius: 12px; padding: 18px; margin-top: 16px; font-size: 14px;
  border: 1.5px solid var(--line); background: #fbfcfd;
}
.result.ok { border-color: #15803d; background: #f2faf5; }
.result.warn { border-color: var(--accent); background: #fff8f2; }
.result.bad { border-color: var(--danger); background: #fdf3f3; }
.result h3 { font-size: 16px; margin-bottom: 8px; }

table.cmp { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
table.cmp th, table.cmp td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
table.cmp th { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
table.cmp .row-best td { background: #f2faf5; font-weight: 700; color: #15803d; }

input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--brand); }

.strength-bar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 10px; overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.25s, background 0.25s; }

/* ---------- 页脚 ---------- */
footer { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 26px 20px;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  font-size: 13px; color: var(--muted);
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--brand); }
.footer-note { width: 100%; font-size: 12px; color: #93a7b1; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 600px) {
  .nav {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .nav-toggle {
    display: flex; margin-left: auto; background: none; border: none;
    font-size: 22px; cursor: pointer; color: var(--ink); padding: 4px 8px;
  }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 30px 0 20px; }
  .hero-stats { gap: 20px; }
}
