/* ============================================================
   GoldMine — Main Stylesheet
   Premium Financial Intelligence Platform
   ============================================================ */

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

/* ─── CSS Variables / Design Tokens ─────────────────────── */
:root {
  /* Core brand */
  --gold:        #D4AF37;
  --gold-light:  #F5D96B;
  --gold-dark:   #9A7D1E;
  --silver:      #A8A9AD;
  --silver-light:#D8D9DB;
  --oil:         #E8650A;
  --crypto-neon: #00FFA3;
  --forex-green: #00C896;
  --stock-blue:  #2563EB;

  /* Light mode */
  --bg:          #F8F7F2;
  --bg-card:     #FFFFFF;
  --bg-secondary:#F0EDE4;
  --border:      #E2DDD0;
  --text:        #1A1713;
  --text-muted:  #6B6560;
  --text-accent: #D4AF37;
  --shadow:      0 2px 20px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.12);

  /* Up/down */
  --up:    #16A34A;
  --down:  #DC2626;
  --up-bg: #DCFCE7;
  --dn-bg: #FEE2E2;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --nav-h:    64px;
  --ticker-h: 40px;
  --max-w:    1400px;
  --radius:   12px;
  --radius-sm:6px;

  /* Transitions */
  --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:          #0D0C0A;
  --bg-card:     #161410;
  --bg-secondary:#1E1B16;
  --border:      #2A2620;
  --text:        #F0EDE4;
  --text-muted:  #8A8070;
  --shadow:      0 2px 20px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --up-bg:  rgba(22,163,74,0.15);
  --dn-bg:  rgba(220,38,38,0.15);
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
ul { list-style: none; }

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

/* ─── Live Ticker ────────────────────────────────────────── */
#ticker-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ticker-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  gap: 0;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.ticker-item .t-name { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.ticker-item .t-price { color: var(--text); font-weight: 600; }
.ticker-item .t-change.up   { color: var(--up); }
.ticker-item .t-change.down { color: var(--down); }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Navigation ─────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: var(--ticker-h);
  left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
  backdrop-filter: blur(12px);
  transition: box-shadow var(--t);
}
#navbar.scrolled { box-shadow: var(--shadow-lg); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: rgba(212,175,55,0.08);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Search */
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  width: 200px;
  transition: width var(--t), border-color var(--t);
}
.nav-search:focus-within {
  width: 280px;
  border-color: var(--gold);
}
.nav-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  width: 100%;
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search svg { color: var(--text-muted); flex-shrink: 0; }

/* Theme toggle */
#theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: background var(--t), transform var(--t);
}
#theme-toggle:hover { background: var(--border); transform: rotate(20deg); }

/* Hamburger */
#nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
#nav-toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t);
}

/* ─── Page Offset ────────────────────────────────────────── */
.page-content {
  margin-top: calc(var(--ticker-h) + var(--nav-h));
}

/* ─── Hero Section ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(212,175,55,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(212,175,55,0.04) 0%, transparent 60%);
}
[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(212,175,55,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(212,175,55,0.06) 0%, transparent 60%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-text .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-text .badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.5); }
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-text h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero-text p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 36px;
}
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--t), box-shadow var(--t);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,175,55,0.35);
}
.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--t), background var(--t);
}
.btn-secondary:hover { border-color: var(--gold); background: rgba(212,175,55,0.06); }

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.hero-stat {
  background: var(--bg-card);
  padding: 20px;
  text-align: center;
}
.hero-stat .val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  display: block;
}
.hero-stat .lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Hero chart panel */
.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-panel::before {
  content: '';
  position: absolute;
  top: -1px; left: 30px; right: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  border-radius: 0 0 3px 3px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--up);
  font-weight: 600;
}
.live-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--up);
  animation: pulse 1.5s infinite;
}
.price-display {
  margin-bottom: 16px;
}
.price-display .main-price {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  display: block;
  line-height: 1;
}
.price-display .price-change {
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-display .price-change.up { color: var(--up); }
.price-display .price-change.down { color: var(--down); }

/* Mini chart canvas */
.mini-chart-wrap { height: 120px; position: relative; }

/* ─── Market Cards Grid ──────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-header h2 span { color: var(--gold); }
.section-header a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--t);
}
.section-header a:hover { gap: 8px; }

/* Market card */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}
.market-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--gold));
  transform: scaleX(0);
  transition: transform var(--t);
}
.market-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-accent, var(--gold));
}
.market-card:hover::after { transform: scaleX(1); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.card-badge.up   { background: var(--up-bg); color: var(--up); }
.card-badge.down { background: var(--dn-bg); color: var(--down); }

.card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.card-price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.card-change {
  font-size: 13px;
  font-weight: 500;
}
.card-change.up   { color: var(--up); }
.card-change.down { color: var(--down); }
.card-sparkline {
  height: 50px;
  margin-top: 12px;
}
/* ─── Market Overview Tabs ───────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 24px;
}
.tab-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--t), color var(--t);
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ─── Data Table ─────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }
.data-table .mono { font-family: var(--font-mono); }
.data-table .up   { color: var(--up); font-weight: 600; }
.data-table .down { color: var(--down); font-weight: 600; }

/* ─── News Cards ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card-img {
  height: 160px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img .nc-category {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 4px;
}
.news-card-body { padding: 18px; }
.news-card-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

/* News ticker (breaking) */
.breaking-news {
  background: var(--gold);
  color: #000;
  padding: 10px 0;
  overflow: hidden;
}
.breaking-news-inner {
  display: flex;
  align-items: center;
}
.bn-label {
  background: #000;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  flex-shrink: 0;
  margin-right: 16px;
}
.bn-scroll {
  overflow: hidden;
  flex: 1;
}
.bn-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  font-size: 13px;
  font-weight: 500;
}

/* ─── Gainers / Losers ───────────────────────────────────── */
.gl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.gl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gl-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gl-header.up-h   { color: var(--up);   }
.gl-header.down-h { color: var(--down); }
.gl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.gl-row:last-child { border-bottom: none; }
.gl-row:hover { background: var(--bg-secondary); }
.gl-name { font-size: 13px; font-weight: 600; }
.gl-sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.gl-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
}
.gl-change.up   { background: var(--up-bg);  color: var(--up); }
.gl-change.down { background: var(--dn-bg); color: var(--down); }

/* ─── Heatmap ────────────────────────────────────────────── */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 3px;
}
.hm-cell {
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--t), filter var(--t);
}
.hm-cell:hover { transform: scale(1.05); filter: brightness(1.1); }
.hm-cell .hm-name  { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.hm-cell .hm-chg   { font-size: 13px; font-weight: 700; }
.hm-cell.big-up    { background: #166534; color: #fff; }
.hm-cell.up        { background: #16a34a; color: #fff; }
.hm-cell.small-up  { background: #4ade80; color: #166534; }
.hm-cell.neutral   { background: var(--bg-secondary); color: var(--text); }
.hm-cell.small-dn  { background: #fca5a5; color: #7f1d1d; }
.hm-cell.down      { background: #dc2626; color: #fff; }
.hm-cell.big-dn    { background: #7f1d1d; color: #fff; }

/* ─── Forecast / Analysis ────────────────────────────────── */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.signal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.signal-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}
.signal-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}
.signal-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

/* Gauge */
.gauge-wrap { position: relative; width: 160px; height: 90px; margin: 0 auto; }
.gauge-wrap canvas { width: 100% !important; height: auto !important; }

/* Forecast pill */
.forecast-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.forecast-pill.bull { background: var(--up-bg); color: var(--up); }
.forecast-pill.bear { background: var(--dn-bg); color: var(--down); }
.forecast-pill.neut { background: rgba(212,175,55,0.1); color: var(--gold); }

/* ─── Market Summary Bar ─────────────────────────────────── */
.market-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  gap: 32px;
  overflow-x: auto;
  margin-bottom: 40px;
}
.ms-item { flex-shrink: 0; }
.ms-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.ms-value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--text); }
.ms-change { font-size: 12px; font-weight: 600; }
.ms-change.up { color: var(--up); }
.ms-change.down { color: var(--down); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; transition: color var(--t); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: var(--gold); }

/* ─── Ad Placeholders ────────────────────────────────────── */
.ad-placeholder {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ad-header  { width: 100%; height: 90px; margin-bottom: 20px; }
.ad-sidebar { width: 100%; height: 250px; margin-bottom: 20px; }
.ad-in-content { width: 100%; height: 100px; margin: 32px 0; }
.ad-sticky-mobile {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 998;
  display: none;
}
@media (max-width: 768px) {
  .ad-sticky-mobile { display: flex; align-items: center; justify-content: center; }
}

/* ─── Skeleton Loaders ───────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.sk-line  { height: 14px; margin-bottom: 8px; }
.sk-price { height: 32px; margin-bottom: 12px; width: 60%; }
.sk-chart { height: 200px; }
.sk-card  { height: 120px; border-radius: var(--radius);}

/* ─── Utilities ──────────────────────────────────────────── */
.container   { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.card        { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.text-gold   { color: var(--gold); }
.text-up     { color: var(--up); }
.text-down   { color: var(--down); }
.text-muted  { color: var(--text-muted); }
.mono        { font-family: var(--font-mono); }
.divider     { height: 1px; background: var(--border); margin: 32px 0; }
.badge-live  { background: rgba(22,163,74,0.12); color: var(--up); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.06em; }
.flex-between{ display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.p-20  { padding: 20px; }
.p-24  { padding: 24px; }

/* ─── Chart Container ────────────────────────────────────── */
.chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.chart-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.chart-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: background var(--t), color var(--t);
}
.chart-btn.active, .chart-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* TradingView widget container */
.tv-widget {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

/* ─── Crypto Specific ────────────────────────────────────── */
.fear-greed {
  text-align: center;
  padding: 32px;
}
.fear-greed .fg-val {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.fear-greed .fg-label {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.fear-greed .fg-sub { font-size: 12px; color: var(--text-muted); }

/* ─── Page-specific accent themes ───────────────────────── */
.theme-gold    { --card-accent: #D4AF37; --page-accent: var(--gold); }
.theme-silver  { --card-accent: #A8A9AD; --page-accent: var(--silver); }
.theme-oil     { --card-accent: #E8650A; --page-accent: var(--oil); }
.theme-stocks  { --card-accent: #2563EB; --page-accent: var(--stock-blue); }
.theme-forex   { --card-accent: #00C896; --page-accent: var(--forex-green); }
.theme-crypto  { --card-accent: #00FFA3; --page-accent: var(--crypto-neon); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner   { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel   { max-width: 500px; margin: 0 auto; }
}
@media (max-width: 900px) {
  .gl-grid { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr 1fr; }
  .grid-4  { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  #nav-toggle { display: flex; }
  .nav-search { width: 150px; }
}

@media (max-width: 600px) {
  :root { --nav-h: 56px; }
  .hero-stats   { grid-template-columns: 1fr 1fr; }
  .hero-stats .hero-stat:last-child { grid-column: 1 / -1; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .market-grid  { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom{ flex-direction: column; text-align: center; }
  .section      { padding: 40px 16px; }
  .hero-inner   { padding: 40px 16px; }
  .tabs         { overflow-x: auto; }
}

/* ─── Nav mobile menu ────────────────────────────────────── */
#mobile-menu {
  display: none;
  position: fixed;
  top: calc(var(--ticker-h) + var(--nav-h));
  left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 998;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background var(--t), color var(--t);
}
#mobile-menu a:hover { background: rgba(212,175,55,0.08); color: var(--gold); }

/* ─── Animations & Entrance ──────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.10s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.20s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }
.fade-in:nth-child(6) { animation-delay: 0.30s; }

/* Number counter animation */
.count-up { transition: all 0.4s ease; }

/* Glow text for dark mode */
[data-theme="dark"] .text-gold {
  text-shadow: 0 0 20px rgba(212,175,55,0.3);
}
