:root {
  --bg: #07080b;
  --bg-2: #0d0f14;
  --card: rgba(255, 255, 255, 0.035);
  --card-hi: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #eef0f4;
  --muted: #8b90a0;
  --faint: #5a5f6e;
  --up: #ff4d5e;      /* 红涨 */
  --down: #19c58f;    /* 绿跌 */
  --draw: #c9cbd3;
  --accent: #ff6b4a;
  --accent-2: #7c6cff;
  --radius: 18px;
  --sans: "Space Grotesk", "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Instrument Serif", "Songti SC", "Noto Serif SC", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }

.grain {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} }
.glow { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .32; }
.glow-a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, #ff6b4a, transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
.glow-b { width: 52vw; height: 52vw; right: -18vw; top: 30vh; background: radial-gradient(circle, #5b4cff, transparent 65%); animation: drift 28s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(6vw, 8vh) scale(1.1); } }

header.top, main, footer, .ticker { position: relative; z-index: 1; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(7,8,11,.88), rgba(7,8,11,.6));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.orb {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0, #ffb199 12%, var(--accent) 38%, var(--accent-2) 80%);
  box-shadow: 0 0 24px rgba(255,107,74,.55), inset -4px -6px 10px rgba(0,0,0,.35);
  animation: orb 6s ease-in-out infinite;
}
@keyframes orb { 50% { box-shadow: 0 0 34px rgba(124,108,255,.6), inset -4px -6px 10px rgba(0,0,0,.35); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 17px; letter-spacing: .08em; }
.brand-text i { font-family: var(--serif); font-size: 15px; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: .25s; }
.nav a:hover { color: var(--text); background: var(--card-hi); }
.me-btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-hi); background: var(--card); transition: .25s;
}
.me-btn:hover { border-color: rgba(255,255,255,.35); background: var(--card-hi); }
.me-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 40px; width: max-content; padding: 10px 0; animation: tick 60s linear infinite; font-family: var(--mono); font-size: 13px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { white-space: nowrap; color: var(--muted); }
.ticker-track b { color: var(--text); font-weight: 500; margin: 0 6px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- hero ---------- */
main { padding: 0 clamp(16px, 4vw, 48px); max-width: 1320px; margin: 0 auto; }
.hero { padding: clamp(56px, 11vw, 140px) 0 40px; max-width: 980px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; margin: 0 0 26px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 0 rgba(25,197,143,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(25,197,143,0); } 100% { box-shadow: 0 0 0 0 rgba(25,197,143,0); } }
.hero h1 {
  font-size: clamp(40px, 7.4vw, 96px); line-height: 1.04; letter-spacing: -.02em; margin: 0; font-weight: 600;
}
.hero h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  background: linear-gradient(100deg, #ffd2c4, var(--accent) 35%, #b9a8ff 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .08em;
}
.lede { color: #b7bbc7; font-size: clamp(15px, 1.5vw, 18px); max-width: 680px; margin: 28px 0 22px; }
.disclaimer-chip {
  display: inline-block; margin: 0; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; color: #c9cbd3;
  border: 1px dashed rgba(255,255,255,.22); background: rgba(255,255,255,.03);
}

/* ---------- agents ---------- */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 30px; }
.agent {
  position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.agent:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.agent::before {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--c), transparent 70%); opacity: .22; filter: blur(10px);
}
.agent-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 700; color: #0b0c10; font-size: 18px;
  background: radial-gradient(circle at 30% 25%, #fff, var(--c) 55%);
  box-shadow: 0 8px 26px -8px var(--c);
}
.agent h3 { margin: 0; font-size: 17px; }
.agent h3 small { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); font-size: 15px; margin-left: 6px; }
.agent .style { color: var(--muted); font-size: 13px; margin: 12px 0 16px; min-height: 42px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; }
.stat { padding: 10px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--mono); font-size: 18px; font-weight: 500; }
.stat span { font-size: 11.5px; color: var(--muted); }

/* ---------- sections ---------- */
.block { padding: 70px 0 10px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.block h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.1; margin: 0; letter-spacing: -.01em; font-weight: 600; }
.sub { color: var(--muted); max-width: 640px; margin: 12px 0 0; font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--line-hi); }
.chip[aria-selected="true"] { color: #0b0c10; background: var(--text); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.card {
  position: relative; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .3s, background .3s;
  opacity: 0; transform: translateY(14px);
}
.card.in { opacity: 1; transform: none; }
.card:hover { border-color: var(--line-hi); background: var(--card-hi); }
.card.clickable { cursor: pointer; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-name { font-size: 17px; font-weight: 600; }
.card-tag { font-size: 11.5px; color: var(--faint); font-family: var(--mono); letter-spacing: .06em; }
.price { text-align: right; font-family: var(--mono); }
.price b { display: block; font-size: 17px; font-weight: 500; }
.chg { font-size: 13px; }
.up { color: var(--up); }
.down { color: var(--down); }
.spark { width: 100%; height: 56px; display: block; margin: 12px 0 10px; }
.period { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.calls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.call {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--line); font-size: 12px; position: relative;
}
.call .who { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.call .who i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.call b { font-weight: 600; font-size: 13.5px; }
.call small { font-family: var(--mono); color: var(--faint); font-size: 10.5px; }
.call.right { border-color: rgba(25,197,143,.45); }
.call.wrong { opacity: .55; }
.call .mark { position: absolute; top: 4px; right: 6px; font-size: 11px; }

.meter { height: 6px; border-radius: 6px; overflow: hidden; display: flex; background: rgba(255,255,255,.06); }
.meter i { display: block; height: 100%; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.meter-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-family: var(--mono); }

.vote { display: flex; gap: 8px; margin-top: 14px; }
.vote button {
  flex: 1; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(255,255,255,.02);
  font-weight: 600; transition: .2s; font-size: 14px;
}
.vote button:hover:not(:disabled) { transform: translateY(-1px); }
.vote button.v-up:hover:not(:disabled), .vote button.v-up.mine { background: rgba(255,77,94,.16); border-color: var(--up); color: #ffd5d9; }
.vote button.v-down:hover:not(:disabled), .vote button.v-down.mine { background: rgba(25,197,143,.14); border-color: var(--down); color: #c8f5e6; }
.vote button.v-mid:hover:not(:disabled), .vote button.v-mid.mine { background: rgba(255,255,255,.1); border-color: #fff; }
.vote button:disabled { opacity: .45; cursor: not-allowed; }
.vote button.mine { opacity: 1; }
.lock-note { font-size: 12px; color: var(--faint); margin-top: 10px; text-align: center; }

/* ---------- sports ---------- */
.day { margin-bottom: 26px; }
.day h4 { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: .08em; margin: 0 0 12px; display: flex; align-items: center; gap: 12px; }
.day h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.match .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 12px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.team img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.team .tn { font-weight: 600; font-size: 14.5px; line-height: 1.2; overflow-wrap: anywhere; }
.team .tr { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.score { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.vs { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); }
.state-pill { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); }
.state-pill.live { color: #fff; border-color: var(--up); background: rgba(255,77,94,.18); }

/* ---------- leaderboard ---------- */
.board { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.panel { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h3 { margin: 0 0 14px; font-size: 16px; }
.panel h3 small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
td { padding: 11px 6px; border-bottom: 1px solid rgba(255,255,255,.04); }
td.num, th.num { text-align: right; font-family: var(--mono); }
.rank { font-family: var(--mono); color: var(--faint); width: 26px; }
.bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--accent)); }
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; max-height: 420px; overflow: auto; }
.h-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); font-size: 13px; }
.h-item .ok { color: var(--down); } .h-item .no { color: var(--up); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; }
.history .empty { grid-column: 1 / -1; }

/* ---------- rules ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rules-grid > div { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.rules-grid h4 { margin: 0 0 8px; }
.rules-grid p { margin: 0; color: var(--muted); font-size: 13.5px; }

.foot { text-align: center; padding: 70px 16px 50px; color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.foot p { margin: 4px 0; }

/* ---------- drawer & modal ---------- */
.drawer, .modal { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(3,4,6,.6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(720px, 100vw); overflow-y: auto;
  background: linear-gradient(180deg, #10121a, #0a0b10); border-left: 1px solid var(--line-hi);
  padding: 30px clamp(18px, 3vw, 34px) 40px; transform: translateX(100%); transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
.drawer.open, .modal.open { pointer-events: auto; }
.drawer.open .drawer-scrim, .modal.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.x { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-hi); background: transparent; font-size: 22px; line-height: 1; }
.drawer-panel h3 { font-size: 30px; margin: 0; }
.d-price { font-family: var(--mono); margin: 6px 0 18px; }
.chart { height: 340px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 0 20px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.d-calls { display: grid; gap: 10px; }
.d-call { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.d-call p { margin: 4px 0 0; color: #b7bbc7; font-size: 13.5px; }
.d-call .verdict { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; }
.d-call .verdict small { display: block; font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 11px; }
.d-sub { margin: 26px 0 10px; font-size: 15px; }
.bt { display: grid; gap: 8px; }
.bt-row { display: grid; grid-template-columns: 90px 1fr 54px; gap: 10px; align-items: center; font-size: 12.5px; }
.bt-cells { display: grid; grid-template-columns: repeat(60, 1fr); gap: 2px; }
.bt-cells i { height: 14px; border-radius: 2px; background: rgba(255,255,255,.08); }
.bt-cells i.ok { background: var(--c); opacity: .85; }

.modal { display: grid; place-items: center; }
.modal-card {
  position: relative; width: min(420px, calc(100vw - 32px)); padding: 26px; border-radius: 22px;
  background: #11131b; border: 1px solid var(--line-hi); transform: scale(.94); opacity: 0; transition: .35s cubic-bezier(.2,.8,.2,1);
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-card h3 { margin: 0 0 6px; }
.modal-card input { width: 100%; margin: 16px 0; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(0,0,0,.35); color: var(--text); font: inherit; outline: none; }
.modal-card input:focus { border-color: var(--accent); }
.row { display: flex; gap: 10px; justify-content: flex-end; }
.ghost, .solid { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-hi); background: transparent; }
.solid { background: var(--text); color: #0b0c10; border-color: var(--text); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: #f1f2f5; color: #0b0c10; font-weight: 500; transition: .35s cubic-bezier(.2,.8,.2,1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.me-stat { display: flex; gap: 10px; margin: 16px 0 20px; }
.me-stat .stat { flex: 1; }
.me-list { display: grid; gap: 8px; }
.me-item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .agents { grid-template-columns: repeat(2, 1fr); }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .me-btn { margin-left: auto; }
  .board { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .agent .style { min-height: 0; }
  .chart { height: 260px; }
  .bt-row { grid-template-columns: 64px 1fr 44px; }
}
@media (max-width: 480px) {
  .agents { grid-template-columns: 1fr; }
  .brand-text i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}
