/* 吃瓜网 · 热瓜榜
   方向：左右分屏 IA —— 桌面端左屏吸顶品牌舞台(西瓜 CSS 插画 / 实时时钟 / 主 CTA / 锚点导航)，
   右屏独立滚动：三档 Tab 热榜(实时/今日/本周) → 瓜田分类 → 吃瓜三步与须知 → 问答 → 关于 → 页脚。移动端上下堆叠。
   视觉：瓜皮墨绿底、瓜瓤红为唯一主强调色、瓜皮绿仅用于“新/在线”状态；粗体排名数字、热度条。
   CSP: style-src 'self'，禁止 style 属性；热度条宽度由 JS 经 CSSOM 写入 --w。 */

:root {
  color-scheme: dark;
  --bg: #0a120d;
  --bg-2: #0d1711;
  --surface: #111d16;
  --surface-2: #17271d;
  --line: rgba(236, 255, 242, 0.08);
  --line-strong: rgba(236, 255, 242, 0.16);
  --text: #f4f1ea;
  --muted: #97a59b;
  --faint: #5f6e64;
  --red: #ff4d5e;
  --red-deep: #e3364a;
  --red-soft: rgba(255, 77, 94, 0.14);
  --green: #2bd47d;
  --rind-light: #eef9e3;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-num: "DIN Alternate", "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", "Arial Narrow", var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 999px; background: var(--red); color: #fff; transition: top .2s; }
.skip-link:focus { top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 30px; border-radius: 999px;
  font-size: 16px; font-weight: 800; letter-spacing: .04em;
  transition: transform .25s var(--ease), box-shadow .25s, background .2s;
}
.btn--red { background: var(--red); color: #fff; box-shadow: 0 14px 34px -14px rgba(255, 77, 94, .9); }
.btn--red:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- 分屏 ---------- */
.split { display: grid; grid-template-columns: minmax(380px, 42%) minmax(0, 1fr); min-height: 100vh; }

.stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 26px clamp(24px, 3vw, 44px) 24px;
  background:
    radial-gradient(70% 50% at 50% 42%, rgba(255, 77, 94, .2), transparent 70%),
    radial-gradient(120% 60% at 50% 120%, rgba(43, 212, 125, .12), transparent 60%),
    var(--bg-2);
  border-right: 1px solid var(--line);
}
/* 背景瓜子点阵 */
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse 2px 3.5px at 50% 50%, rgba(236, 255, 242, .08) 98%, transparent) 0 0 / 34px 34px;
  -webkit-mask: radial-gradient(60% 60% at 50% 45%, transparent 30%, #000 80%); mask: radial-gradient(60% 60% at 50% 45%, transparent 30%, #000 80%);
}
.stage > * { position: relative; }
.stage__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 11px; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-size: 18px; letter-spacing: .04em; }
.brand small { font-family: var(--font-num); font-size: 10px; letter-spacing: .24em; color: var(--muted); margin-top: 3px; }
.age { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted); }
.age b { color: var(--red); font-family: var(--font-num); }

.stage__center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 20px; }

/* 西瓜切片：半圆 + 径向渐变分层(瓤/白皮/绿皮) + 瓜子 + 一口咬痕 */
.melon { width: min(78%, 360px); margin-bottom: 18px; animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .5)); }
@keyframes bob { 0%, 100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-10px); } }
.melon__slice {
  position: relative; width: 100%; aspect-ratio: 2 / 1;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: radial-gradient(50% 100% at 50% 0, #ff5466 0 74%, #ff8a8f 79%, var(--rind-light) 80% 87%, #4fe293 87.5% 93%, #18914f 93.5%);
  -webkit-mask: radial-gradient(circle at 84% 0, transparent 13.5%, #000 14%); mask: radial-gradient(circle at 84% 0, transparent 13.5%, #000 14%);
}
.melon__slice i {
  position: absolute; width: 3.2%; aspect-ratio: 2 / 3.2;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: #120c0c;
}
.melon__slice i:nth-child(1) { left: 22%; top: 14%; transform: rotate(-38deg); }
.melon__slice i:nth-child(2) { left: 34%; top: 36%; transform: rotate(-22deg); }
.melon__slice i:nth-child(3) { left: 48.5%; top: 52%; }
.melon__slice i:nth-child(4) { left: 63%; top: 36%; transform: rotate(22deg); }
.melon__slice i:nth-child(5) { left: 44%; top: 18%; transform: rotate(-8deg); }
.melon__slice i:nth-child(6) { left: 57%; top: 16%; transform: rotate(14deg); }
.melon__slice i:nth-child(7) { left: 30%; top: 8%; transform: rotate(-30deg); }

.live { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--red-soft); color: #ffb3ba; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 77, 94, .7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }

.stage h1 { margin-top: 16px; font-size: clamp(56px, 6.4vw, 96px); font-weight: 900; letter-spacing: .02em; line-height: 1; }
.stage h1 span { display: block; margin-top: 10px; font-size: .3em; font-weight: 700; letter-spacing: .5em; margin-right: -.5em; color: var(--red); }
.stage__lead { max-width: 380px; margin: 16px 0 26px; color: var(--muted); }

.stage__nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.stage__nav a:hover, .stage__nav a.is-active { color: var(--text); }
.stage__nav a.is-active { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- 右屏 ---------- */
.feed { padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 64px) 40px; max-width: 860px; width: 100%; }
.feed h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 850; letter-spacing: .02em; }

.board__head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin-top: -14px; background: linear-gradient(var(--bg) 78%, transparent); }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { height: 36px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--red); color: #fff; }

.hotlist { counter-reset: r; }
.hot {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) 120px; align-items: center; gap: 14px;
  padding: 14px 12px; margin: 0 -12px; border-radius: 14px;
  transition: background .2s;
}
.hotlist li { border-bottom: 1px solid var(--line); }
.hotlist li:last-child { border-bottom: 0; }
.hot:hover { background: var(--surface); }
.hot__rank { font-family: var(--font-num); font-size: 30px; font-weight: 700; line-height: 1; text-align: center; color: var(--faint); font-variant-numeric: tabular-nums; }
.hotlist li:nth-child(-n + 3) .hot__rank { color: var(--red); font-size: 40px; }
.hotlist li:nth-child(1) .hot__rank { text-shadow: 0 0 24px rgba(255, 77, 94, .6); }
.hot__main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.hot__main strong { font-size: 16px; font-weight: 650; }
.hot:hover strong { color: #fff; }
.hot__main small { width: 100%; font-size: 12.5px; color: var(--faint); }
.tag { padding: 0 6px; border-radius: 5px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; }
.tag--boom { background: var(--red); color: #fff; }
.tag--hot { background: #ff8a3d; color: #1a0d05; }
.tag--new { background: var(--green); color: #04150b; }
.hot__bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hot__bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, #ff8a8f, var(--red)); transition: width 1s var(--ease); }
.board__note { margin-top: 14px; font-size: 12.5px; color: var(--faint); }
.board__note a { color: var(--red); font-weight: 700; margin-left: 6px; }

.block { margin-top: clamp(56px, 7vw, 88px); }
.block h2 { margin-bottom: 20px; }

.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fields a {
  position: relative; display: grid; gap: 4px; padding: 20px 18px; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .3s var(--ease);
}
.fields a::after { content: "↗"; position: absolute; right: 16px; top: 16px; color: var(--faint); transition: color .2s, transform .3s var(--ease); }
.fields b { font-size: 19px; }
.fields span { font-size: 12.5px; color: var(--muted); }
.fields a:hover { border-color: rgba(255, 77, 94, .5); transform: translateY(-3px); }
.fields a:hover::after { color: var(--red); transform: translate(2px, -2px); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps li { padding: 20px 18px; border-radius: 18px; background: var(--surface); }
.steps span { font-family: var(--font-num); font-size: 34px; font-weight: 700; line-height: 1; color: var(--red); }
.steps h3 { margin-top: 12px; font-size: 16px; }
.steps p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.rules { margin-top: 12px; padding: 18px 20px; border-radius: 18px; border: 1.5px dashed var(--line-strong); }
.rules__title { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.rules ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rules li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.2 4.7-4.8' fill='none' stroke='%2304150b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 16.5px; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 300; color: var(--red); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; color: var(--muted); font-size: 14.5px; }

.about p { color: var(--muted); font-size: 14.5px; }
.about p + p { margin-top: 12px; }
.about a { color: var(--text); border-bottom: 1.5px solid var(--red); }

.foot { display: grid; gap: 12px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.foot nav { display: flex; gap: 18px; font-size: 13.5px; color: var(--muted); }
.foot nav a:hover { color: var(--red); }

.dock {
  position: fixed; left: 14px; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 150;
  display: none; align-items: center; justify-content: center; gap: 10px; height: 54px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 800; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .9);
  transform: translateY(140%); transition: transform .4s var(--ease);
}
.dock .live__dot { background: #fff; }
.dock.is-visible { transform: none; }

.toast { position: fixed; left: 50%; bottom: 90px; z-index: 200; padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-height: 760px) and (min-width: 1025px) {
  .melon { width: min(60%, 260px); margin-bottom: 10px; }
  .stage h1 { font-size: 60px; }
  .stage__lead { margin: 10px 0 18px; }
}

@media (max-width: 1024px) {
  .split { display: block; }
  .stage { position: relative; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .stage__center { padding-block: 48px 28px; }
  .feed { margin-inline: auto; }
  .dock { display: flex; }
  .foot { padding-bottom: 80px; }
}

@media (max-width: 600px) {
  .brand small { display: none; }
  .melon { width: 64%; }
  .stage h1 { font-size: 64px; }
  .stage__nav { gap: 4px 14px; }
  .board__head { flex-direction: column; align-items: stretch; gap: 10px; }
  .tabs button { flex: 1; }
  .hot { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 12px 8px; margin: 0 -8px; }
  .hot__bar { grid-column: 2; height: 4px; }
  .hot__rank { font-size: 24px; }
  .hotlist li:nth-child(-n + 3) .hot__rank { font-size: 30px; }
  .hot__main strong { font-size: 15px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields a { padding: 16px 14px; }
  .fields b { font-size: 17px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 8px; padding: 16px; }
  .steps span { grid-row: span 2; font-size: 30px; }
  .steps h3 { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 合规页（由 _tools/build.mjs 生成） ---------- */
.page-legal { background: radial-gradient(60% 40% at 50% 0, rgba(255, 77, 94, .14), transparent 70%), var(--bg); }
.legal-wrap { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: 20px; }
.legal-top { border-bottom: 1px solid var(--line); }
.legal-top__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; }
.legal-brand img { border-radius: 10px; }
.legal-brand span { display: grid; line-height: 1.1; }
.legal-brand small { font-family: var(--font-num); font-size: 10px; letter-spacing: .24em; color: var(--muted); }
.legal-back { height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--surface); font-size: 14px; }
.legal-back:hover { background: var(--red); }
.legal-body { padding-block: 48px 64px; }
.legal-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 24px; }
.legal-crumb a:hover { color: var(--red); }
.legal-kicker { font-family: var(--font-num); font-size: 12px; letter-spacing: .26em; color: var(--red); }
.legal-body h1 { margin-top: 8px; font-size: clamp(36px, 6vw, 56px); font-weight: 900; }
.legal-updated { margin-top: 10px; font-size: 13px; color: var(--faint); font-family: var(--font-mono); }
.legal-body h2 { margin-top: 36px; font-size: 19px; }
.legal-body h2::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 10px; vertical-align: middle; }
.legal-body p { margin-top: 10px; color: var(--muted); }
.legal-body a { color: var(--red); }
.legal-note { margin-top: 36px; padding: 18px 20px; border-radius: 16px; background: var(--surface); }
.legal-note p { margin: 0; }
.legal-cta { display: flex; flex-wrap: wrap; gap: 12px; background: none; padding: 0; }
.legal-cta a { display: inline-flex; align-items: center; height: 50px; padding: 0 24px; border-radius: 999px; background: var(--surface-2); color: var(--text) !important; font-weight: 700; }
.legal-cta a:last-child { background: var(--red); color: #fff !important; }
.legal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 24px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.legal-foot nav { display: flex; gap: 16px; }
.legal-foot a:hover { color: var(--red); }
