/* TideRank · 日落潮汐主题 */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-softer: #fafbfd;
  --ink: #1e1b4b;
  --ink-2: #3b3a6b;
  --muted: #6b7194;
  --muted-2: #8b8fb0;
  --line: #eef0f6;
  --line-2: #e2e5f0;
  --orange: #f97316;
  --pink: #ec4899;
  --grad: linear-gradient(90deg, #f97316, #ec4899);
  --grad-soft: linear-gradient(135deg, #fff3ea, #fde8f3);
  --green: #10b981;
  --green-bg: #e7f8f1;
  --red: #ef4444;
  --red-bg: #fdecec;
  --violet: #7c3aed;
  --violet-bg: #f1ebfe;
  --blue: #2563eb;
  --blue-bg: #eaf1fe;
  --amber-bg: #fff3ea;
  --amber: #c2410c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 27, 75, .06), 0 8px 24px rgba(30, 27, 75, .06);
  --font: Inter, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { flex-shrink: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 顶栏 ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; white-space: nowrap; }
.brand img { width: 26px; height: 26px; }
.brand small { font-weight: 600; color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a.on { background: var(--ink); color: #fff; }
.hdr-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .hdr { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 8px 12px; }
  .hdr-right { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; }
}
.pro-pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--grad); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { background: var(--bg-soft); }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(236, 72, 153, .25); }
.btn-primary:hover { background: var(--grad); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(236, 72, 153, .3); }
.btn-dark { background: var(--ink); color: #fff; border: 0; }
.btn-dark:hover { background: #2b2766; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--muted-2); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.on { color: var(--orange); }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap; line-height: 20px; }
.tag.orange { background: var(--amber-bg); color: var(--amber); }
.tag.green { background: var(--green-bg); color: #047857; }
.tag.red { background: var(--red-bg); color: #b91c1c; }
.tag.violet { background: var(--violet-bg); color: var(--violet); }
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.est { background: transparent; border: 1px dashed var(--line-2); color: var(--muted-2); font-size: 10.5px; padding: 0 6px; line-height: 16px; }
.growth { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.growth.up { background: var(--green); color: #fff; }
.growth.down { background: var(--red-bg); color: #b91c1c; }
.growth.flat { background: var(--bg-soft); color: var(--muted); }
.spark.up { color: var(--green); }
.spark.down { color: var(--red); }

/* ---------- 首页 ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 400px at 50% -10%, #fff1e6 0%, transparent 60%), radial-gradient(900px 400px at 90% 10%, #fde7f3 0%, transparent 60%); }
.hero-inner { padding-top: 72px; padding-bottom: 40px; text-align: center; position: relative; }
.hero h1 { margin: 0 0 16px; font-size: clamp(34px, 6vw, 58px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.hero .lead { max-width: 600px; margin: 0 auto 30px; font-size: 16px; color: var(--muted); line-height: 1.8; }
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; opacity: .55; }
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 44px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: left; box-shadow: var(--shadow); }
.stat-card b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.section h2 { margin: 0 0 10px; font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.01em; }
.section .sub { margin: 0 0 32px; color: var(--muted); max-width: 640px; line-height: 1.8; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); line-height: 1.8; }
a.card { display: block; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(30, 27, 75, .1); }
.card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); margin-bottom: 14px; font-size: 20px; }
.riser { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.riser:first-child { border-top: 0; }
.cta { text-align: center; padding: 80px 0; }
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
.cta p { color: var(--muted); margin: 0 0 26px; }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--amber-bg); color: var(--amber); font-weight: 600; }

/* ---------- 榜单 ---------- */
.page { padding-top: 36px; padding-bottom: 64px; }
.page-title { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.page-sub { margin: 0 0 22px; color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; }
.search input { width: 280px; max-width: 100%; height: 38px; padding: 0 14px 0 36px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; outline: none; }
.search input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(236, 72, 153, .12); }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--muted-2); }
.sortbar { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sortbar select { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; }
.filters { background: var(--bg-soft); border-radius: 20px; padding: 6px 18px; margin-bottom: 22px; }
.frow { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.frow + .frow { border-top: 1px solid var(--line-2); }
.frow-label { width: 96px; flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.frow-chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .frow { flex-direction: column; align-items: flex-start; gap: 8px; } }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: #fff; border: 0; box-shadow: 0 1px 2px rgba(30, 27, 75, .08); font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip:hover { box-shadow: 0 2px 8px rgba(30, 27, 75, .12); }
.chip.on { background: var(--grad); color: #fff; }
.chip .lock { opacity: .55; }
.chip .val { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.chip .x { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .25); margin-right: -6px; }
.pop { position: absolute; z-index: 50; top: calc(100% + 8px); left: 0; min-width: 240px; max-width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(30, 27, 75, .18); padding: 8px; color: var(--ink); font-weight: 500; cursor: default; }
.pop[hidden] { display: none; }
.pop-list { max-height: 280px; overflow-y: auto; }
.pop label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pop label:hover { background: var(--bg-soft); }
.pop input[type=checkbox], .pop input[type=radio] { accent-color: var(--pink); }
.pop .range { display: flex; gap: 6px; align-items: center; padding: 8px 10px; }
.pop .range input { width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); padding: 0 8px; }
.pop-foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin: 6px -8px -8px; padding: 8px 10px; }
.pop-group { padding: 6px 10px 2px; font-size: 11px; color: var(--muted-2); font-weight: 700; }
.meta-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--ink-2); flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table.list { width: 100%; border-collapse: collapse; min-width: 900px; }
.list th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted-2); padding: 12px 10px; background: var(--bg-softer); border-bottom: 1px solid var(--line); white-space: nowrap; }
.list th.c, .list td.c { text-align: center; }
.list td { padding: 16px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.list tr.row:hover { background: var(--bg-softer); }
.list td.idx { width: 46px; text-align: center; color: var(--muted-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; color: var(--muted); font-weight: 700; }
.th-sort:hover { background: var(--bg-soft); }
.th-sort.on { background: var(--ink); color: #fff; }
.site-cell { display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 440px; }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.site-name { font-weight: 700; font-size: 14.5px; }
.site-name:hover { text-decoration: underline; text-decoration-color: var(--pink); }
.site-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 999px; font-weight: 700; background: var(--bg-soft); color: var(--ink-2); }
.pager a:hover { background: var(--line-2); }
.pager .on { background: var(--ink); color: #fff; }
.paywall { margin-top: -110px; position: relative; padding: 130px 20px 40px; text-align: center; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 45%); }
.paywall h3 { margin: 0 0 8px; font-size: 22px; }
.paywall p { margin: 0 0 20px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* ---------- 详情页 ---------- */
.sd-hero { background: var(--grad-soft); }
.sd-hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; padding-top: 40px; padding-bottom: 40px; }
@media (max-width: 900px) { .sd-hero-inner { grid-template-columns: 1fr; } }
.sd-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.sd-title h1 { margin: 0; font-size: 30px; word-break: break-all; }
.sd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi label { display: block; font-size: 12px; color: var(--muted); }
.kpi b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sd-sec { padding: 40px 0 8px; }
.sd-sec h2 { font-size: 22px; margin: 0 0 6px; }
.sd-sec > p.sub { margin: 0 0 20px; color: var(--muted); }
.ai-card { border-radius: var(--radius); padding: 22px; background: linear-gradient(135deg, #fff7f0, #fff0f7); border: 1px solid #fde1cf; margin-bottom: 16px; }
.ai-card h3 { margin: 0 0 10px; font-size: 16px; }
.ai-card p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.85; }
.ai-label { font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px dashed var(--line-2); }
.kv:first-child { border-top: 0; }
.kv span { color: var(--muted); }
.upsell { text-align: center; padding: 36px 20px; border-radius: var(--radius); background: var(--bg-soft); }
.upsell h3 { margin: 0 0 8px; }
.upsell p { margin: 0 0 18px; color: var(--muted); }
.comp { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg-soft); }
.comp:hover { background: var(--line); }

/* ---------- 定价 / 表单 ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 22px; justify-content: center; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.plan { border-radius: 22px; padding: 28px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); position: relative; }
.plan.hot { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; }
.plan .ribbon { position: absolute; top: -12px; left: 28px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; padding: 2px 12px; border-radius: 999px; }
.price { font-size: 42px; font-weight: 800; letter-spacing: -.02em; }
.price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.feats { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.feats li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 8px; }
.form-card { max-width: 420px; margin: 40px auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field input { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); padding: 0 14px; outline: none; }
.field input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(236, 72, 153, .12); }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.alert.err { background: var(--red-bg); color: #b91c1c; }
.alert.ok { background: var(--green-bg); color: #047857; }
.qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.qr { text-align: center; padding: 16px; border-radius: 16px; background: var(--bg-soft); }
.qr img { width: 100%; max-width: 320px; border-radius: 12px; background: #fff; }
.order-no { font-family: var(--mono); font-size: 20px; font-weight: 800; letter-spacing: .04em; }

/* ---------- 模型航线图 ---------- */
.month { margin-bottom: 26px; }
.month-h { font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.tl { border-left: 2px dashed var(--line-2); margin-left: 8px; padding-left: 20px; display: grid; gap: 10px; }
.tl-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 50%; margin-top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--grad); }
.tl-item .date { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 88px; flex-shrink: 0; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-softer); margin-top: 40px; }
.ftr { display: flex; justify-content: space-between; gap: 24px; padding: 34px 0; flex-wrap: wrap; }
.ftr-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.ftr h4 { margin: 0 0 10px; font-size: 12px; color: var(--muted-2); }
.ftr a { display: block; color: var(--ink-2); font-size: 13px; padding: 3px 0; }
.ftr a:hover { color: var(--pink); }
.ftr-bottom { border-top: 1px solid var(--line); padding: 14px 0; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 后台 ---------- */
.admin-nav { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
.plain th, .plain td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.plain th { color: var(--muted); font-weight: 700; font-size: 12px; }
pre.log { background: var(--bg-soft); padding: 12px; border-radius: 10px; overflow-x: auto; font-size: 12px; }
