/* =====================================================
   SRJahir Tech Stocks — Terminal Noir
   Dark. Electric. Precision.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CSS Variables ===== */
:root {
  --bg-primary:     #05060f;
  --bg-secondary:   #0d0e1a;
  --bg-card:        #111224;
  --bg-card-hover:  #161830;
  --border:         rgba(255,255,255,0.07);
  --border-glow:    rgba(240,165,0,0.3);

  --green:          #00e676;
  --green-dim:      #00c85340;
  --red:            #ff3d57;
  --red-dim:        #ff3d5740;
  --gold:           #f0a500;
  --gold-dim:       #f0a50020;
  --blue:           #4fc3f7;

  --text-primary:   #f0f0f5;
  --text-secondary: #8b8fa8;
  --text-muted:     #555870;

  --font-ui:        'Space Grotesk', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --radius:         12px;
  --radius-sm:      8px;
  --glow-gold:      0 0 20px rgba(240,165,0,0.15);
  --glow-green:     0 0 16px rgba(0,230,118,0.2);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Grid background */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,165,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,165,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

main, nav, header, footer, section, .ticker-wrap {
  position: relative;
  z-index: 1;
}

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

/* ===== NAV ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,6,15,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-brand-text span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: var(--gold-dim);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-search {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-ui);
  outline: none;
  width: 180px;
  transition: all 0.2s ease;
}

.nav-search:focus {
  border-color: var(--gold);
  width: 220px;
  box-shadow: 0 0 0 2px var(--gold-dim);
}

.theme-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Mobile nav */
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-search { width: 140px; }
}

@media (max-width: 480px) {
  .nav-search { display: none; }
}

/* ===== TICKERS ===== */
.ticker-bar {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  height: 34px;
  display: flex;
  align-items: center;
}

.ticker-bar.news-ticker {
  background: linear-gradient(90deg, var(--bg-secondary), #0d0e1a);
  color: var(--text-secondary);
}

.ticker-bar.movers-ticker {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(240,165,0,0.05);
}

.ticker-scroll {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: tickerAnim 80s linear infinite;
}

.ticker-scroll.movers { animation-duration: 90s; }
@keyframes tickerAnim {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.up   { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--text-secondary); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}

.page-header h1 span { color: var(--gold); }

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== MAIN LAYOUT ===== */
.main-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ===== SECTION TITLE ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.section-title .icon {
  width: 28px;
  height: 28px;
  background: var(--gold-dim);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.section-title .badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,230,118,0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: rgba(240,165,0,0.2);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* ===== INDEX CARDS ===== */
.index-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.index-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.index-card:hover::before { opacity: 1; }
.index-card:hover {
  border-color: rgba(240,165,0,0.25);
  box-shadow: var(--glow-gold);
}

.index-card.up::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.index-card.up:hover { border-color: rgba(0,230,118,0.25); box-shadow: var(--glow-green); }
.index-card.down::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }

.index-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}

.index-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -1px;
  margin-bottom: 0.3rem;
}

.index-change {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}

.index-change.up { color: var(--green); }
.index-change.down { color: var(--red); }

.index-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-family: var(--font-mono);
}

/* ===== NEWS CARDS ===== */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-card:hover {
  border-color: rgba(240,165,0,0.2);
  background: var(--bg-card-hover);
}

.news-card a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.2s;
}

.news-card a:hover { color: var(--gold); }

.news-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.news-source {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--gold-dim);
  color: var(--gold);
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== MOVER CARDS ===== */
.mover-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.mover-card.up-card:hover {
  border-color: rgba(0,230,118,0.25);
  background: rgba(0,230,118,0.04);
}

.mover-card.down-card:hover {
  border-color: rgba(255,61,87,0.25);
  background: rgba(255,61,87,0.04);
}

.mover-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.mover-sector {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mover-price {
  text-align: right;
}

.mover-cmp {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mover-change {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 3px;
}

.mover-change.up {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,230,118,0.2);
}

.mover-change.down {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,61,87,0.2);
}

/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(240,165,0,0.06);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(240,165,0,0.04);
}

.data-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.data-table .mono {
  font-family: var(--font-mono);
}

/* ===== PICKS CARDS ===== */
.pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: all 0.25s ease;
  position: relative;
}

.pick-card::after {
  content: 'PICK';
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(240,165,0,0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.pick-card:hover {
  border-color: rgba(240,165,0,0.3);
  box-shadow: var(--glow-gold);
}

.pick-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.pick-reason {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.pick-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pick-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pick-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pick-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ===== SECTION WRAPPER ===== */
.section-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

/* ===== VIEW ALL BUTTON ===== */
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  padding: 7px 16px;
  background: var(--gold-dim);
  border: 1px solid rgba(240,165,0,0.25);
  color: var(--gold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  float: right;
}

.view-all:hover {
  background: rgba(240,165,0,0.15);
  transform: translateX(3px);
}

.clearfix::after { content: ''; display: table; clear: both; }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border);
  width: fit-content;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--gold);
  color: #000;
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ===== MARKET STATUS ===== */
.market-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.market-status.open {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,230,118,0.2);
}

.market-status.closed {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,61,87,0.2);
}

.market-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ===== HERO (Home) ===== */
.hero-strip {
  background: linear-gradient(135deg, #0d0e1a 0%, #05060f 60%, #0a0c16 100%);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-strip::before {
  content: 'STOCKS';
  position: absolute;
  font-size: 12rem;
  font-weight: 900;
  color: rgba(240,165,0,0.025);
  letter-spacing: -10px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.hero-strip h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 0.5rem;
  position: relative;
}

.hero-strip h1 .accent { color: var(--gold); }

.hero-strip p {
  color: var(--text-secondary);
  font-size: 1rem;
  position: relative;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ===== SEARCH ===== */
.stock-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.stock-search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 44px 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-ui);
  outline: none;
  transition: all 0.2s ease;
}

.stock-search-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.stock-search-wrap input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
}

#suggestions li {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.88rem;
  list-style: none;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

#suggestions li:hover {
  background: var(--gold-dim);
  color: var(--gold);
}

/* ===== CHART CONTAINER ===== */
#stockChart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
  min-height: 300px;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.5rem;
  justify-content: center;
}

.pagination button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-ui);
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-name span { color: var(--gold); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0.8rem auto 0;
  line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.about-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.about-logo:hover { transform: scale(1.05); }

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,230,118,0.2); }
.badge-red   { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(255,61,87,0.2); }
.badge-gold  { background: var(--gold-dim);  color: var(--gold);  border: 1px solid rgba(240,165,0,0.2); }
.badge-blue  { background: rgba(79,195,247,0.1); color: var(--blue); border: 1px solid rgba(79,195,247,0.2); }

/* ===== HIDDEN ===== */
.hidden { display: none !important; }
.searchable {}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-wrap { padding: 1rem; }
  .hero-strip { padding: 1.5rem 1rem; }
  .section-block { padding: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .tabs { width: 100%; overflow-x: auto; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 8px 10px; }
}

/* ===== FIX: Collapse empty AdSense + reduce section gaps ===== */
.ad-slot {
  min-height: 0 !important;
  transition: min-height 0.3s;
}
.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
/* Reduce section spacing */
.section-block {
  margin-bottom: 1rem;
}
.main-wrap {
  padding-top: 1rem;
}
/* Compact ad containers */
.ad-wrap {
  min-height: 0;
  overflow: hidden;
}
.ad-wrap:empty { display: none; }

/* ===== Auto-collapse empty AdSense slots (CSS only - no JS needed) ===== */
.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
ins.adsbygoogle:not([data-ad-status]) {
  /* Before AdSense loads - reserve minimal space */
  min-height: 0 !important;
}

/* ===== Search Suggestions Enhanced ===== */
#suggestions {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}
#suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#suggestions li.active,
#suggestions li:hover {
  background: var(--gold-dim) !important;
}
#suggestions li.active span:first-child {
  color: var(--gold) !important;
}

/* ===== Index Cards with TradingView Single Quote ===== */
.index-card .tradingview-widget-container {
  min-height: 60px;
}
.index-card .tradingview-widget-container__widget {
  min-height: 55px;
}
/* Make index card larger to fit widget */
#indicesGrid .index-card {
  min-height: 110px;
}
