/* PolyHunter — styles */
:root {
  --bg: #0A0E1A;
  --bg2: #0F1424;
  --surface: #141B2D;
  --line: #1E2638;
  --ink: #F5F5F4;
  --muted: #94A3B8;
  --gold: #FFC857;
  --mint: #6EE7B7;
  --grid: rgba(148,163,184,0.06);
}
html.light {
  --bg: #F6F1E7;
  --bg2: #FFFAF0;
  --surface: #FFFFFF;
  --line: rgba(10,14,26,0.08);
  --ink: #0A0E1A;
  --muted: #5B6473;
  --grid: rgba(10,14,26,0.05);
  color-scheme: light;
}
html.dark { color-scheme: dark; }

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter','Satoshi',sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.font-display { font-family: 'Satoshi','Inter',sans-serif; letter-spacing: -0.035em; }
.font-mono { font-family: 'Geist Mono','JetBrains Mono',ui-monospace,monospace; font-feature-settings: "tnum","ss01","zero"; }

.bg-bg { background: var(--bg); }
.bg-bg2 { background: var(--bg2); }
.bg-surface { background: var(--surface); }
.text-ink { color: var(--ink); }
.text-muted { color: var(--muted); }
.border-line { border-color: var(--line); }

.grid-bg {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}

.radial-gold {
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(255,200,87,0.20), transparent 60%),
    radial-gradient(700px 500px at 92% 6%, rgba(110,231,183,0.10), transparent 65%);
}
html.light .radial-gold {
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(255,200,87,0.45), transparent 60%),
    radial-gradient(700px 500px at 92% 6%, rgba(110,231,183,0.22), transparent 65%);
}

.btn-gold {
  background: linear-gradient(180deg, #FFD179 0%, #FFC857 60%, #E2A93C 100%);
  color: #0A0E1A;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px -10px rgba(255,200,87,0.55), 0 0 0 1px rgba(255,200,87,0.25) inset;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-gold::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform .9s ease;
}
.btn-gold:hover::after { transform: translateX(130%); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 18px 50px -12px rgba(255,200,87,0.7), 0 0 0 1px rgba(255,200,87,0.4) inset; }

.btn-aura { position: relative; }
.btn-aura::before {
  content:""; position:absolute; inset:-2px; border-radius: inherit;
  background: radial-gradient(closest-side, rgba(255,200,87,0.45), transparent 70%);
  filter: blur(14px);
  z-index: -1;
  animation: aura 3s ease-in-out infinite;
}
@keyframes aura {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

.btn-ghost {
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--ink);
  transition: all .2s ease;
}
.btn-ghost:hover { border-color: rgba(255,200,87,0.6); color: var(--gold); }

.lift {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
.lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,200,87,0.22) inset;
  border-color: rgba(255,200,87,0.28);
}

.tilt-wrap { transform-style: preserve-3d; transition: transform .25s ease; }
.tilt-glare {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,200,87,0.18), transparent 40%);
  opacity: 0; transition: opacity .25s ease;
}
.tilt-wrap:hover .tilt-glare { opacity: 1; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes pulseGold {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,200,87,0)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(255,200,87,0.6)); }
}
.pulse-gold { animation: pulseGold 1.6s ease-in-out infinite; }

@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(110,231,183,0.6); }
  70% { box-shadow: 0 0 0 9px rgba(110,231,183,0); }
}
.live-dot { animation: livePulse 1.8s infinite; }
@keyframes liveRed {
  0%,100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.7); }
  70% { box-shadow: 0 0 0 9px rgba(248,113,113,0); }
}
.live-red { animation: liveRed 1.6s infinite; }

@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-track { animation: ticker 60s linear infinite; }

@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
.shimmer {
  background: linear-gradient(90deg, rgba(148,163,184,0.06) 0px, rgba(255,200,87,0.15) 50%, rgba(148,163,184,0.06) 100px);
  background-size: 400px 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes loadGrow { from { width: 10% } to { width: 100% } }

.digit-col { display: inline-flex; flex-direction: column; height: 1em; overflow: hidden; vertical-align: top; line-height: 1; }
.digit-col > span { height: 1em; line-height: 1; }

.cursor-dot, .cursor-halo {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); border-radius: 50%;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px; background: #FFC857;
  transition: transform .08s ease-out;
}
.cursor-halo {
  width: 36px; height: 36px; border: 1px solid rgba(255,200,87,0.55);
  transition: transform .18s ease-out, width .2s ease, height .2s ease, opacity .2s ease;
}
.cursor-halo.hover { width: 64px; height: 64px; background: rgba(255,200,87,0.08); }
@media (max-width: 1024px) {
  .cursor-dot, .cursor-halo { display: none !important; }
}

.theme-wipe {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: linear-gradient(135deg, var(--gold) 0%, var(--mint) 100%);
  clip-path: polygon(-2% 0, -2% 0, -2% 100%, -2% 100%);
  opacity: 0;
  transition: clip-path .8s cubic-bezier(.7,0,.2,1), opacity .15s ease;
}
.theme-wipe.active { opacity: 1; clip-path: polygon(-2% 0, 130% 0, 130% 100%, -2% 100%); }
.theme-wipe.reset { transition: none; clip-path: polygon(-2% 0, -2% 0, -2% 100%, -2% 100%); opacity: 0; }

/* Data flow micro-flickers */
.data-flick-layer {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.data-flick {
  position: absolute;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: rgba(110,231,183,0.35);
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(110,231,183,0.25);
  opacity: 0;
  animation: dataFlick var(--dur,3s) ease-in-out var(--del,0s) infinite;
}
.data-flick.gold { color: rgba(255,200,87,0.45); text-shadow: 0 0 8px rgba(255,200,87,0.3); }
@keyframes dataFlick {
  0%, 100% { opacity: 0; transform: translateY(2px); }
  20%, 70% { opacity: 1; transform: translateY(0); }
  85% { opacity: 0.4; }
}

/* LIVE bot activity banner */
.bot-banner {
  background:
    linear-gradient(180deg, rgba(255,200,87,0.04), transparent),
    var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.bot-banner::before {
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 6%, transparent 94%, var(--bg) 100%);
  z-index: 2; pointer-events: none;
}

/* Coin halo */
.coin-halo {
  position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgba(255,200,87,0.45), transparent 65%);
  filter: blur(10px);
  animation: coinHalo 3.6s ease-in-out infinite;
}
@keyframes coinHalo {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

/* Floating number hover spark */
.num-spark { position: relative; cursor: default; }
.num-spark .spark-pop {
  position: absolute; left: 0; right: 0; top: 100%;
  height: 24px; margin-top: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.num-spark:hover .spark-pop { opacity: 1; transform: translateY(0); }

/* Heatmap cell sizing override */
.apex-heatmap-wrap .apexcharts-canvas { background: transparent !important; }

/* Confetti container */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9000; }
.confetti {
  position: absolute; width: 8px; height: 14px;
  background: #FFC857; border-radius: 2px;
  will-change: transform, opacity;
}

/* PH tooltip (universal) */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 10px; border-radius: 8px;
  font-size: 11px; font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 50;
}
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.nav-tip { position: relative; cursor: help; }
.nav-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 8px;
  font-size: 11px; font-family: 'Geist Mono',monospace;
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
  z-index: 50;
}
.nav-tip:hover::after { opacity: 1; }

.mark-num {
  font-family: 'Geist Mono',monospace; letter-spacing: 0.28em;
  font-size: 11px; color: var(--gold); text-transform: uppercase;
}

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

.scroll-x { scroll-snap-type: x mandatory; }
.scroll-x > * { scroll-snap-align: start; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 99px; }

.kbd {
  font-family: 'Geist Mono',monospace; font-size: 10px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--line); color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.text-glow-gold { text-shadow: 0 0 22px rgba(255,200,87,0.45); }

.three-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

::selection { background: #FFC857; color: #0A0E1A; }

.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
.sticky-cta > * { pointer-events: auto; }

body.diamond-mode { animation: diamondHue 3s linear infinite; }
@keyframes diamondHue {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

body.present-mode header,
body.present-mode .ticker-bar,
body.present-mode .sticky-cta,
body.present-mode .cursor-dot,
body.present-mode .cursor-halo,
body.present-mode footer { display: none !important; }

@keyframes drawLine { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.draw-line.in path { animation: drawLine 2s ease forwards; }

.drop-cap::first-letter {
  font-family: 'Satoshi',serif; font-weight: 900;
  float: left; font-size: 4.5em; line-height: 0.85;
  padding: .04em .12em 0 0; color: var(--gold);
}

[x-cloak] { display: none !important; }

/* ===== Live stat skeletons ===== */
[data-stat].skeleton {
  display: inline-block;
  min-width: 4ch;
  background: linear-gradient(90deg, rgba(20,27,45,0.6) 0%, rgba(45,55,80,0.95) 50%, rgba(20,27,45,0.6) 100%);
  background-size: 200% 100%;
  animation: statShimmer 1.5s infinite;
  color: transparent !important;
  border-radius: 4px;
}
[data-stat].skeleton * { color: transparent !important; visibility: hidden; }
@keyframes statShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
html.light [data-stat].skeleton {
  background: linear-gradient(90deg, rgba(20,17,10,0.06) 0%, rgba(20,17,10,0.14) 50%, rgba(20,17,10,0.06) 100%);
  background-size: 200% 100%;
}

/* Just-updated flash */
@keyframes statPing {
  0% { box-shadow: 0 0 0 0 rgba(255,200,87,0.45); }
  100% { box-shadow: 0 0 0 12px rgba(255,200,87,0); }
}
[data-stat].pinged {
  animation: statPing 1.2s ease-out;
  border-radius: 6px;
}
