/* INVESTORS.CARDS — Bloomberg Terminal Dark Theme */

/* ─── Loading bar ─── */
.loading-bar {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  background-size: 200% 100%;
  width: 0; opacity: 0;
  transition: none;
  pointer-events: none;
}
.loading-bar.active {
  opacity: 1;
  animation: loadingProgress 8s ease-out forwards, loadingShimmer 1.5s linear infinite;
}
.loading-bar.done {
  width: 100% !important; opacity: 0;
  transition: opacity 0.3s ease;
}
@keyframes loadingProgress {
  0% { width: 0; } 15% { width: 40%; } 50% { width: 70%; } 80% { width: 85%; } 100% { width: 95%; }
}
@keyframes loadingShimmer {
  0% { background-position: 200% 0; } 100% { background-position: -200% 0; }
}
@keyframes scanPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.6; } }
.scan-icon { animation: scanPulse 2s ease-in-out infinite; }

:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --bg-panel: #0d1321;
  --bg-input: #1a2236;
  --border: #1e293b;
  --border-light: #2a3a52;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #94a3b8;
  --text-muted: #556170;
  --text-disabled: #3d4a57;
  --accent: #22d3ee;
  --green: #10b981;
  --green-dim: rgba(16,185,129,0.15);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.15);
  --gold: #f59e0b;
  --gold-dim: rgba(245,158,11,0.12);
  --purple: #a78bfa;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-body);
  min-height: 100vh; overflow-x: hidden; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.green { color: var(--green); }
.gold { color: var(--gold); }

/* ═══ SVG Lock Icon ═══ */
.icon-lock { display: inline-block; width: 12px; height: 12px; vertical-align: middle; opacity: 0.6; }
.icon-lock svg { width: 100%; height: 100%; }
.lock-svg { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* TICKER */
.ticker-wrap { background: #060a12; border-bottom: 1px solid var(--border); overflow: hidden; height: 32px; }
.ticker-track { display: flex; gap: 40px; white-space: nowrap; padding-top: 7px; animation: tickerScroll var(--ticker-duration, 30s) linear infinite; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; font-family: var(--font-mono); flex-shrink: 0; }
.ticker-code { font-weight: 700; }
.ticker-name { color: var(--text-dim); }
.ticker-price { color: var(--text); }
.ticker-change { font-weight: 600; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* TERMINAL HEADER BAR */
.terminal-header { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: linear-gradient(90deg, rgba(34,211,238,0.08), rgba(250,204,21,0.08)); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.terminal-header-text { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.3px; }
.terminal-header-cta { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-orange); border: 1px solid var(--accent-orange); padding: 3px 12px; border-radius: 4px; text-decoration: none; transition: background 0.2s; }
.terminal-header-cta:hover { background: rgba(249,115,22,0.12); }
.terminal-header-dismiss { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
.terminal-header-dismiss:hover { color: var(--text); }

/* NAV */
.top-nav { background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; align-items: center; height: 52px; gap: 16px; position: sticky; top: 0; z-index: 100; overflow: visible; }
.logo { font-size: 18px; font-weight: 900; font-family: var(--font-mono); letter-spacing: -1px; color: var(--gold); flex-shrink: 0; margin-right: 8px; }
.logo span { color: var(--text-muted); font-weight: 400; }
.nav-links { display: flex; gap: 20px; flex: 1 1 0; min-width: 0; overflow: hidden; }
.nav-links a { color: var(--text-dim); font-size: 13px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-coming-soon { color: var(--text-muted) !important; font-size: 11px !important; opacity: 0.6; }
.nav-coming-soon:hover { opacity: 0.9; }
.nav-search-wrap { position: relative; flex-shrink: 0; }
.nav-search { background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; padding: 6px 12px; color: var(--text); font-size: 12px; font-family: var(--font-mono); max-width: 180px; width: 180px; outline: none; transition: border-color 0.2s, width 0.2s; }
.nav-search:focus { border-color: var(--accent); width: 240px; max-width: 240px; }
.nav-search::placeholder { color: var(--text-muted); }

/* ─── LIVE indicator ─── */
.live-indicator { display: flex; align-items: center; gap: 8px; margin-left: 4px; flex-shrink: 0; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; animation: livePulse 2s ease infinite; }
.live-time { font-size: 12px; font-family: var(--font-mono); font-weight: 700; color: #94a3b8; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Data Status Banner */
.data-status-banner { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: rgba(245,158,11,0.08); border-bottom: 1px solid rgba(245,158,11,0.2); color: var(--gold); font-size: 12px; }
.data-status-banner .icon-info { flex-shrink: 0; }

/* Search Dropdown */
.search-dropdown { display: none; position: fixed; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; min-width: 320px; max-width: 400px; max-height: 400px; overflow-y: auto; z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.search-dropdown.open, .search-dropdown.active { display: block; }
.search-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.search-item:hover { background: var(--bg-card-hover); }
.search-item:last-child { border-bottom: none; }
.search-item-left { min-width: 0; flex: 1; }
.search-item-name { font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item-set { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.search-item-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 3px; margin-top: 2px; font-family: var(--font-mono); }
.search-item-price { font-weight: 600; color: var(--text); flex-shrink: 0; margin-left: 12px; }

/* User pill */
.user-pill { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; flex-shrink: 0; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.user-avatar-placeholder { background: linear-gradient(135deg, var(--accent), var(--purple)); width: 28px; height: 28px; border-radius: 50%; }
.user-name { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.user-dropdown { display: none; position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 6px 0; min-width: 140px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 200; }
.user-dropdown.open, .user-dropdown.active { display: block; }
.user-dropdown a { display: block; padding: 8px 14px; font-size: 12px; color: var(--text-dim); transition: all 0.15s; }
.user-dropdown a:hover { color: var(--text); background: var(--bg-card-hover); }
.login-btn { background: linear-gradient(135deg, var(--accent), #06b6d4); color: #000; border: none; border-radius: 6px; padding: 6px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-mono); flex-shrink: 0; }

/* ═══ MOBILE BOTTOM TAB BAR ═══ */
.mobile-tab-bar { display: none; }

/* ═══ MOBILE SEARCH OVERLAY ═══ */
.mobile-search-overlay { position: fixed; top: 0; left: 0; right: 0; z-index: 9998; background: var(--bg-panel); padding: 10px 12px; display: none; border-bottom: 1px solid var(--border); }
.mobile-search-overlay.open { display: flex; }
.mobile-search-header { display: flex; gap: 8px; width: 100%; align-items: center; }
.mobile-search-field { flex: 1; background: var(--bg-input); border: 1px solid var(--accent); border-radius: 6px; padding: 10px 14px; color: var(--text); font-size: 16px; font-family: var(--font-mono); outline: none; }
.mobile-search-field::placeholder { color: var(--text-muted); }
.mobile-search-cancel { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px; flex-shrink: 0; }

/* EXCHANGE TABS */
.exchange-tabs-bar { display: flex; gap: 4px; padding: 8px 20px; background: var(--bg-panel); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.exchange-tabs-bar::-webkit-scrollbar { display: none; }
.exchange-chip { padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; font-family: var(--font-mono); color: var(--text-dim); border: 1px solid transparent; cursor: pointer; white-space: nowrap; letter-spacing: 0.3px; transition: all 0.2s; }
.exchange-chip:hover { color: var(--text); background: var(--bg-card-hover); }
.soon-badge { font-size: 8px; font-weight: 700; letter-spacing: 0.5px; background: rgba(249, 115, 22, 0.2); color: #f97316; padding: 1px 5px; border-radius: 3px; margin-left: 4px; vertical-align: middle; line-height: 1; }
.coming-soon-chip { opacity: 0.7; }
.coming-soon-chip:hover { opacity: 1; }

/* Weekly Edge Signup */
.weekly-edge-bar { background: linear-gradient(90deg, rgba(34,211,238,0.06), rgba(250,204,21,0.06)); border-bottom: 1px solid var(--border); padding: 10px 20px; }
.weekly-edge-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.weekly-edge-text { font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); }
.weekly-edge-icon { font-size: 14px; margin-right: 4px; }
.weekly-edge-text strong { color: var(--gold); }
.weekly-edge-form { display: flex; gap: 8px; }
.weekly-edge-input { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-family: var(--font-mono); padding: 6px 12px; border-radius: 4px; width: 220px; }
.weekly-edge-input:focus { outline: none; border-color: var(--accent); }
.weekly-edge-btn { background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 700; font-family: var(--font-mono); padding: 6px 16px; border: none; border-radius: 4px; cursor: pointer; transition: opacity 0.2s; }
.weekly-edge-btn:hover { opacity: 0.85; }
.weekly-edge-btn:disabled { opacity: 0.5; cursor: default; }
.weekly-edge-bar { position: relative; }
.weekly-edge-close { position: absolute; top: 8px; right: 8px; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 2px 6px; line-height: 1; z-index: 1; }
.weekly-edge-close:hover { color: var(--text); }

/* Set Filter */
.set-filter-bar { padding: 6px 16px; display: flex; align-items: center; gap: 10px; background: var(--bg-panel); border-bottom: 1px solid var(--border); }
.set-dropdown { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-family: inherit; min-width: 200px; max-width: 100%; cursor: pointer; }
.set-dropdown:focus { outline: 1px solid var(--accent); border-color: var(--accent); }

/* MAIN */
.main-container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.stat-label { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 1px; margin-bottom: 6px; font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; font-family: var(--font-mono); }
.stat-value-sm { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.info-tip { position: relative; cursor: pointer; opacity: 0.5; font-style: normal; }
.info-tip:hover { opacity: 0.8; }
.tip-text { display: none; position: absolute; background: #1a1a2e; border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; font-size: 11px; color: var(--text-secondary); width: 220px; z-index: 10; font-weight: 400; line-height: 1.4; margin-top: 4px; left: 50%; transform: translateX(-50%); letter-spacing: 0; }
.tip-text.show { display: block; }
.terminal-loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: #00ff88; font-family: var(--font-mono); font-size: 13px; }
.loader-dot { animation: pulse 1.2s ease-in-out infinite; font-size: 16px; }
@keyframes pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
a.stat-link { text-decoration: none; color: inherit; display: block; cursor: pointer; }
a.stat-link:hover .stat-value { text-decoration: underline; }
.stat-card.green-top { border-top: 3px solid var(--green); }
.stat-card.gold-top { border-top: 3px solid var(--gold); }
.stat-card.blue-top { border-top: 3px solid var(--accent); }
.stat-card.red-top { border-top: 3px solid var(--red); }

/* EXCHANGE NAV GRID */
.exchange-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 24px; }
.exchange-nav-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: all 0.2s; border-left: 3px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.exchange-nav-card:hover { background: var(--bg-card-hover); }
.exchange-nav-name { font-size: 14px; font-weight: 700; }
.exchange-nav-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.exchange-nav-hot { text-align: right; }
.exchange-nav-hot-label { font-size: 11px; color: var(--text-dim); }
.exchange-nav-hot-value { font-size: 12px; font-weight: 600; }

/* THREE COLUMN */
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.col-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.col-panel-header { font-size: 11px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 1px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.col-panel-header.green { color: var(--green); }
.col-panel-header.red { color: var(--red); }
.col-panel-header.gold { color: var(--gold); }
.header-sub { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.col-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(30,41,59,0.3); cursor: pointer; transition: background 0.15s; border-radius: 4px; flex-wrap: nowrap; overflow: hidden; gap: 0; }
.col-row:hover { background: var(--bg-card-hover); }
.col-row:last-child { border-bottom: none; }
.col-row-left { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; }
.col-row-top { display: flex; gap: 6px; align-items: center; overflow: hidden; }
.col-card-name { font-size: 12px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; width: 0; min-width: 0; }
.col-row-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-row-right { text-align: right; flex: 0 0 90px; width: 90px; margin-left: 8px; }
.col-price { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.col-change { font-size: 11px; white-space: nowrap; }
.col-rank { font-weight: 800; font-size: 12px; width: 16px; display: inline-block; }

/* BADGE */
.card-badge { display: inline-block; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; font-family: var(--font-mono); white-space: nowrap; border: 1px solid transparent; }
.card-badge-sm { font-size: 9px; padding: 1px 6px; }

/* SCREENER */
.screener-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.screener-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.screener-title { font-size: 12px; font-weight: 700; color: var(--text); }
.screener-controls { display: flex; gap: 8px; align-items: center; }
.filter-select, .filter-search { background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; padding: 5px 10px; font-size: 12px; color: var(--text); outline: none; font-family: var(--font-mono); }
.filter-search { width: 180px; }
.filter-search::placeholder { color: var(--text-muted); }
.filter-select { cursor: pointer; }
.filter-select option { background: var(--bg-card); color: var(--text); }
.price-floor-group { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.price-floor-label { font-size: 9px; font-weight: 700; font-family: var(--font-mono); color: var(--text-muted); padding: 5px 8px; letter-spacing: 0.5px; background: var(--bg-input); border-right: 1px solid var(--border); white-space: nowrap; }
.pf-btn { background: transparent; border: none; border-right: 1px solid var(--border); padding: 5px 9px; font-size: 11px; font-weight: 600; font-family: var(--font-mono); color: var(--text-muted); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.pf-btn:last-child { border-right: none; }
.pf-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.pf-btn.active { background: rgba(34,211,238,0.13); color: var(--accent); }
.screener-table-wrap { overflow-x: auto; }
.screener-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.screener-table thead tr { border-bottom: 1px solid var(--border); }
.screener-table th { padding: 8px 12px; text-align: right; color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.screener-th { cursor: pointer; user-select: none; transition: color 0.15s; }
.screener-th:hover { color: var(--accent); }
.th-left { text-align: left; }
.screener-row { border-bottom: 1px solid rgba(30,41,59,0.15); transition: background 0.15s; cursor: pointer; }
.screener-row:hover { background: var(--bg-card-hover); }
.screener-table td { padding: 8px 12px; text-align: right; white-space: nowrap; }
.td-card { text-align: left; }
.td-card-inner { display: flex; align-items: center; gap: 6px; }
.td-card-name { font-weight: 600; color: var(--text); }
.td-dim { color: var(--text-dim); font-size: 11px; }
.td-muted { color: var(--text-muted); font-size: 11px; }
.td-price { font-weight: 600; color: var(--text); }
.td-buy { display: flex; gap: 6px; justify-content: flex-end; }
.buy-link { color: var(--accent); font-size: 11px; font-family: var(--font-mono); padding: 2px 6px; border-radius: 3px; transition: all 0.15s; }
.buy-link:hover { background: rgba(34,211,238,0.1); }
.btn-sm { background: none; border: 1px solid rgba(34,211,238,0.25); border-radius: 4px; padding: 4px 8px; font-size: 10px; font-weight: 600; color: var(--accent); cursor: pointer; font-family: var(--font-mono); }
.btn-sm:hover { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.4); }
.btn-sm.active { background: rgba(34,211,238,0.13); border-color: rgba(34,211,238,0.35); }
.screener-load-more { display: block; width: 100%; padding: 12px; background: none; border: none; border-top: 1px solid var(--border); color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.screener-load-more:hover { background: var(--bg-card-hover); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 40px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-dim); font-size: 18px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 360px; margin: 0 auto; line-height: 1.6; }

/* LOGIN */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 40px 24px; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 500; cursor: pointer; }
.login-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 36px 32px; width: 100%; max-width: 380px; text-align: center; cursor: default; position: relative; }
.login-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px; }
.login-close:hover { color: var(--text); }
.login-logo { font-family: var(--font-mono); font-weight: 900; font-size: 22px; letter-spacing: -1px; color: var(--gold); margin-bottom: 16px; }
.login-logo span { color: var(--text-muted); font-weight: 400; }
.login-card h1, .login-card h2 { font-size: 20px; margin-bottom: 6px; }
.login-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; margin-bottom: 10px; }
.oauth-google { background: #fff; color: #333; }
.oauth-google:hover { background: #f0f0f0; }
.oauth-discord { background: #5865F2; color: #fff; }
.oauth-discord:hover { background: #4752c4; }
.login-legal { margin-top: 20px; font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.login-legal a { color: var(--accent); }

/* COMING SOON PAGE */
.coming-soon-page { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px; min-height: 50vh; }
.coming-soon-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.8; }
.coming-soon-title { font-family: var(--font-mono); font-size: 32px; font-weight: 700; margin: 0 0 16px; }
.coming-soon-badge-lg { font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: 2px; background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); padding: 8px 24px; border-radius: 6px; margin-bottom: 24px; }
.coming-soon-desc { color: var(--text-dim); font-size: 15px; max-width: 480px; line-height: 1.6; margin: 0 0 32px; }
.coming-soon-back { color: var(--accent); font-family: var(--font-mono); font-size: 13px; opacity: 0.8; transition: opacity 0.2s; }
.coming-soon-back:hover { opacity: 1; }

/* PORTFOLIO */
.page-section { max-width: 1200px; margin: 0 auto; padding: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 22px; font-weight: 700; }
.btn-primary { background: var(--accent); color: #000; border: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font-mono); }
.upgrade-banner { background: linear-gradient(135deg, rgba(34,211,238,0.06), rgba(245,158,11,0.06)); border: 1px solid rgba(245,158,11,0.2); border-radius: 8px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.upgrade-left { flex: 1; min-width: 200px; }
.upgrade-text { font-size: 13px; color: var(--text-dim); }
.upgrade-text strong { color: var(--gold); }
.upgrade-bar { width: 200px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.upgrade-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #d97706); border-radius: 2px; }
.btn-upgrade { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 8px 18px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font-mono); transition: all 0.2s; }
.btn-upgrade:hover { background: var(--gold); color: #000; }
.btn-upgrade:disabled { opacity: 0.5; cursor: not-allowed; background: #333; border-color: #4a5568; }

/* Portfolio holdings */
.holdings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.holdings-title { font-size: 16px; font-weight: 600; color: var(--text); }
.holdings-search { background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; padding: 6px 12px; color: var(--text); font-size: 12px; font-family: var(--font-mono); width: 200px; outline: none; }
.holdings-search::placeholder { color: var(--text-muted); }
.price-table { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.price-table-head { display: grid; grid-template-columns: 1fr 100px 100px 40px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.5px; }
.price-table-row { display: grid; grid-template-columns: 1fr 100px 100px 40px; padding: 10px 16px; border-bottom: 1px solid rgba(30,41,59,0.15); align-items: center; transition: background 0.15s; }
.price-table-row:hover { background: var(--bg-card-hover); }
.price-table-head span, .price-table-row > div { display: flex; align-items: center; }
.col-name { min-width: 0; }
.col-price { justify-content: flex-end; font-weight: 600; color: var(--text); }
.col-change { justify-content: flex-end; font-size: 12px; }
.col-action { justify-content: flex-end; }
.card-info { min-width: 0; }
.card-name { font-weight: 600; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-number { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 1px; }
.remove-btn { background: none; border: none; color: var(--red); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: background 0.15s; line-height: 1; }
.remove-btn:hover { background: var(--red-dim); }

/* LEGAL */
.legal-page { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.legal-page h1 { font-size: 26px; margin-bottom: 24px; }
.legal-page h2 { font-size: 18px; color: var(--gold); margin-top: 28px; margin-bottom: 10px; }
.legal-page p, .legal-page li { color: var(--text-dim); font-size: 14px; line-height: 1.7; margin-bottom: 10px; }
.legal-page a { color: var(--accent); }
.legal-page ul { padding-left: 24px; }
.legal-content { max-width: 700px; }
.legal-updated { color: var(--text-muted); font-size: 12px; font-style: italic; margin-bottom: 20px; }

/* CONTACT / ERROR */
.contact-page { max-width: 500px; margin: 0 auto; padding: 60px 24px; text-align: center; }
.contact-page h1 { font-size: 24px; margin-bottom: 12px; }
.contact-page p { color: var(--text-dim); margin-bottom: 20px; }
.contact-email { color: var(--gold); font-family: var(--font-mono); font-size: 18px; }
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; text-align: center; }
.error-code { font-family: var(--font-mono); font-size: 72px; font-weight: 700; color: var(--red); opacity: 0.5; }
.error-message { color: var(--text-dim); font-size: 16px; margin-top: 8px; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 20px 24px; margin-top: 40px; }
.footer-inner { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; margin-bottom: 16px; }
.footer-logo { font-family: var(--font-mono); font-weight: 800; font-size: 14px; color: var(--gold); }
.footer-logo span { color: var(--text-muted); font-weight: 400; }
.footer-tagline { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.footer-disclaimer { color: var(--text-muted); font-size: 10px; margin-top: 4px; line-height: 1.5; }
.footer-links { display: flex; gap: 40px; }
.footer-col h4 { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); font-size: 12px; margin-bottom: 6px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: 1400px; margin: 0 auto; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; font-size: 10px; color: var(--text-muted); line-height: 1.6; }

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

/* ═══ CARD DETAIL PAGE ═══ */
.card-detail-page { max-width: 900px; margin: 0 auto; padding: 20px; overflow-x: hidden; box-sizing: border-box; }
.card-breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.card-breadcrumb a { color: var(--accent); text-decoration: none; }
.card-breadcrumb a:hover { text-decoration: underline; }
.bc-sep { margin: 0 6px; opacity: 0.4; }

/* Hero: Image + Data side-by-side */
.card-hero { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-bottom: 20px; }
.card-image-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; aspect-ratio: 0.72; position: relative; display: flex; align-items: center; justify-content: center; }
.card-image { width: 100%; height: 100%; object-fit: contain; }
.card-image-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); }
.card-image-icon { font-size: 40px; opacity: 0.3; }
.card-image-label { font-size: 10px; }
.card-data-col { display: flex; flex-direction: column; gap: 12px; }
.card-detail-name { font-size: 24px; font-weight: 700; color: var(--text); margin: 6px 0 4px; }
.card-detail-meta { font-size: 12px; color: var(--text-muted); }

/* Price Block */
.card-price-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; overflow-wrap: break-word; }
.card-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-detail-price { font-size: 32px; font-weight: 700; color: var(--text); }
.card-detail-change { font-size: 16px; font-weight: 600; }
.card-detail-change-sub { font-size: 12px; color: var(--text-dim); }
.change-period { font-size: 10px; color: var(--text-muted); margin-left: 4px; }

/* Quick Stats */
.card-quick-stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.qs-label { font-size: 9px; color: var(--text-muted); letter-spacing: 1px; font-weight: 600; }
.qs-value { font-size: 14px; color: var(--text-dim); font-weight: 600; margin-top: 2px; }
.qs-locked { cursor: pointer; }
.qs-lock-icon { color: rgba(245,158,11,0.5); }

/* Buy Links */
.card-buy-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.card-buy-btn { display: inline-flex; align-items: center; justify-content: center; flex: 1; padding: 10px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; transition: all 0.15s; font-family: var(--font-mono); cursor: pointer; gap: 6px; background: none; border: none; color: inherit; }
.tcg-btn { background: rgba(26,109,255,0.12); border: 1px solid rgba(26,109,255,0.3); color: #5b9aff; }
.tcg-btn:hover { background: rgba(26,109,255,0.2); }
.ebay-btn { background: rgba(228,49,55,0.12); border: 1px solid rgba(228,49,55,0.3); color: #f06b6e; }
.ebay-btn:hover { background: rgba(228,49,55,0.2); }
.portfolio-add-btn { background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); color: #22d3ee; }
.portfolio-add-btn:hover { background: rgba(34,211,238,0.18); }
.portfolio-add-btn.added { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #10b981; pointer-events: none; }
.alert-set-btn { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #f59e0b; }
.alert-set-btn:hover { background: rgba(245,158,11,0.18); }
.watchlist-btn { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.3); color: #8b5cf6; }
.watchlist-btn:hover { background: rgba(139,92,246,0.18); }
.watchlist-btn.watching { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.5); color: #a78bfa; }

/* Price Chart */
.card-chart-panel, .card-variants-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.card-chart-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.card-chart-title { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }
.card-chart-wrap { padding: 16px; height: 280px; }
.chart-range-btns { display: flex; gap: 4px; align-items: center; }
.chart-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }
.card-chart-legend { font-size: 11px; color: var(--text-dim); margin-right: 8px; }
.range-btn { background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 3px 8px; font-size: 10px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.range-btn.selected { background: rgba(34,211,238,0.13); border-color: rgba(34,211,238,0.27); color: var(--accent); }
.range-btn.locked { color: #4a5568; cursor: pointer; }
.range-btn.locked:hover { color: var(--text-muted); }

/* Variants Table */
.variants-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.variants-table th { text-align: left; padding: 10px 16px; font-size: 10px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); }
.variants-table td { padding: 10px 16px; border-bottom: 1px solid rgba(30,41,59,0.1); color: var(--text-dim); }
.variants-table tr:hover td { background: var(--bg-card-hover); }
.variants-table tr.variant-active td { background: rgba(34,211,238,0.06); border-left: 2px solid var(--accent); }
.variants-table tr { cursor: pointer; transition: background 0.15s; }

/* Locked Sections */
.locked-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 32px; text-align: center; margin-bottom: 20px; opacity: 0.7; }
.locked-section .locked-icon-svg { margin-bottom: 8px; }
.locked-section h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.locked-section p { font-size: 13px; color: var(--text-muted); max-width: 500px; margin: 0 auto 16px; }

/* Upgrade Toast */
.upgrade-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: linear-gradient(135deg, var(--gold), #d97706); color: #000; padding: 12px 24px; border-radius: 8px; font-size: 13px; font-weight: 700; z-index: 999; box-shadow: 0 8px 32px rgba(245,158,11,0.3); display: flex; align-items: center; gap: 8px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.upgrade-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* Waitlist form */
.waitlist-form { display: flex; gap: 8px; max-width: 400px; margin: 16px auto 0; }
.waitlist-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; color: var(--text); font-size: 13px; font-family: var(--font-mono); outline: none; }
.waitlist-input::placeholder { color: var(--text-muted); }
.waitlist-input:focus { border-color: var(--gold); }
.waitlist-btn { background: var(--gold); color: #000; border: none; border-radius: 6px; padding: 10px 18px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-mono); white-space: nowrap; }

/* Roadmap page */
.roadmap-page { max-width: 700px; margin: 0 auto; padding: 40px 24px; }
.roadmap-page h1 { font-size: 24px; margin-bottom: 8px; }
.roadmap-intro { color: var(--text-dim); font-size: 14px; margin-bottom: 32px; line-height: 1.6; }
.roadmap-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.roadmap-item-info h3 { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.roadmap-item-info p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.roadmap-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: 0.5px; white-space: nowrap; flex-shrink: 0; }
.roadmap-badge.soon { background: rgba(245,158,11,0.15); color: var(--gold); }
.roadmap-badge.planned { background: rgba(167,139,250,0.15); color: var(--purple); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .top-nav { padding: 0 14px; gap: 8px; height: 44px; justify-content: center; }
  .nav-search-wrap { display: none; }
  .live-time { display: none; }
  .live-indicator { gap: 0; margin-left: 0; position: absolute; right: 14px; }
  .user-pill { display: none; }
  .login-btn { display: none; }
  .logo { font-size: 13px; }
  .main-container { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 18px; }
  .exchange-nav-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .screener-header { flex-direction: column; align-items: flex-start; }
  .screener-controls { width: 100%; flex-wrap: wrap; }
  .price-floor-group { flex: 1 1 100%; }
  .pf-btn { flex: 1; padding: 8px 6px; }
  .filter-search { width: 100%; }
  .screener-table th:nth-child(3), .screener-table td:nth-child(3),
  .screener-table th:nth-child(4), .screener-table td:nth-child(4),
  .screener-table th:nth-child(5), .screener-table td:nth-child(5) { display: none; }
  .screener-table .col-30d { display: none; }
  .premium-screener .screener-table .col-30d { display: table-cell; }
  .search-dropdown { max-height: 70vh; }
  .search-item { padding: 10px 12px; }
  .col-panel { overflow: hidden; }
  .col-row { display: flex; flex-wrap: nowrap; overflow: hidden; gap: 0; }
  .col-row-left { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; }
  .col-row-top { display: flex; gap: 4px; align-items: center; overflow: hidden; }
  .col-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; width: 0; min-width: 0; }
  .col-row-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .col-row-right { flex: 0 0 80px; width: 80px; text-align: right; margin-left: 4px; }
  .col-price { font-size: 12px; }
  .col-change { font-size: 10px; }

  /* Card detail hero - stack on mobile */
  .card-hero { grid-template-columns: 1fr; }
  .card-image-wrap { max-width: 180px; margin: 0 auto; }
  .card-detail-price { font-size: 24px; }
  .card-quick-stats { grid-template-columns: 1fr 1fr; }
  .chart-range-btns { flex-wrap: wrap; }
  .card-detail-page { padding: 12px; }
  .card-detail-name { font-size: 18px; word-break: break-word; }
  .card-detail-meta { word-break: break-word; white-space: normal; }
  .card-variants-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .variants-table { min-width: 360px; }
  .screener-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .screener-table { min-width: 700px; }

  /* Footer */
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 24px; }
  .site-footer { padding-bottom: 80px; }

  /* Mobile bottom tab bar */
  .mobile-tab-bar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
  }
  .tab-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 10px;
    text-decoration: none;
    transition: color 0.15s;
  }
  .tab-item.active { color: var(--accent); }
  .tab-item svg { stroke: currentColor; }

  /* Upgrade toast above tab bar */
  .upgrade-toast { bottom: 72px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .exchange-tabs-bar { padding: 6px 12px; }
  .col-row-right { flex: 0 0 70px; width: 70px; }
  .col-card-name { font-size: 11px; }
  .col-row-meta { font-size: 9px; }
  .col-price { font-size: 11px; }
  .col-change { font-size: 9px; }
  .card-badge-sm { font-size: 7px; padding: 1px 4px; }
  .nav-search-wrap { display: none; }
  .card-buy-bar { flex-direction: column; }
  .card-buy-btn { width: 100%; justify-content: center; }
  /* Card detail 375px clip fix */
  .card-detail-page { padding: 10px; max-width: 100vw; }
  .card-price-block { padding: 12px; }
  .card-detail-price { font-size: 22px; }
  .card-quick-stats { gap: 4px; }
  .qs-value { font-size: 12px; }
  .variants-table { min-width: 280px; }
  .card-chart-panel, .card-variants-panel { border-radius: 6px; }
}

/* Global overflow fix */
html, body { overflow-x: hidden; max-width: 100vw; }
@keyframes spin { to { transform: rotate(360deg); } }
