:root {
  --bg: #0b0e14;
  --bg-2: #0e121b;
  --panel: #141926;
  --panel-2: #171d2b;
  --line: #212939;
  --line-2: #2b3547;
  --text: #eaf0f8;
  --muted: #8b97ab;
  --faint: #5c6779;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --green: #16c784;
  --green-dim: rgba(22,199,132,.14);
  --red: #ea3943;
  --red-dim: rgba(234,57,67,.14);
  --yellow: #f0b90b;
  --yellow-dim: rgba(240,185,11,.14);
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(900px 500px at 0% -5%, rgba(22,199,132,.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-2); text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* ---------- top nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,14,20,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--blue); }
.logo-sub { color: var(--blue-2); font-weight: 600; }
.live {
  display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  color: var(--green); letter-spacing: .8px;
  background: var(--green-dim); border: 1px solid rgba(22,199,132,.35);
  padding: 5px 10px; border-radius: 999px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22,199,132,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,199,132,.6);} 70% { box-shadow: 0 0 0 8px rgba(22,199,132,0);} 100% { box-shadow: 0 0 0 0 rgba(22,199,132,0);} }
.nav-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.badge {
  background: var(--green-dim); color: #7ff0c0; border: 1px solid rgba(22,199,132,.4);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; white-space: nowrap;
}

/* language switcher */
.lang { position: relative; }
.lang-btn {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 10px; padding: 7px 11px; font-size: 13px; cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: var(--blue); }
.caret { color: var(--muted); font-size: 10px; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: 44px; min-width: 172px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 50;
}
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  background: transparent; border: 0; color: var(--text); padding: 9px 10px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.lang-menu button:hover { background: var(--panel); }
.lang-menu button.sel { color: var(--blue-2); font-weight: 700; }

.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 13px; }
.btn-ghost:hover { color: var(--text); border-color: var(--line-2); }

.disclaimer {
  background: linear-gradient(90deg, rgba(234,57,67,.12), rgba(234,57,67,.04));
  color: #ffc9cc; text-align: center; padding: 8px 12px; font-size: 12.5px;
  border-bottom: 1px solid rgba(234,57,67,.18);
}
.disclaimer a { color: #ff9fa4; text-decoration: underline; }

/* ---------- news ticker ---------- */
.ticker { background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; align-items: center; will-change: transform; animation: marquee 80s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { display: inline-flex; align-items: center; gap: 9px; padding: 9px 20px; font-size: 13px; border-inline-end: 1px solid var(--line); }
.tk-item a { color: var(--text); }
.tk-item a:hover { color: var(--blue-2); }
.tk-cat { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.tk-cat.crypto { background: var(--yellow-dim); color: var(--yellow); }
.tk-cat.sports { background: var(--green-dim); color: var(--green); }
.tk-cat.world { background: rgba(59,130,246,.16); color: var(--blue-2); }

/* ---------- sentiment bar ---------- */
.pulse-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px;
}
.fng { display: flex; align-items: center; gap: 11px; }
.fng-dial { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #06120c; flex: none; }
.fng-meta small { color: var(--muted); font-size: 11px; display: block; }
.fng-meta b { font-size: 13.5px; }
.trend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.trend-label { font-size: 10.5px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.trend-coin { display: inline-flex; align-items: center; gap: 5px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.trend-coin img { width: 15px; height: 15px; border-radius: 50%; }

/* ---------- hero ---------- */
.hero { padding: 34px 0 10px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; max-width: 640px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 22px 0; }
.stat {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.stat-val { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat-val.green { color: var(--green); }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* ---------- cta ---------- */
.cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(59,130,246,.14), rgba(22,199,132,.08));
  border: 1px solid rgba(59,130,246,.35); border-radius: var(--radius); padding: 18px 20px; margin: 6px 0 4px;
}
.cta-text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 260px; }
.cta-text b { font-size: 15.5px; }
.cta-text span { color: var(--muted); font-size: 13px; }
.cta-btn {
  background: var(--green); color: #04140c; font-weight: 800; padding: 12px 20px;
  border-radius: 11px; font-size: 14.5px; white-space: nowrap; border: 0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(22,199,132,.28); transition: transform .12s ease, box-shadow .12s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(22,199,132,.4); }
.linkish { background: transparent; border: 0; color: var(--blue-2); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.code-box { display: flex; gap: 8px; max-width: 420px; margin: 8px 0; }
.code-box input {
  flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: #0a0d14; color: var(--text); text-align: center; letter-spacing: 1px; font-size: 15px;
}
.code-box button { background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 0 18px; font-weight: 700; cursor: pointer; }
.error { color: var(--red); font-size: 13px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin: 22px 0 16px; }
.chip {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .12s ease;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- section headers ---------- */
.sec-head { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; flex-wrap: wrap; }
.sec-title { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.sec-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.sec-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mkt-search {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; width: 190px; max-width: 46vw;
}
.mkt-search:focus { outline: none; border-color: var(--blue); }

/* ---------- grid + cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; margin-bottom: 20px; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  position: relative; overflow: hidden; animation: rise .35s ease both;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--faint); }
.card.high::before { background: var(--green); }
.card.medium::before { background: var(--yellow); }
.card.fun::before { background: var(--blue); }
@keyframes rise { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none;} }

.c-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.c-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.c-tag { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.c-tag.high { background: var(--green-dim); color: #7ff0c0; }
.c-tag.medium { background: var(--yellow-dim); color: #ffdf8a; }
.c-tag.fun { background: rgba(59,130,246,.14); color: var(--blue-2); }
.c-market { font-weight: 700; font-size: 16.5px; margin: 10px 0 2px; line-height: 1.3; }

.c-metrics { display: flex; align-items: baseline; gap: 14px; margin: 10px 0; }
.metric-price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dir-chip { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.dir-chip.up { background: var(--green-dim); color: var(--green); }
.dir-chip.down { background: var(--red-dim); color: var(--red); }
.dir-chip.flat { background: rgba(139,151,171,.14); color: var(--muted); }
.edge-badge { margin-inline-start: auto; background: var(--green-dim); color: var(--green); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 800; }

.spark { width: 100%; height: 46px; margin: 6px 0 10px; display: block; }
.gauge { height: 8px; background: #0a0d14; border-radius: 999px; overflow: hidden; margin: 8px 0 12px; border: 1px solid var(--line); }
.gauge > i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--green)); border-radius: 999px; }

.c-why { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.c-open {
  display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff;
  padding: 9px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  transition: background .12s ease;
}
.c-open:hover { background: var(--blue-2); }

/* locked premium cards */
.card.locked .lock-mask { filter: blur(6px); user-select: none; pointer-events: none; }
.lock-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 16px;
  background: linear-gradient(180deg, rgba(11,14,20,.35), rgba(11,14,20,.8));
}
.lock-overlay .lk { font-size: 26px; }
.lock-overlay b { font-size: 14px; }
.lock-overlay span { color: var(--muted); font-size: 12px; }
.lock-overlay .cta-btn { padding: 9px 16px; font-size: 13px; }

/* ---------- live market cards ---------- */
.mcard {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; animation: rise .3s ease both;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.mcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.m-top { display: flex; gap: 11px; align-items: flex-start; }
.m-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--line); flex: none; }
.m-q { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-mid { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 4px; }
.m-prob { display: flex; align-items: baseline; gap: 7px; }
.m-prob b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-out { font-size: 12px; color: var(--muted); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-vol { text-align: end; font-size: 11px; color: var(--faint); }
.m-vol b { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.m-spark { width: 100%; height: 40px; display: block; margin: 4px 0 10px; }
.m-trade {
  margin-top: auto; display: block; text-align: center; background: rgba(59,130,246,.12);
  color: var(--blue-2); border: 1px solid rgba(59,130,246,.3); padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 700; transition: all .12s ease;
}
.m-trade:hover { background: var(--blue); color: #fff; }
.pbar { height: 6px; background: var(--red-dim); border-radius: 999px; overflow: hidden; margin: 2px 0 8px; }
.pbar > i { display: block; height: 100%; background: var(--green); border-radius: 999px; }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 15px; }

footer {
  max-width: 1080px; margin: 40px auto 24px; padding: 18px 18px 0;
  color: var(--faint); font-size: 12px; text-align: center; border-top: 1px solid var(--line);
}
footer a { color: var(--muted); }

/* light theme (blue/white) for locales/users who prefer it via ?theme=light or toggle */
body.light {
  --bg: #f6f8fc; --bg-2: #fff; --panel: #ffffff; --panel-2: #ffffff;
  --line: #e4e9f2; --line-2: #d3dbe8; --text: #0d1526; --muted: #5b6678; --faint: #94a0b3;
}
body.light .topbar { background: rgba(255,255,255,.85); }
body.light .disclaimer { color: #b4232c; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .hero { padding: 24px 0 6px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}
