:root {
  --bg: #07111f;
  --bg2: #0c1628;
  --panel: rgba(18, 27, 44, 0.74);
  --panel-border: rgba(255,255,255,0.08);
  --text: #edf4ff;
  --muted: #98a8c7;
  --primary: #6ea8ff;
  --good: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --ring: #79aefc;
  --shadow: 0 10px 40px rgba(0,0,0,0.25);
}
body.light {
  --bg: #eef4ff;
  --bg2: #dbe8ff;
  --panel: rgba(255,255,255,0.82);
  --panel-border: rgba(28, 41, 68, 0.08);
  --text: #10203d;
  --muted: #596a8a;
  --primary: #2f6bff;
  --good: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --ring: #2563eb;
  --shadow: 0 8px 30px rgba(45, 88, 180, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(94,146,255,0.18), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(39,196,255,0.16), transparent 28%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.app-shell { max-width: 1280px; margin: 0 auto; padding: 18px; }
.glass {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}
.topbar { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; border-radius:26px; margin-bottom:18px; }
.brand-wrap { display:flex; align-items:center; gap:12px; }
.brand-logo { width:52px; height:52px; border-radius:16px; background:linear-gradient(145deg,#7ec8ff,#4f46e5); display:grid; place-items:center; box-shadow: inset 0 1px 5px rgba(255,255,255,0.35); }
.brand-i { font-size:28px; font-weight:800; color:white; }
.brand-text { font-size:clamp(28px,4vw,36px); font-weight:800; letter-spacing:.02em; background:linear-gradient(90deg,#9bd2ff,#ffffff,#90a9ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
body.light .brand-text { background:linear-gradient(90deg,#1746be,#2563eb,#111827); -webkit-background-clip:text; background-clip:text; }
.toggle-btn { background:transparent; border:none; cursor:pointer; }
.toggle-track { width:58px; height:32px; display:block; background:rgba(255,255,255,.14); border:1px solid var(--panel-border); border-radius:999px; position:relative; }
.toggle-thumb { width:24px; height:24px; background:white; border-radius:50%; position:absolute; top:3px; left:4px; transition:transform .25s ease; }
body.light .toggle-thumb { transform:translateX(25px); }
.hero-card { padding:18px; border-radius:28px; margin-bottom:18px; }
.search-row { display:grid; grid-template-columns:1fr 140px; gap:12px; }
.search-box { position:relative; }
.search-box input { width:100%; border:none; outline:none; border-radius:20px; padding:18px 18px; font-size:16px; color:var(--text); background:rgba(255,255,255,0.08); }
body.light .search-box input { background:rgba(28,41,68,0.05); }
.primary-btn { border:none; border-radius:20px; font-size:16px; font-weight:700; background:linear-gradient(135deg,var(--primary),#7c3aed); color:white; cursor:pointer; }
.primary-btn:disabled { opacity:.7; cursor:wait; }
.suggestions { position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:30; border-radius:18px; overflow:hidden; background:rgba(12,18,31,0.98); border:1px solid var(--panel-border); }
body.light .suggestions { background:rgba(255,255,255,0.98); }
.suggestion-item { display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; border-bottom:1px solid var(--panel-border); }
.suggestion-item:last-child { border-bottom:none; }
.suggestion-item:hover { background:rgba(255,255,255,0.05); }
.hidden { display:none !important; }
.coin-hero { margin-top:18px; display:flex; justify-content:space-between; align-items:center; gap:18px; flex-wrap:wrap; }
.coin-main { display:flex; align-items:center; gap:14px; }
.coin-logo { width:54px; height:54px; border-radius:50%; }
.coin-name { font-size:24px; font-weight:800; }
.coin-ticker { color:var(--muted); font-size:14px; letter-spacing:.16em; }
.coin-price { font-size:28px; font-weight:800; text-align:right; }
.coin-change { font-weight:700; text-align:right; }
.positive { color:var(--good); }
.negative { color:var(--bad); }
.neutral { color:var(--muted); }
.dashboard-grid { display:grid; grid-template-columns:1.2fr 1.2fr .9fr; gap:18px; }
.panel-span-2 { grid-column:span 2; }
.chart-card,.score-card,.metrics-card,.strong-card,.sentiment-card { border-radius:28px; padding:18px; }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.panel-head h2 { margin:0; font-size:18px; }
.chart-wrap { position:relative; }
#chartContainer { height:420px; width:100%; }
.chart-overlay { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); font-weight:600; pointer-events:none; }
.timeframe-tabs { display:flex; gap:8px; }
.tf-btn { border:none; border-radius:999px; padding:8px 12px; cursor:pointer; color:var(--muted); background:rgba(255,255,255,.06); font-weight:700; }
.tf-btn.active { color:white; background:linear-gradient(135deg,var(--primary),#7c3aed); }
.score-ring-wrap { position:relative; width:220px; margin:10px auto 14px; }
.score-ring { width:220px; height:220px; transform:rotate(-90deg); }
.score-bg,.score-progress { fill:none; stroke-width:10; }
.score-bg { stroke:rgba(255,255,255,0.08); }
body.light .score-bg { stroke:rgba(28,41,68,0.08); }
.score-progress { stroke:var(--ring); stroke-linecap:round; stroke-dasharray:314; stroke-dashoffset:314; transition:stroke-dashoffset .45s ease; }
.score-center { position:absolute; inset:0; display:grid; place-items:center; align-content:center; gap:2px; }
.score-value { font-size:46px; font-weight:800; }
.score-label { color:var(--muted); }
.signal-badge { width:max-content; margin:0 auto 10px; padding:10px 16px; border-radius:999px; font-weight:800; letter-spacing:.05em; background:rgba(255,255,255,0.08); }
.signal-badge.buy,.signal-badge.strong-buy { color:#fff; background:linear-gradient(135deg,#16a34a,#22c55e); }
.signal-badge.hold { color:#fff; background:linear-gradient(135deg,#d97706,#f59e0b); }
.signal-badge.sell { color:#fff; background:linear-gradient(135deg,#dc2626,#ef4444); }
.confidence-text { text-align:center; color:var(--muted); line-height:1.5; }
.metrics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.placeholder-grid { display:block; }
.metric { border-radius:20px; padding:14px; background:rgba(255,255,255,0.05); }
body.light .metric { background:rgba(28,41,68,0.05); }
.metric-name { color:var(--muted); font-size:13px; margin-bottom:8px; }
.metric-value { font-weight:800; font-size:20px; }
.metric-note { margin-top:6px; font-size:12px; color:var(--muted); }
.top-coins { display:grid; gap:10px; }
.coin-row { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; padding:12px 14px; border-radius:20px; background:rgba(255,255,255,0.05); cursor:pointer; }
body.light .coin-row,.headline-item { background:rgba(28,41,68,0.05); }
.coin-row-main { display:flex; align-items:center; gap:10px; min-width:0; }
.coin-row-main img { width:34px; height:34px; border-radius:50%; }
.coin-row-title { font-weight:700; }
.coin-row-sub { color:var(--muted); font-size:12px; }
.score-pill { padding:7px 11px; border-radius:999px; font-weight:800; background:rgba(110,168,255,.14); color:var(--primary); }
.change-pill { font-weight:700; }
.source-pill { padding:8px 12px; border-radius:999px; background:rgba(110,168,255,.16); color:var(--primary); font-weight:700; }
.sentiment-summary { font-size:16px; line-height:1.6; color:var(--text); margin-bottom:12px; }
.headline-list { display:grid; gap:10px; }
.headline-item { padding:14px; border-radius:18px; background:rgba(255,255,255,0.05); }
.headline-title { font-weight:700; margin-bottom:5px; }
.headline-meta,.loading-text { color:var(--muted); font-size:12px; }
@media (max-width:980px){ .dashboard-grid{grid-template-columns:1fr;} .panel-span-2{grid-column:span 1;} }
@media (max-width:640px){ .app-shell{padding:12px;} .topbar,.hero-card,.chart-card,.score-card,.metrics-card,.strong-card,.sentiment-card{border-radius:22px;} .search-row{grid-template-columns:1fr;} #chartContainer{height:320px;} .score-ring-wrap,.score-ring{width:180px;height:180px;} }
