/* ================================
   Sports Edge Bot — seb.css (UI Overhaul)
   ================================ */

/* Core tokens */
:root{
  --bg-0:#070a0a;
  --bg-1:#0b1010;
  --fg:#f2f7f2;
  --muted:#b7c3b9;
  --accent:#10ff88;
  --accent-2:#00e6a8;
  --accent-3:#00c497;
  --glass:rgba(255,255,255,0.06);
  --glass-2:rgba(255,255,255,0.08);
  --card:rgba(255,255,255,0.04);
  --ok:#18d07b;
  --warn:#ffb020;
  --bad:#ff4b6e;
  --shadow:0 10px 40px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
  --radius:16px;
  --radius-sm:12px;
  --maxw:1200px;
}

/* Base and background */
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0; color:var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg-0);
  overflow-x:hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  cursor: none;
}
a { text-decoration: none; color: inherit; }

/* Preloader styles */
#preloader {
  position: fixed; inset: 0; background: var(--bg-0); z-index: 99999;
  display: grid; place-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.spinner {
  width: 50px; height: 50px; border: 4px solid var(--glass-2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scroll-triggered animation styles */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Shake Animation for UI feedback */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
.shake {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}


/* Grain */
.grain{
  pointer-events:none; position:fixed; inset:0; z-index:1;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.07"/></svg>');
  mix-blend-mode:soft-light; animation:grain 6s steps(6) infinite; opacity:.4;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-2%,1%)} 40%{transform:translate(1%,-1%)} 60%{transform:translate(-1%,2%)} 80%{transform:translate(2%,0)} 100%{transform:translate(0,0)} }

/* Custom Cursor */
#customCursor {
  position: fixed; width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 10000; mix-blend-mode: difference;
  transition: transform 0.1s ease, opacity 0.2s ease; transform: translate(-50%, -50%);
}
#cursorRing {
  position: fixed; width: 32px; height: 32px; border: 2px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 10000; mix-blend-mode: difference;
  transition: all 0.15s ease; transform: translate(-50%, -50%); opacity: 0.6;
}
body:hover #customCursor, body:hover #cursorRing { opacity: 1; }
@media (pointer:coarse) { body{cursor:auto} #customCursor, #cursorRing {display:none} }

/* Animated Background Layers */
.bg-layer{
  position: fixed;
  top: -120px; left: -120px; right: -120px; bottom: -120px;
  pointer-events: none; z-index: -1;
}
.layer-1{ background: radial-gradient(1400px 800px at 20% 10%, rgba(16,255,136,0.12), transparent 70%); background-repeat: no-repeat; animation: bg1-shift 20s ease-in-out infinite; }
.layer-2{ background: radial-gradient(1200px 900px at 80% 80%, rgba(0,230,168,0.08), transparent 65%); background-repeat: no-repeat; animation: bg2-shift 25s ease-in-out infinite; }
.layer-3{ background: radial-gradient(1000px 1000px at 50% 50%, rgba(16,255,136,0.04), transparent 60%); background-repeat: no-repeat; animation: bg3-shift 30s ease-in-out infinite; }
@keyframes bg1-shift{ 0%,100% { background-position: 0 0; } 33% { background-position: -50px 30px; } 66% { background-position: 30px -40px; } }
@keyframes bg2-shift{ 0%,100% { background-position: 0 0; } 33% { background-position: 40px -50px; } 66% { background-position: -30px 40px; } }
@keyframes bg3-shift{ 0%,100% { background-position: 0 0; } 50% { background-position: 20px 20px; } }

#particleCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; opacity: 0.4; }

/* 3D Scroll Cube */
#scroll-cube-container {
  position: fixed; top: 50%; right: 16px; transform: translateY(-50%);
  width: 64px; height: clamp(240px, 40vh, 420px); z-index: 1000; pointer-events: none;
}
#scroll-cube-container::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(220px 80px at 50% 50%, rgba(16,255,136,0.05), transparent 72%);
  filter: blur(8px); pointer-events: none; opacity: 0.5;
}
#scroll-cube-container canvas{
  display:block; width:100% !important; height:100% !important; pointer-events:auto;
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
  filter: drop-shadow(0 6px 16px rgba(16,255,136,0.18)) drop-shadow(0 0 10px rgba(0,230,168,0.2));
}
#scroll-cube-container:hover canvas{
  transform: scale(1.03);
  filter: drop-shadow(0 10px 22px rgba(16,255,136,0.24)) drop-shadow(0 0 16px rgba(0,230,168,0.28));
}
@media (max-width: 980px){ #scroll-cube-container{ display:none } }

/* Header/Nav */
.site-header{
  position:sticky; top:0; z-index:20; backdrop-filter:saturate(150%) blur(14px);
  background:linear-gradient(180deg, rgba(7,10,10,0.75), rgba(7,10,10,0.35));
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.nav{
  max-width:var(--maxw); margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{display:flex; align-items:center; gap:12px}
.logo{ width:34px; height:34px; border-radius:10px; flex-shrink:0; object-fit:cover; }
.logo.sm{ width:28px; height:28px; border-radius:8px; }
.brand-text{display:flex; flex-direction:column; line-height:1.05}
.brand-text strong{font-size:16px}
.brand-text small{font-size:12px; color:var(--muted)}
.nav-links{display:flex; gap:12px; flex-wrap:wrap}
.nav-links a{ padding:8px 10px; border-radius:10px; color:var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover{background:var(--glass); color:var(--fg)}

/* HERO and dynamic title */
.hero{position:relative; z-index:2; max-width:var(--maxw); margin:80px auto; padding:56px 20px 28px; text-align:center}
.orbital{
  position:absolute; inset:-60px -20px auto; height:320px; filter:blur(60px); opacity:.55; pointer-events:none;
  background: radial-gradient(650px 220px at 22% 60%, rgba(16,255,136,0.18), transparent 65%),
              radial-gradient(450px 200px at 78% 40%, rgba(0,230,168,0.14), transparent 65%);
  animation:pulse 8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }

.fx-title{
  display:flex; gap:.45ch; align-items:baseline; justify-content:center; flex-wrap:wrap;
  font-weight:900; letter-spacing:-0.5px; margin:0 auto 14px; max-width:950px;
  text-shadow:0 0 20px rgba(16,255,136,0.14);
  font-size: clamp(36px, 5vw, 72px);
}
.fx-title .swap{ position:relative; display:inline-block; color:var(--fg); }
.fx-title .swap::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:linear-gradient(90deg, transparent, rgba(16,255,136,0.85), transparent);
  opacity:0; animation:title-flicker 2.4s infinite ease-in-out;
}
@keyframes title-flicker{ 0%,96%,100%{opacity:0} 10%{opacity:.8} 12%{opacity:0} 20%{opacity:.5} 22%{opacity:0} }

.sub{color:var(--muted); max-width:760px; margin:0 auto 28px; font-size:clamp(16px, 1.5vw, 20px); line-height: 1.6;}
.hero-actions{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:10px 0 6px}

.btn{
  padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,0.1); background:transparent; color:var(--fg); cursor:none; position:relative; overflow:hidden; transition:filter .12s, transform .12s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.pill{
  color:#06120a; background:linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow:0 6px 24px rgba(16,255,136,0.28), 0 0 0 1px rgba(255,255,255,0.06) inset; border:none;
}
.btn:hover{filter:brightness(1.1); transform:translateY(-2px)}
.btn:disabled { filter: brightness(0.6); pointer-events: none; }

/* Run Button Animation */
#runBtn .btn-glow {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(16,255,136,0.5) 0%, rgba(16,255,136,0) 60%);
  transform-origin: center;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}
#runBtn.running .btn-glow {
  animation: run-glow-pulse 1.2s infinite ease-in-out;
}
#runBtn.success .btn-glow {
  animation: run-glow-success 0.6s ease-out forwards;
}
@keyframes run-glow-pulse {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes run-glow-success {
  0% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.5); }
}

.marquee{
  overflow:hidden; white-space:nowrap; border-radius:12px; border:1px solid rgba(255,255,255,0.06);
  background:var(--glass); padding:10px; color:var(--muted); max-width:var(--maxw); margin:28px auto 0
}
.marquee span{display:inline-block; padding-right:40px; animation:scroll 20s linear infinite}
@keyframes scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* Panels */
.panel{max-width:var(--maxw); margin:10px auto 50px; padding:0 20px; position: relative; z-index: 2;}
.panel-hd{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 2px}
.panel-title-group { display: flex; align-items: center; gap: 12px; }
.panel-title-group h2 { margin: 0; }
.panel-hd small{color:var(--muted)}
.panel-bd{ position:relative; background:var(--card); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius); box-shadow:var(--shadow); padding:24px; overflow:hidden }

/* Features */
.features .feature-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px}
@media (max-width:1100px){ .features .feature-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:620px){ .features .feature-grid{grid-template-columns:1fr} }
.feature-card{
  position:relative; overflow:hidden; background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); min-height:140px;
}
.feature-card .num{ position:absolute; top:10px; right:12px; font-size:32px; font-weight:900; color:rgba(16,255,136,0.22); text-shadow:0 0 18px rgba(16,255,136,0.12) }
.tilt{transform-style:preserve-3d; transition:transform .2s ease, box-shadow .2s ease}
.tilt:hover{transform:translateY(-2px) rotateX(1deg) rotateY(-1deg)}

/* Model Lab */
.palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.model-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.model-card:has(> .model-explainer[open]) {
    z-index: 2;
}
.model-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.1);
    border-color: rgba(16, 255, 136, 0.4);
}
.model-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.card-category {
    position: absolute;
    top: 10px; right: 10px;
    font-size: 11px; font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    color: var(--bg-0);
    text-transform: uppercase;
    background: var(--muted);
}
.card-category.tree { background-color: rgba(0, 230, 168, 0.9); }
.card-category.boost { background-color: rgba(255, 176, 32, 0.9); }
.card-category.net { background-color: rgba(255, 75, 110, 0.9); }
.card-category.linear { background-color: var(--muted); }
.card-category.meta { background-color: var(--warn); }
.card-icon {
    font-size: 2.5rem;
    margin: 10px 0;
    color: var(--accent);
    text-shadow: 0 0 16px rgba(16,255,136,0.3);
}
.card-title { margin: 0 0 4px; font-size: 16px; color: var(--fg); }
.card-desc { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.4; min-height: 36px; }

/* Explainer Pop-up */
.model-explainer {
    position: relative;
    line-height: 1;
}
.info-toggle {
    list-style: none;
    padding: 6px;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s;
}
.info-toggle::-webkit-details-marker { display: none; }
.info-toggle:hover { color: var(--fg); }
.model-explainer[open] > .info-toggle { color: var(--accent); }
.explainer-content {
    position: absolute;
    background: rgba(11, 16, 16, 0.95);
    border: 1px solid var(--accent);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    text-align: left;
    z-index: 10;
    pointer-events: none;
    animation: fadeInExplainer 0.3s ease-out;
}
.model-card .explainer-content {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
}
.panel-explainer .explainer-content {
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
}
.panel-explainer .explainer-content ul {
    margin: 8px 0 0; padding-left: 18px; line-height: 1.5;
}
.panel-explainer .explainer-content li { margin-bottom: 4px; }

@keyframes fadeInExplainer { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.model-card .explainer-content { animation-name: fadeInCardExplainer; }
@keyframes fadeInCardExplainer { from { opacity: 0; transform: translateX(-50%) translateY(5px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.model-card.coming-soon {
    cursor: not-allowed;
    filter: grayscale(80%) brightness(0.6);
    overflow: hidden;
}
.model-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: rgba(255,255,255,0.08);
}
.soon-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    background: rgba(0,0,0,0.3);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
}

.chip {
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); border:1px solid rgba(16,255,136,0.35);
  color:var(--fg); padding: 8px 12px; border-radius:12px; user-select:none; box-shadow:0 8px 20px rgba(0,0,0,0.25);
  display: block; text-align: left;
}
.lane{
  display:flex; gap:12px; flex-wrap:wrap; min-height:64px; padding:10px;
  border-radius:14px; border:2px dashed rgba(16,255,136,0.25); background:rgba(255,255,255,0.03);
  transition: background .2s, border-color .2s;
}
.lane.drag-over{background:rgba(16,255,136,0.09); border-color:rgba(16,255,136,0.6)}

.lane-hint{color:var(--muted); margin: auto;}
.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; align-items: center;}

.lane .chip {
    animation: chip-in 0.4s ease-out;
    cursor: none;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    padding-right: 28px;
}
.lane .chip:hover {
    border-color: var(--bad);
    background: rgba(255, 75, 110, 0.1);
}
.lane .chip::after {
    content: '×';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: var(--muted);
    transition: color 0.2s;
}
.lane .chip:hover::after {
    color: var(--bad);
}

@keyframes chip-in {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.slider-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.slider-control label {
    font-size: 13px;
    color: var(--muted);
}
.slider-control output {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    color: var(--accent);
    background: var(--glass);
    padding: 4px 8px;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    background: transparent;
    cursor: none;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%; height: 6px; background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-2); border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    margin-top: -6px; width: 18px; height: 18px;
    background: var(--accent); border-radius: 50%;
    border: 2px solid var(--bg-1);
    box-shadow: 0 0 8px rgba(16,255,136,0.5);
    transition: transform 0.2s ease;
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.1); }
input[type="range"]::-moz-range-track {
    width: 100%; height: 6px; background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-2); border-radius: 3px;
}
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; background: var(--accent);
    border-radius: 50%; border: 2px solid var(--bg-1);
    box-shadow: 0 0 8px rgba(16,255,136,0.5);
}


/* Data Ingestion */
.upload-box { max-width: 600px; margin: 0 auto; padding: 3rem 2rem; background: var(--glass); border: 2px dashed var(--glass-2); border-radius: var(--radius); text-align: center; cursor: none; transition: all 0.3s ease; }
.upload-box:hover { border-color: var(--accent); background: var(--card); transform: scale(1.02); }
.upload-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--accent); }
.data-preview { margin-top: 2rem; padding: 1rem; background: var(--card); border: 1px solid var(--glass-2); border-radius: var(--radius); }
.data-preview h3 { margin-top: 0; margin-bottom: 1rem; }
.table-wrap { max-height: 400px; overflow-y: auto; overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 0.5rem; border-bottom: 1px solid var(--glass-2); text-align: left; font-size: 14px; white-space: nowrap;}
.table-wrap th { color: var(--accent); font-weight: 600; position: sticky; top: 0; background: var(--bg-1); }

.table-wrap::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* Prediction Chart UI */
.chart-controls { display: flex; justify-content: center; margin-bottom: 1rem; }
.chart-style-selector { display: flex; gap: 0.5rem; background: var(--glass); border: 1px solid var(--glass-2); border-radius: var(--radius); padding: 0.5rem; }
.chart-style-btn {
  padding: 0.8rem 1.5rem; background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; cursor: none; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-width: 120px;
}
.chart-style-btn.active { background: var(--card); color: var(--accent); }
.chart-style-btn:hover:not(.active) { color: var(--fg); background: var(--glass-2); }
.style-icon { font-size: 1.2rem; }
.chart-container { position: relative; background: var(--glass); border: 1px solid var(--glass-2); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); overflow: hidden; }
.chart-container::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--accent), transparent 70%); opacity: 0.03; pointer-events: none; }
#predictionChart { width: 100%; height: 300px; position: relative; z-index: 1; }
.chart-overlay { position: absolute; inset: 0; pointer-events: none; }
.chart-tooltip {
  position: fixed; background: rgba(7, 10, 10, 0.95); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: 0.8rem 1.2rem; color: var(--fg); font-size: 0.9rem; font-weight: 600;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; z-index: 100; backdrop-filter: blur(10px); transform: translate(-50%, -120%);
}
.chart-explanation-box {
    margin-top: 16px;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-2);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    transition: opacity 0.3s ease-in-out;
}
.chart-explanation-box strong {
    color: var(--accent);
    font-weight: 700;
}
.chart-explanation-box p {
    margin: 0;
}
.chart-scanner {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 16, 0.5);
  backdrop-filter: blur(2px);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  overflow: hidden;
}
.chart-scanner.active {
  opacity: 1;
}
.chart-scanner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
  animation: scan-y 1.2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
  opacity: 0;
}
.chart-scanner.active::after {
  opacity: 1;
}
@keyframes scan-y {
  0% { transform: translateY(0%); }
  100% { transform: translateY(300px); }
}

/* KPIs */
.kpis{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:10px}
.k{background:var(--glass); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:10px; transition:transform .18s}
.k:hover{transform:translateY(-2px)}
.k h4{margin:0; font-size:12px; color:var(--muted)}
.k div{font-size:18px; font-weight:800}

/* Explain Section Enhanced */
.explain-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.explain-main, .explain-side { display: flex; flex-direction: column; gap: 24px; }
.chart-wrap{position:relative;}
.chart-title {
  margin: 0 0 8px; font-size: 14px; color: var(--muted);
}
#impChart{width:100%; height: auto; aspect-ratio: 2.5 / 1; background:rgba(0,0,0,0.28); border:1px solid rgba(255,255,255,0.08); border-radius:12px}
#impOverlay{position:absolute; inset:0; pointer-events:none; background: radial-gradient(800px 260px at 70% 0%, rgba(16,255,136,0.06), transparent 60%)}

/* NEW: Prediction Contribution styles */
.viz-container {
  background: var(--glass);
  border: 1px solid var(--glass-2);
  border-radius: var(--radius);
  padding: 16px;
  flex-grow: 1;
}
.contribution-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 150px;
}
.viz-hint {
  margin: auto;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.contrib-item {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.contrib-item .label {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.contrib-item .bar-bg {
  height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  overflow: hidden;
}
.contrib-item .bar-fill {
  height: 100%;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.contrib-item.tree .bar-fill { background: var(--accent-2); }
.contrib-item.boost .bar-fill { background: var(--warn); }
.contrib-item.net .bar-fill { background: var(--bad); }
.contrib-item.linear .bar-fill { background: var(--muted); }
.contrib-item.meta .bar-fill { background: var(--warn); }
.contrib-item .value {
  font-weight: 700;
  text-align: right;
  font-family: ui-monospace, monospace;
}
.is-visible .bar-fill {
  transform: scaleX(var(--scale, 0));
}

@media (max-width: 980px) {
  .explain-grid { grid-template-columns: 1fr; }
}


/* Tokenomics Section */
.tokenomics-container {
  display: grid;
  grid-template-columns: 3fr 4fr;
  gap: 32px;
  align-items: center;
}
.tokenomics-chart-wrapper {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
}
#tokenomicsChart {
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}
.chart-info {
  position: absolute;
  text-align: center;
  pointer-events: none;
}
.chart-info strong {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 900;
  display: block;
  color: var(--fg);
  line-height: 1;
}
.chart-info span {
  font-size: 0.9rem;
  color: var(--muted);
}
.chart-wrap {
  position: relative;
  margin-bottom: -14px;
}
.tokenomics-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.token-item {
  background: var(--glass);
  border: 1px solid var(--glass-2);
  border-radius: var(--radius);
  padding: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: default;
}
.token-item:hover {
  background: var(--card);
  border-color: rgba(16, 255, 136, 0.4);
  transform: scale(1.02);
}
.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.item-header h4 {
  margin: 0;
  color: var(--fg);
}
.item-pct {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}
.token-item p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.progress-bar {
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#tokenomics.is-visible .progress-fill {
  transform: scaleX(1);
}


/* Roadmap v2 + Phase styling */
.roadmap-v2 .timeline{ list-style:none; margin:0; padding:0; position:relative; }
.roadmap-v2 .timeline::before{ content:""; position:absolute; left:24px; top:0; bottom:0; width:2px; background:linear-gradient(var(--accent), transparent); opacity:.35; }
.road-step{
  display:flex; gap:12px; position:relative; padding:12px 12px 12px 54px; margin:8px 0; border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); border:1px solid rgba(255,255,255,0.08);
}
.step-num{
  position:absolute; left:10px; top:10px; width:28px; height:28px; border-radius:8px;
  background:linear-gradient(180deg, var(--accent), var(--accent-2)); color:#06120a; font-weight:900; display:grid; place-items:center; box-shadow:0 6px 18px rgba(16,255,136,0.25)
}
.step-body h3{margin:0 0 6px}
.phase-time{
  margin: 0 0 6px; color: var(--muted); font-weight: 600; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.phase-time i{ color: var(--accent); }
.phase-goal{
  margin: 0 0 8px; color: var(--fg); font-weight: 600; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.phase-goal i.fa-bullseye{ color: var(--accent-2); }
.phase-list{ margin: 8px 0 0 0; padding-left: 18px; color: var(--muted); }
.phase-list li{ margin: 6px 0; line-height: 1.55; }
.phase-list li::marker{ color: var(--accent); }

/* Footer */
.site-footer{
  margin-top:40px; border-top:1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(800px 300px at 10% 0%, rgba(16,255,136,0.12), transparent 60%),
    radial-gradient(700px 250px at 90% 0%, rgba(0,230,168,0.10), transparent 60%),
    linear-gradient(180deg, rgba(7,10,10,0.25), rgba(7,10,10,0.65));
  color:var(--muted);
  position: relative; z-index: 2;
}
.ft-wrap{ max-width:var(--maxw); margin:0 auto; padding:20px; display:flex; align-items:flex-start; justify-content:space-between; gap:24px; flex-wrap:wrap }
.ft-brand{display:flex; align-items:center; gap:10px}
.ft-links{display:flex; gap:24px; flex-wrap:wrap; align-items:flex-start}
.ft-group{min-width:160px}
.ft-group h4{margin:0 0 8px; color:var(--fg)}
.ft-link{display:block; padding:4px 0; color:var(--muted); transition: color .15s}
.ft-link:hover{color:var(--fg)}
.ft-legal{border-top:1px solid rgba(255,255,255,0.06); text-align:center; padding:12px 20px; font-size:12px}

.social-links { display: flex; gap: 16px; align-items: center; margin-top: 4px; }
.social-links a { display: inline-flex; font-size: 24px; }
.social-links i { color: var(--muted); transition: color .15s, transform .15s; }
.social-links a:hover i { color: var(--fg); transform: scale(1.1); }

.contract-panel { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; max-width: 280px; }
.contract-panel code { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contract-panel button {
  position: relative; display: grid; place-items: center; flex-shrink: 0; background: var(--glass); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px; cursor: none; transition: background .15s; color: var(--muted);
}
.contract-panel button:hover { background: var(--glass-2); color: var(--fg); }
.contract-panel button.copied::after {
  content: 'Copied!'; position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--bg-0); padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; animation: fadein .3s ease;
}
@keyframes fadein { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to   { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Responsive tweaks */
@media (max-width:980px){
  .nav-links{display:none}
  .kpis{grid-template-columns:1fr 1fr}
}
@media (max-width: 820px) {
  .tokenomics-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tokenomics-chart-wrapper {
    order: -1;
  }
}
@media (max-width:640px){
  .fx-title{font-size: clamp(26px, 6vw, 42px)}
  .ft-wrap{gap: 24px; flex-direction: column; align-items: center; text-align: center;}
  .ft-links{justify-content: center; text-align: center; flex-direction: column; align-items: center;}
  .social-links{justify-content: center;}
}
@media (max-width:500px) {
  .palette { grid-template-columns: 1fr 1fr; }
}