:root {
  /* ── Backgrounds ── */
  --bg-void:          #0d1117;
  --bg-primary:       #111827;
  --bg-card:          #161d2e;
  --bg-card-elevated: #1c2540;
  --bg-input:         #131c2e;

  /* ── Borders ── */
  --border-subtle:    #1a2744;
  --border-active:    #243656;
  --border-glow:      #1e3a5f;

  /* ── Text ── */
  --text-primary:     #e8edf5;
  --text-secondary:   #8892a4;
  --text-muted:       #6b7a9a;
  --text-disabled:    #2d3748;

  /* ── Neon ── */
  --green-neon:       #00ff88;
  --green-mid:        #00cc6a;
  --green-dim:        #00994f;
  --green-bg:         rgba(0, 255, 136, 0.06);

  --red-neon:         #ff3366;
  --red-mid:          #cc2952;
  --red-dim:          #991f3e;
  --red-bg:           rgba(255, 51, 102, 0.06);

  --yellow-neon:      #ffcc00;
  --yellow-mid:       #cca300;
  --yellow-dim:       #997a00;
  --yellow-bg:        rgba(255, 204, 0, 0.06);

  --orange-neon:      #ff8c00;
  --orange-bg:        rgba(255, 140, 0, 0.06);

  --blue-neon:        #00aaff;
  --blue-bg:          rgba(0, 170, 255, 0.06);

  /* ── Fonts ── */
  --font-display: 'JetBrains Mono', 'Courier New', monospace;
  --font-body:    'JetBrains Mono', 'Courier New', monospace;

  /* ── Spaces ── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;

  /* Ticker height */
  --ticker-h: 40px;
}

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

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}


.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-4);
  }
}

.pt-ticker { padding-top: var(--ticker-h); }
.pt-hero { padding-top: var(--space-16); }
.pb-hero { padding-bottom: var(--space-16); }
@media (max-width: 640px) {
  .pt-hero, .pb-hero { padding-top: var(--space-10); padding-bottom: var(--space-10); }
}

/* Ticker */
.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--ticker-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: var(--space-10);
  animation: ticker-scroll 35s linear infinite;
  white-space: nowrap;
  width: max-content;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ticker-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticker-value {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Typography elements */
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.crypto-tag {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.text-glow-green {
  color: var(--green-neon);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 40px rgba(0, 255, 136, 0.15);
}
.text-glow-red {
  color: var(--red-neon);
  text-shadow: 0 0 20px rgba(255, 51, 102, 0.4), 0 0 40px rgba(255, 51, 102, 0.15);
}
.text-glow-yellow {
  color: var(--yellow-neon);
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.4), 0 0 40px rgba(255, 204, 0, 0.15);
}
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-display { font-family: var(--font-display); }
.tracking-widest { letter-spacing: 0.2em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.text-3xs { font-size: 0.5625rem; }
.text-2xs { font-size: 0.625rem; }
.text-xs { font-size: 0.6875rem; }
.text-sm { font-size: 0.75rem; }
.text-lg { font-size: 1.25rem; }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 2rem; }
.text-3xl { font-size: 2.5rem; }
.text-4xl { font-size: 3.5rem; line-height: 1.2;}
@media (max-width: 640px) { .text-4xl { font-size: 2rem; } }
.text-center { text-align: center; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* Live indicator */
.live-indicator-wrapper {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.badge-live {
  background: var(--red-neon);
  box-shadow: 0 0 8px var(--red-neon);
  animation: pulse-badge 2s ease infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Signal Hero Value */
.signal-hero {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.commentary {
  font-style: italic;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Gauge */
.rekt-score {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
  margin-top: 10px;
}
.gauge-svg {
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.3));
  transition: filter 0.5s ease;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.card:hover {
  background: var(--bg-card-elevated);
  border-color: var(--border-active);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-neon), transparent);
  opacity: 0.12;
}
.card[data-signal="bullish"]::before {
  background: linear-gradient(90deg, transparent, var(--green-neon), transparent);
}
.card[data-signal="bearish"]::before {
  background: linear-gradient(90deg, transparent, var(--red-neon), transparent);
}
.card[data-signal="neutral"]::before {
  background: linear-gradient(90deg, transparent, var(--yellow-neon), transparent);
}

.card-title {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.card-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1;
}

/* Skeletons */
.skeleton {
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.skeleton-line {
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--border-subtle) 25%,
    var(--border-active) 50%,
    var(--border-subtle) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-signal-hero { width: 320px; height: 67px; margin: 0 auto; }
.skeleton-rekt-score { width: 100%; max-width: 480px; height: 300px; margin: 0 auto; }
.skeleton-card-value { width: 100px; height: 38px; }
.skeleton-table-row { height: 36px; margin-bottom: var(--space-1); }
@media (max-width: 640px) {
  .skeleton-signal-hero { width: 220px; height: 40px; }
  .skeleton-rekt-score { height: calc(50vw + 60px); }
}

/* Badges */
.badge {
  display: inline-block;
  font-size: var(--text-3xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  padding: 2px 8px;
  border-radius: 2px;
}
.badge-bullish { color: var(--green-neon); background: var(--green-bg); border: 1px solid rgba(0,255,136,0.15); }
.badge-bearish { color: var(--red-neon); background: var(--red-bg); border: 1px solid rgba(255,51,102,0.15); }
.badge-neutral { color: var(--yellow-neon); background: var(--yellow-bg); border: 1px solid rgba(255,204,0,0.15); }

/* RSI Components */
.rsi-bar {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--green-neon) 0%, var(--yellow-neon) 50%, var(--red-neon) 100%);
  border-radius: 4px;
  position: relative;
}
.rsi-needle {
  position: absolute;
  top: -5px;
  width: 3px;
  height: 18px;
  background: var(--text-primary);
  border-radius: 1.5px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sentiment Bars */
.sentiment-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.sentiment-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  width: 60px;
  text-align: right;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sentiment-track {
  flex: 1;
  height: 16px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
}
.sentiment-fill-bull {
  height: 100%; background: linear-gradient(90deg, var(--green-dim), var(--green-neon));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.sentiment-fill-bear {
  height: 100%; background: linear-gradient(90deg, var(--red-neon), var(--red-dim));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.sentiment-pct { font-size: var(--text-xs); font-weight: 600; width: 40px; flex-shrink: 0; }

/* Flex rules */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.flex-col { flex-direction: column; }
@media(min-width: 640px){ .md\:flex-row { flex-direction: row; } }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* Table */
.signal-table { width: 100%; border-collapse: collapse; }
.signal-table th { font-size: var(--text-3xs); font-weight: 600; color: var(--text-muted); text-align: left; padding: 0 var(--space-3) var(--space-3); border-bottom: 1px solid var(--border-subtle); text-transform: uppercase;}
.signal-table td { font-size: var(--text-sm); padding: var(--space-2) var(--space-3); border-bottom: 1px solid rgba(26, 39, 68, 0.4); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.signal-table tr:hover td { background: rgba(0, 170, 255, 0.02); }
@media (max-width: 640px) {
  .table-scroll-wrapper { overflow-x: auto; position: relative; }
  .table-scroll-wrapper::after { content: ''; position: sticky; right: 0; top: 0; width: 40px; background: linear-gradient(90deg, transparent, var(--bg-void)); pointer-events: none; }
  .signal-table { min-width: 600px; }
}

.bg-primary { background: var(--bg-primary); }
.bg-card { background: var(--bg-card); }
.border { border: 1px solid var(--border-subtle); }
.border-t { border-top: 1px solid var(--border-subtle); }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.subtle-border { border-color: var(--border-subtle); }

.outcome-gain { color: var(--green-neon); font-weight: 600; }
.outcome-gain::before { content: '💎 '; }
.outcome-rekt { color: var(--red-neon); font-weight: 600; }
.outcome-rekt::before { content: '💀 '; }
.outcome-pending { color: var(--text-muted); font-style: italic; }
.outcome-pending::before { content: '⏳ '; }

/* Share Button */
.share-btn {
  background: var(--border-active);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.share-btn:hover { background: var(--border-glow); border-color: var(--green-neon); color: var(--green-neon); transform: scale(1.02); }

/* Buttons & Tabs */
.active-tab-btn { background: var(--border-glow); border: 1px solid var(--border-active); color: var(--text-primary); padding: 4px 12px; border-radius: 20px; cursor: pointer; }
.tab-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: 4px 12px; cursor: pointer; }

/* Collapsible */
.collapsible-trigger {
  display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-xs); color: var(--text-muted);
  border: none; background: none; padding: var(--space-2) 0; transition: color 0.2s ease;
}
.collapsible-trigger:hover { color: var(--blue-neon); }
.collapsible-trigger .arrow { transition: transform 0.25s ease; font-size: 10px; }
.collapsible-trigger[aria-expanded="true"] .arrow { transform: rotate(90deg); }

.collapsible-content { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease; opacity: 0; }
.collapsible-content.open { max-height: 500px; opacity: 1; }
.collapsible-body { padding: var(--space-3) 0; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; border-top: 1px solid var(--border-subtle); margin-top: var(--space-2); }
.w-full { width: 100%; }

/* Affiliates */
.aff-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 4px; padding: var(--space-6); text-align: center; text-decoration: none; position: relative; overflow: hidden; transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease; height: 100%;
}
.aff-card:hover { border-color: var(--green-neon); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0, 255, 136, 0.06); }
.aff-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.aff-card.coinbase::before { background: #0052ff; }
.aff-card.binance::before { background: #f0b90b; }
.aff-card.kraken::before { background: #7b61ff; }

.aff-card-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.aff-card-cta { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; color: var(--green-neon); text-transform: uppercase; margin-bottom: var(--space-3); }
.aff-card-sub { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }

.link-blue { color: var(--blue-neon); text-decoration: none; }
.link-blue:hover { text-decoration: underline; }
.inline-flex { display: inline-flex; }
.block { display: block; }

/* Rekt section: gauge + chart side-by-side */
.rekt-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) {
  .rekt-section-grid { grid-template-columns: 1fr; }
}

.rekt-chart-panel canvas {
  width: 100%;
  height: 280px;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}
@media (max-width: 640px) {
  .rekt-chart-panel canvas { height: 220px; }
}

.chart-legend {
  display: flex;
  gap: var(--space-5);
  justify-content: center;
  margin-top: var(--space-2);
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chart-legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: rgba(232, 237, 245, 0.8);
  flex-shrink: 0;
}
.chart-legend-blue { background: rgba(0, 170, 255, 0.6); }

.section-alt { background: var(--bg-primary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.italic { font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ticker-track { animation: none; }
}
