/* ─── Dark Theme (default) ─── */
:root, [data-theme="dark"] {
  /* Slightly brighter dark theme for low screen brightness */
  --bg: #0b1326;
  --bg-card: #121c33;
  --bg-card-hover: #162147;
  --bg-elevated: #152041;
  --border: #263451;
  --border-hover: #314161;
  --text: #eaf0f7;
  --text-dim: #bcc7d8;
  --text-muted: #94a3b8;
  --accent: #58a6ff;
  --accent-rgb: 88 166 255;
  --accent-glow: rgba(88,166,255,0.15);
  --green: #3fb950;
  --green-dim: rgba(63,185,80,0.15);
  --red: #f85149;
  --red-dim: rgba(248,81,73,0.15);
  --orange: #d29922;
  --orange-dim: rgba(210,153,34,0.15);
  --purple: #14b8a6;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-elev: 0 12px 40px rgba(0,0,0,0.28);
}

/* ─── Light Theme ─── */
[data-theme="light"] {
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --bg-elevated: #f6f8fa;
  --border: #d8dee4;
  --border-hover: #bbc0c7;
  --text: #1f2328;
  --text-dim: #636c76;
  --text-muted: #8b949e;
  --accent: #0969da;
  --accent-rgb: 9 105 218;
  --accent-glow: rgba(9,105,218,0.1);
  --green: #1a7f37;
  --green-dim: rgba(26,127,55,0.1);
  --red: #cf222e;
  --red-dim: rgba(207,34,46,0.1);
  --orange: #9a6700;
  --orange-dim: rgba(154,103,0,0.1);
  --purple: #0f766e;
  --shadow-elev: 0 10px 30px rgba(15,23,42,0.10);
}

/* Light mode header & nav adjustments */
[data-theme="light"] header {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}
[data-theme="light"] nav .nav-link:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] nav .nav-link.active { box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04); }
[data-theme="light"] .logo-icon {
  background: linear-gradient(135deg, rgba(26,127,55,0.08), rgba(9,105,218,0.1), rgba(130,80,223,0.08));
  border-color: rgba(9,105,218,0.18);
  box-shadow: 0 2px 10px rgba(9,105,218,0.1);
}
[data-theme="light"] .logo-ai { color: #8250df; background: rgba(130,80,223,0.1); }
[data-theme="light"] .stock-table tbody tr:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .stock-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.015); }
[data-theme="light"] .stock-sector { background: rgba(0,0,0,0.04); }
[data-theme="light"] .sortable-th:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .row-pos-bg { background: rgba(26,127,55,0.04); }
[data-theme="light"] .row-neg-bg { background: rgba(207,34,46,0.04); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { text-rendering: optimizeLegibility; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(88,166,255,0.16), transparent 62%),
    radial-gradient(820px 560px at 85% -15%, rgba(20,184,166,0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(9,105,218,0.12), transparent 62%),
    radial-gradient(820px 560px at 85% -15%, rgba(15,118,110,0.10), transparent 60%),
    var(--bg);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(800px 540px at 50% 10%, #000 40%, transparent 70%);
}

[data-theme="light"] body::before {
  opacity: 0.05;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
}

@supports not (mask-image: radial-gradient(#000, transparent)) {
  body::before { mask-image: none; }
}

a {
  color: inherit;
  text-decoration-color: rgba(88,166,255,0.45);
  text-underline-offset: 2px;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.65);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ═══════════════════════════════════
   LIVE TICKER BAR
   ═══════════════════════════════════ */
.ticker-bar {
  background: linear-gradient(90deg, var(--bg-card), var(--bg-elevated), var(--bg-card));
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-content {
  display: inline-flex;
  gap: 48px;
  animation: ticker-scroll 30s linear infinite;
  padding: 0 24px;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.ticker-item .name { color: var(--text-dim); font-size: 13px; }
.ticker-item .val { color: var(--text); font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 14px; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════
   HEADER
   ═══════════════════════════════════ */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
}
@supports (background: color-mix(in srgb, #000 50%, transparent)) {
  header { background: color-mix(in srgb, var(--bg-card) 82%, transparent); }
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.logo:hover { opacity: 0.92; transform: translateY(-1px); }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, rgba(63,185,80,0.12), rgba(88,166,255,0.15), rgba(163,113,247,0.12));
  border: 1px solid rgba(88,166,255,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(88,166,255,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(88,166,255,0.08));
}
.logo:hover .logo-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(88,166,255,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
  border-color: rgba(88,166,255,0.35);
}
.logo-icon svg { display: block; position: relative; z-index: 1; }
.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.15;
  display: flex;
  align-items: baseline;
}
.logo-trade { color: var(--text); }
.logo-guru { color: var(--accent); }
.logo-ai {
  font-size: 11px;
  font-weight: 700;
  color: #a371f7;
  background: rgba(163,113,247,0.12);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 3px;
  letter-spacing: 0.5px;
  line-height: 1.4;
  vertical-align: middle;
}
.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Header right area */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Pulse dot (used in ticker) */
.live-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
  margin-right: 6px;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63,185,80,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(63,185,80,0); }
}

/* Navigation pill bar */
nav {
  display: flex;
  gap: 2px;
  max-width: min(580px, 60vw);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
@supports (background: color-mix(in srgb, #000 50%, transparent)) {
  nav { background: color-mix(in srgb, var(--bg-elevated) 86%, transparent); }
}
nav::-webkit-scrollbar { display: none; }
nav .nav-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.18s ease;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
nav .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
nav .nav-link.active {
  color: var(--text);
  background: var(--bg-card);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04);
}
@supports (background: color-mix(in srgb, #000 50%, transparent)) {
  nav .nav-link.active { background: color-mix(in srgb, var(--bg-card) 82%, transparent); }
}
nav .nav-link.active::after { content: none; }

/* ═══════════════════════════════════
   MAIN
   ═══════════════════════════════════ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  min-height: calc(100vh - 120px);
}

.tab-page {
  animation: fadeUp 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { margin: 0; }
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: -2px;
  margin-bottom: 16px;
}
.caption {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.caption.small { font-size: 11px; }
.meta {
  font-size: 12px;
  color: var(--text-dim);
}
.mt-16 { margin-top: 16px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}
.page-head > div:first-child { min-width: min(520px, 100%); }
.page-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.th-rank { width: 40px; }
.th-action { text-align: right; }

/* ═══════════════════════════════════
   INDEX HERO CARDS
   ═══════════════════════════════════ */
.index-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.index-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
.index-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.index-card.up::before { background: linear-gradient(90deg, var(--green), transparent); }
.index-card.down::before { background: linear-gradient(90deg, var(--red), transparent); }
.index-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}
.index-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 16px 40px rgba(0,0,0,0.28);
}
@supports (background: color-mix(in srgb, #000 50%, #fff)) {
  .index-card:hover { border-color: color-mix(in srgb, var(--border-hover) 70%, var(--accent)); }
  .index-card.selected { border-color: var(--accent); }
}
.index-card .label { font-size: 12px; color: var(--text-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.index-card .price {
  font-size: 26px; font-weight: 700; color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  margin: 4px 0;
}
.index-card .chg { font-size: 14px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.index-card .meta { display: flex; gap: 16px; margin-top: 10px; font-size: 11px; color: var(--text-dim); }
.index-card .perf-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.index-card .perf-tag {
  font-size: 10px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; font-family: 'JetBrains Mono', monospace;
}
.index-card .signal-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* ═══════════════════════════════════
   CHART
   ═══════════════════════════════════ */
.chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.chart-wrap canvas { max-height: 280px; }
.tv-chart-wrap { padding-bottom: 0; }
.tv-chart-container { width: 100%; height: 320px; min-height: 240px; }
.tv-chart-container.volume { height: 160px; min-height: 120px; }
.chart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.chart-empty p { font-size: 13px; margin-top: 8px; }
.chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.chart-header h3 { font-size: 14px; font-weight: 600; }

/* ═══════════════════════════════════
   STOCK TABLE
   ═══════════════════════════════════ */
.stock-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}
.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.stock-table thead th {
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stock-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.stock-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.stock-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.01); }
.stock-table tbody tr:last-child { border-bottom: none; }
.stock-table td {
  padding: 12px 16px;
  vertical-align: middle;
}
.stock-table .stock-name {
  font-weight: 600; color: var(--text); font-size: 14px;
}
.stock-table .stock-sym {
  font-size: 12px; color: var(--accent); font-family: 'JetBrains Mono', monospace;
}
.stock-table .stock-sector {
  font-size: 11px; color: var(--text-muted); background: rgba(255,255,255,0.04);
  padding: 3px 8px; border-radius: 4px; display: inline-block;
}
.stock-table .mono {
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
}
.table-scroll { max-height: 520px; overflow-y: auto; }
.table-scroll.tall { max-height: 600px; }

.td-r { text-align: right; }
.td-muted { color: var(--text-muted); font-size: 11px; }
.td-strong { font-weight: 600; color: var(--text); }
.td-bold { font-weight: 700; }
.th-rank-sm { width: 36px; }
.row-pos-bg { background: rgba(63,185,80,0.04); }
.row-neg-bg { background: rgba(248,81,73,0.04); }

/* Sortable table headers */
.sortable-th { cursor: pointer; user-select: none; transition: background 0.15s; }
.sortable-th:hover { background: rgba(255,255,255,0.06); }
.sort-arrow { font-size: 9px; margin-left: 3px; opacity: 0.5; }
.sortable-th:hover .sort-arrow { opacity: 1; }

/* ═══════════════════════════════════
   STOCKS SPLIT LAYOUT (Terminal style)
   ═══════════════════════════════════ */
.stocks-split-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 16px;
}
.stocks-list-pane {
  flex: 1;
  min-width: 0;
}
.stocks-chart-pane {
  width: 480px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 80px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.stock-row.selected td {
  background: var(--accent-glow) !important;
}
.stock-row.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
@media (max-width: 1024px) {
  .stocks-split-layout { flex-direction: column; }
  .stocks-chart-pane { width: 100%; position: static; order: -1; margin-bottom: 20px; }
}

/* ═══════════════════════════════════
   SUB-TABS (Nifty / Sensex toggle)
   ═══════════════════════════════════ */
.sub-tabs {
  display: inline-flex;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}
.sub-tabs button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.sub-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(88,166,255,0.3);
}

/* ═══════════════════════════════════
   BADGES
   ═══════════════════════════════════ */
.badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-strongbuy, .badge-buy { background: var(--green-dim); color: var(--green); }
.badge-strongsell, .badge-sell { background: var(--red-dim); color: var(--red); }
.badge-hold { background: var(--orange-dim); color: var(--orange); }
.badge-nodata { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.sev-badge {
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.sev-HIGH { background: var(--red-dim); color: var(--red); }
.sev-MEDIUM { background: var(--orange-dim); color: var(--orange); }
.sev-LOW { background: var(--green-dim); color: var(--green); }
.sev-OPPORTUNITY { background: rgba(88,166,255,0.15); color: var(--accent); }
.sev-INFO { background: rgba(255,255,255,0.05); color: var(--text-dim); }

.pos { color: var(--green); }
.neg { color: var(--red); }
.dim { color: var(--text-dim); }
.neutral { color: var(--orange); }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sentiment-summary {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════
   PREDICTION SECTION
   ═══════════════════════════════════ */
.predict-hero {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;
}
.predict-verdict-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 240px;
  text-align: center;
  display: flex; flex-direction: column; justify-content: center;
}
.predict-verdict-card .verdict-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.predict-verdict-card .verdict-signal { font-size: 28px; font-weight: 800; margin: 8px 0; }
.predict-verdict-card .verdict-conf { font-size: 13px; color: var(--text-dim); }
.predict-verdict-card .verdict-alignment { font-size: 12px; margin-top: 10px; color: var(--text-dim); line-height: 1.5; }

.tf-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: all var(--transition);
}
.tf-card:hover { border-color: var(--border-hover); }
.tf-card .tf-label { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; margin-bottom: 6px; }
.tf-card .tf-signal { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.tf-card .tf-conf { font-size: 11px; color: var(--text-dim); }
.tf-card .tf-detail { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-family: 'JetBrains Mono', monospace; }

.predict-reasons {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
.predict-reasons h4 { font-size: 13px; margin-bottom: 10px; color: var(--text-dim); }
.predict-reasons .tf-reasons-group { margin-bottom: 12px; }
.predict-reasons .tf-reasons-group .tf-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.predict-reasons .reason-line {
  font-size: 12px; color: var(--text-dim); padding: 3px 0;
  padding-left: 12px; border-left: 2px solid var(--border);
  margin-bottom: 2px;
}

/* ═══════════════════════════════════
   SCAN BUTTONS & RESULTS
   ═══════════════════════════════════ */
.scan-hero {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.scan-hero p { color: var(--text-dim); margin-bottom: 20px; font-size: 14px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border: none; color: #fff; padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(88,166,255,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(88,166,255,0.3); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary.sm { padding: 7px 14px; font-size: 12px; }
.btn-secondary {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-dim); padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

.scan-stats {
  display: flex; align-items: center; gap: 20px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 16px;
  font-size: 13px; flex-wrap: wrap;
}
.scan-stats strong { color: var(--accent); }

/* ═══════════════════════════════════
   PREDICTION CARDS (scan results)
   ═══════════════════════════════════ */
.predict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.predict-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.predict-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.predict-card .pc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.predict-card .pc-name { font-weight: 600; color: var(--text); font-size: 14px; }
.predict-card .pc-sym { font-size: 11px; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.predict-card .pc-sector { font-size: 10px; color: var(--text-muted); }
.predict-card .pc-tf-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin: 10px 0;
}
.predict-card .pc-tf {
  text-align: center; padding: 6px 4px;
  background: rgba(255,255,255,0.02); border-radius: 6px;
  font-size: 10px;
}
.predict-card .pc-tf .pc-tf-label { color: var(--text-muted); font-weight: 600; }
.predict-card .pc-tf .pc-tf-signal { font-weight: 700; font-size: 11px; margin-top: 2px; }
.predict-card .pc-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11px;
}
.predict-card .pc-bottom .conf { color: var(--text-dim); }

/* ═══════════════════════════════════
   STOCK DETAIL (analyze)
   ═══════════════════════════════════ */
.stock-selector {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.stock-selector select {
  flex: 1; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  font-size: 13px; font-family: inherit;
  transition: border-color var(--transition);
}
.stock-selector select:focus { outline: none; border-color: var(--accent); }

.ind-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.ind-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.ind-card label { display: block; font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.ind-card .big { display: block; font-size: 18px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; }

.detail-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.detail-panel h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.detail-grid div {
  display: flex; justify-content: space-between;
  padding: 6px 10px; background: rgba(255,255,255,0.02);
  border-radius: 6px; font-size: 12px;
}
.detail-grid label { color: var(--text-dim); }
.detail-grid span { color: var(--text); font-weight: 500; font-family: 'JetBrains Mono', monospace; }

.reasons-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.reasons-panel h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.reason {
  padding: 6px 10px; margin-bottom: 4px;
  background: var(--accent-glow); border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0; font-size: 12px;
}

/* ═══════════════════════════════════
   SENTIMENT
   ═══════════════════════════════════ */
.sentiment-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}
.sentiment-card.bullish { border-left: 3px solid var(--green); }
.sentiment-card.bearish { border-left: 3px solid var(--red); }
.sentiment-card.neutral { border-left: 3px solid var(--orange); }
.sentiment-card h3 { font-size: 16px; margin-bottom: 6px; }
.sentiment-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; font-weight: 600; }

.news-list { display: grid; gap: 6px; margin-top: 14px; }
.news-item {
  display: block;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  transition: background var(--transition);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.news-item:hover { background: var(--bg-card-hover); }

/* Prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.news-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; margin-right: 8px;
}
.news-item .dot.POSITIVE { background: var(--green); }
.news-item .dot.NEGATIVE { background: var(--red); }
.news-item .dot.NEUTRAL { background: var(--orange); }
.news-item strong { font-size: 12px; color: var(--text); }
.news-item p { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.news-item .src { font-size: 10px; color: var(--text-muted); margin-top: 3px; display: block; }

/* ═══════════════════════════════════
   PROBLEMS
   ═══════════════════════════════════ */
.problem-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 10px;
  transition: all var(--transition);
}
.problem-card:hover { border-color: var(--border-hover); }
.problem-card .head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.problem-card .cat { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.problem-card h3 { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.problem-card .desc { color: var(--text-dim); font-size: 13px; margin-bottom: 10px; }
.problem-card .detail {
  font-size: 12px; color: var(--text-dim);
  padding: 6px 10px; background: rgba(255,255,255,0.02);
  border-radius: 6px; margin-bottom: 4px;
}
.problem-card .detail strong { color: var(--text); }

/* ═══════════════════════════════════
   LOADING / ERROR / EMPTY
   ═══════════════════════════════════ */
.loading { text-align: center; padding: 40px; }
.spinner {
  width: 32px; height: 32px;
  border: 2.5px solid var(--border);
  border-top: 2.5px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.loading p { color: var(--text-dim); font-size: 13px; }

.error {
  background: var(--red-dim); border: 1px solid rgba(248,81,73,0.2);
  color: var(--red); padding: 14px; border-radius: var(--radius-sm);
  text-align: center; font-size: 13px;
}
.empty {
  text-align: center; padding: 40px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.empty h3 { color: var(--orange); font-size: 15px; margin-bottom: 6px; }
.empty p { color: var(--text-dim); font-size: 13px; }

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
footer {
  text-align: center; padding: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
}

.legal-updated {
  margin-top: 8px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════
   OPTIONS TAB
   ═══════════════════════════════════ */
.opt-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.opt-status.open { border-left: 3px solid var(--green); }
.opt-status.closed { border-left: 3px solid var(--red); }

.opt-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.opt-summary-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  position: relative;
}
.opt-summary-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(88,166,255,0.15); }
.opt-summary-card:active { transform: translateY(0); }
.opt-sum-label { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.opt-sum-price { font-size: 22px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; margin: 4px 0; }

.opt-verdict {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 0;
}
.opt-verdict-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.opt-verdict-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}
.opt-level-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 13px;
}

.opt-risk-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.opt-risk-tag.moderate { background: var(--orange-dim); color: var(--orange); }
.opt-risk-tag.higher { background: var(--red-dim); color: var(--red); }
.opt-risk-tag.lower { background: var(--green-dim); color: var(--green); }
.opt-risk-tag.defined { background: var(--accent-glow); color: var(--accent); }

/* Strike Chain Table */
.strike-info-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.strike-table tbody tr { transition: background var(--transition); }
.strike-table tbody tr:hover { background: rgba(88,166,255,0.04) !important; }
.strike-atm-row {
  background: var(--accent-glow) !important;
  border-left: 3px solid var(--accent);
}
.strike-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.strike-tag.otm { background: var(--orange-dim); color: var(--orange); }
.strike-tag.itm { background: var(--green-dim); color: var(--green); }
.strike-tag.atm { background: var(--accent-glow); color: var(--accent); }
.strike-tag.atm-highlight {
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
}
.sector-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.sector-chip {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  transition: all var(--transition);
}
.sector-chip:hover { border-color: var(--border-hover); }

.strike-best-row {
  background: var(--green-dim) !important;
  border-left: 3px solid var(--green);
}
.opt-summary-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 4px 20px rgba(88,166,255,0.2);
  background: var(--bg-card-hover);
}
.opt-summary-card.selected::after {
  content: '▼';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.market-closed-hero {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.market-closed-hero .closed-icon { font-size: 48px; margin-bottom: 12px; }
.market-closed-hero h2 { font-size: 22px; color: var(--red); margin-bottom: 6px; }
.market-closed-hero > p { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.closed-details {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  background: var(--bg-elevated);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  min-width: 280px;
  margin-bottom: 16px;
}
.closed-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}
.closed-note {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .opt-summary-grid { grid-template-columns: 1fr; }
  .opt-verdict-inner { flex-direction: column; }
}

/* ═══════════════════════════════════
   MARKET STATUS
   ═══════════════════════════════════ */
.market-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
.market-status .status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.market-status .status-dot.green {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.market-status .status-dot.red {
  background: var(--red);
  box-shadow: 0 0 6px rgba(248,81,73,0.3);
}
.market-status .status-dot.orange {
  background: var(--orange);
  box-shadow: 0 0 6px rgba(210,153,34,0.3);
  animation: pulse-dot 2s ease-in-out infinite;
}
.market-status .status-label { color: var(--text); font-weight: 600; }
.market-status .status-label.green { color: var(--green); }
.market-status .status-label.red { color: var(--red); }
.market-status .status-label.orange { color: var(--orange); }
.market-status .status-detail { color: var(--text-muted); font-size: 11px; }
.market-status .status-time {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.market-status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  flex-wrap: wrap;
}
.market-status-banner.open { background: rgba(63,185,80,0.06); }
.market-status-banner.closed { background: rgba(248,81,73,0.04); }
.market-status-banner.pre-open,
.market-status-banner.post-close,
.market-status-banner.holiday { background: rgba(210,153,34,0.04); }

/* ═══════════════════════════════════
   THEME TOGGLE & LAST UPDATED
   ═══════════════════════════════════ */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  color: var(--text);
  position: relative;
}
.theme-toggle:hover { border-color: var(--accent); transform: scale(1.1); background: var(--bg-card-hover); }
[data-theme="light"] .theme-toggle { background: #f3f4f6; border-color: #d1d5da; color: #111827; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
[data-theme="light"] .theme-toggle:hover { border-color: var(--accent); background: #e5e7eb; }
[data-theme="light"] .theme-toggle .theme-icon { color: #111827; }

.theme-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  line-height: 0;
}

.legal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }

.last-updated {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.data-source-tag {
  font-size: 9px;
  color: var(--green);
  background: var(--green-dim);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════
   LEGAL / DISCLAIMER PAGE
   ═══════════════════════════════════ */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
}
.legal-hero {
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 24px;
}
.legal-hero h2 { font-size: 22px; margin-top: 8px; color: var(--text); }
.legal-hero p { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.legal-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.legal-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal-section p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 8px;
}
.legal-section ul {
  list-style: none;
  padding: 0;
}
.legal-section ul li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  padding: 6px 0 6px 16px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.legal-section ul li:last-child { border-bottom: none; }
.legal-section ul li strong { color: var(--text); }

.legal-highlight {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-highlight.warning {
  background: var(--orange-dim);
  border-left: 4px solid var(--orange);
  color: var(--text);
}
.legal-highlight.danger {
  background: var(--red-dim);
  border-left: 4px solid var(--red);
  color: var(--text);
}
.legal-highlight strong { display: block; margin-bottom: 6px; }

.legal-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════
   AD SLOTS
   ═══════════════════════════════════ */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.ad-banner {
  padding: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  min-height: 90px;
}
.ad-inline {
  margin: 16px 0;
  min-height: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
  width: 100%;
  color: var(--text-muted);
  font-size: 12px;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  margin: 8px;
}
.ad-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Hide placeholder when real ad is loaded */
.ad-slot.ad-has-real .ad-placeholder { display: none; }

.hidden { display: none !important; }

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
/* ═══════════════════════════════════
   HAMBURGER MENU (hidden on desktop)
   ═══════════════════════════════════ */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.menu-toggle:hover { border-color: var(--accent); }
.menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { max-height: 320px; }
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 8px 0 12px;
  gap: 2px;
}
.mobile-menu .nav-link {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  margin: 0 8px;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}
.mobile-menu .nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.mobile-menu .nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
[data-theme="light"] .mobile-menu .nav-link:hover { background: rgba(0,0,0,0.04); }

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 900px) {
  .index-hero { grid-template-columns: 1fr; }
  .tf-grid { grid-template-columns: repeat(2, 1fr); }
  .predict-hero { flex-direction: column; }
  .predict-grid { grid-template-columns: 1fr; }
  .predict-card .pc-tf-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* Hide desktop nav, show hamburger */
  nav#nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-menu { display: block; }

  header { padding: 0 16px; }
  .header-inner { height: 54px; }
  .logo h1 { font-size: 16px; }
  .logo-sub { font-size: 9px; }
  .logo-ai { font-size: 10px; padding: 1px 4px; }
  .logo-icon { width: 34px; height: 34px; }

  .ticker-bar { padding: 6px 0; }
  .ticker-item { font-size: 13px; gap: 6px; }

  main { padding: 16px 12px 40px; }
}
@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .logo { gap: 8px; }
  .logo-icon { width: 30px; height: 30px; }
  .logo-icon svg { width: 16px; height: 16px; }
  .logo h1 { font-size: 14px; }
  .logo-ai { font-size: 9px; padding: 0 3px; margin-left: 2px; }
  .logo-sub { display: none; }

  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .tf-grid { grid-template-columns: 1fr; }
}
