/* ═══════════════════════════════════════════════════════════
   WINGO LIVE PREDICTOR — BLINK
   Retro-Futuristic Cyberpunk Design System
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg-base:       #050B1A;
  --bg-card:       #080F22;
  --bg-card-2:     #0C1530;
  --bg-hover:      #101C38;
  --border:        #1A2A4A;
  --border-bright: #1E3560;

  --cyan:          #00F5FF;
  --cyan-dim:      #00C4CC;
  --cyan-glow:     rgba(0, 245, 255, 0.15);
  --cyan-glow-sm:  rgba(0, 245, 255, 0.08);

  --magenta:       #FF3CAC;
  --magenta-dim:   #CC2E88;
  --magenta-glow:  rgba(255, 60, 172, 0.15);

  --green:         #CCFF00;
  --green-dim:     #A3CC00;
  --green-glow:    rgba(204, 255, 0, 0.12);

  --orange:        #FF6B2B;
  --yellow:        #FFD700;

  --text-primary:  #E8F0FF;
  --text-secondary:#8899BB;
  --text-muted:    #4A5A7A;

  --red-num:       #FF4757;
  --green-num:     #2ED573;
  --violet-num:    #A855F7;

  --font-display:  'Clash Display', sans-serif;
  --font-body:     'Outfit', sans-serif;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --shadow-cyan:   0 0 20px rgba(0, 245, 255, 0.2), 0 0 60px rgba(0, 245, 255, 0.05);
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255,255,255,0.03) inset;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Scanlines Overlay ── */
.scanlines {
  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;
}

/* ── Particles Canvas ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: rgba(5, 11, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 245, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan-glow-sm);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.4));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 60, 172, 0.1);
  border: 1px solid rgba(255, 60, 172, 0.3);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--magenta);
  letter-spacing: 0.1em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.live-dot.small { width: 5px; height: 5px; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255,60,172,0.4); }
  50% { opacity: 0.7; transform: scale(1.2); box-shadow: 0 0 0 4px rgba(255,60,172,0); }
}

.header-clock {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cyan-glow-sm);
  border: 1px solid rgba(0, 245, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

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

.user-team {
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.user-menu-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.user-menu-btn:hover { background: var(--bg-hover); }

/* ═══════════════════════════════════════════════════════════
   NAV TABS
   ═══════════════════════════════════════════════════════════ */
.nav-tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  background: rgba(5, 11, 26, 0.8);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 99;
  backdrop-filter: blur(20px);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--cyan-glow-sm);
}

.nav-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════ */
.main {
  position: relative;
  z-index: 1;
  padding: 20px 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,245,255,0.15), transparent);
}

.card:hover {
  border-color: var(--border-bright);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--magenta);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s;
}

.stat-card[data-glow="cyan"]::after { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.stat-card[data-glow="green"]::after { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.stat-card[data-glow="magenta"]::after { background: linear-gradient(90deg, transparent, var(--magenta), transparent); }

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.cyan { background: var(--cyan-glow); border: 1px solid rgba(0,245,255,0.2); }
.stat-icon.green { background: var(--green-glow); border: 1px solid rgba(204,255,0,0.2); }
.stat-icon.magenta { background: var(--magenta-glow); border: 1px solid rgba(255,60,172,0.2); }

.stat-body { flex: 1; }
.stat-label { display: block; font-size: 0.68rem; color: var(--text-muted); margin-bottom: 3px; letter-spacing: 0.04em; text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.stat-value.green { color: var(--green); text-shadow: 0 0 12px rgba(204,255,0,0.3); }
.stat-value.magenta { color: var(--magenta); text-shadow: 0 0 12px rgba(255,60,172,0.3); }

.stat-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(0,245,255,0.2);
}

.stat-badge.pulse { animation: badge-pulse 2s ease-in-out infinite; }

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

.stat-trend {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-trend.up { color: var(--green); background: var(--green-glow); }
.stat-trend.down { color: var(--red-num); background: rgba(255,71,87,0.1); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD GRID
   ═══════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
  align-items: start;
}

.col-left, .col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════
   LIVE RESULT CARD
   ═══════════════════════════════════════════════════════════ */
.live-result-display {
  display: flex;
  align-items: center;
  gap: 24px;
}

.result-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.ring-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--bg-card-2);
  stroke-width: 6;
}

.ring-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.result-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(0,245,255,0.4);
  transition: all 0.4s;
}

.result-color-dot {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: background 0.4s, box-shadow 0.4s;
}

.result-meta { flex: 1; }

.result-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.result-meta-row:last-child { border-bottom: none; }

.meta-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   PREDICTION CARD
   ═══════════════════════════════════════════════════════════ */
.confidence-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(0,245,255,0.25);
  letter-spacing: 0.05em;
}

.prediction-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.prediction-numbers { flex: 1; text-align: center; }

.pred-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pred-number-display {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0,245,255,0.5);
  line-height: 1;
  margin-bottom: 10px;
  transition: all 0.4s;
}

.pred-sublabels {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pred-color-badge, .pred-size-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.pred-color-badge { background: rgba(255,60,172,0.15); color: var(--magenta); border: 1px solid rgba(255,60,172,0.25); }
.pred-size-badge { background: rgba(204,255,0,0.1); color: var(--green); border: 1px solid rgba(204,255,0,0.2); }

.confidence-meter { text-align: center; }

.conf-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.conf-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.conf-ring-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.conf-ring-bg {
  fill: none;
  stroke: var(--bg-base);
  stroke-width: 6;
}

.conf-ring-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease;
  filter: drop-shadow(0 0 4px var(--green));
}

.conf-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
}

.prediction-breakdown { margin-bottom: 16px; }

.breakdown-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.breakdown-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.breakdown-bar-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
}

.breakdown-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-card-2);
  border-radius: 2px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.breakdown-bar-val {
  font-size: 0.7rem;
  color: var(--text-secondary);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.predict-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(0,245,255,0.1), rgba(0,245,255,0.05));
  border: 1px solid rgba(0,245,255,0.3);
  border-radius: var(--radius-md);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

.predict-btn:hover {
  background: linear-gradient(135deg, rgba(0,245,255,0.2), rgba(0,245,255,0.1));
  box-shadow: 0 0 20px rgba(0,245,255,0.2);
  transform: translateY(-1px);
}

.predict-btn:active { transform: translateY(0); }

.predict-btn.full-width { width: 100%; margin-top: 16px; }

.predict-btn-icon { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════
   RECENT RESULTS GRID
   ═══════════════════════════════════════════════════════════ */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.result-ball {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: default;
  transition: transform 0.2s;
  position: relative;
}

.result-ball:hover { transform: scale(1.15); z-index: 2; }

.result-ball.red {
  background: radial-gradient(circle at 35% 35%, #FF6B7A, #CC2233);
  box-shadow: 0 2px 8px rgba(255,71,87,0.4);
  color: #fff;
}

.result-ball.green {
  background: radial-gradient(circle at 35% 35%, #4EE88A, #1A9950);
  box-shadow: 0 2px 8px rgba(46,213,115,0.4);
  color: #fff;
}

.result-ball.violet {
  background: radial-gradient(circle at 35% 35%, #C084FC, #7C3AED);
  box-shadow: 0 2px 8px rgba(168,85,247,0.4);
  color: #fff;
}

.result-ball.red-violet {
  background: radial-gradient(circle at 35% 35%, #FF6B7A, #9B2EAE);
  box-shadow: 0 2px 8px rgba(200,50,150,0.4);
  color: #fff;
}

.result-ball.green-violet {
  background: radial-gradient(circle at 35% 35%, #4EE88A, #7C3AED);
  box-shadow: 0 2px 8px rgba(100,180,200,0.4);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   HOT & COLD
   ═══════════════════════════════════════════════════════════ */
.hot-cold-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hc-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hc-label.hot { color: var(--orange); }
.hc-label.cold { color: #60A5FA; }

.hc-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hc-ball {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  transition: transform 0.2s;
}

.hc-ball:hover { transform: scale(1.1); }

.hc-ball.hot {
  background: radial-gradient(circle at 35% 35%, #FF8C42, #CC4400);
  box-shadow: 0 2px 8px rgba(255,107,43,0.5);
  color: #fff;
}

.hc-ball.cold {
  background: radial-gradient(circle at 35% 35%, #93C5FD, #1D4ED8);
  box-shadow: 0 2px 8px rgba(96,165,250,0.4);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   COLOR DISTRIBUTION
   ═══════════════════════════════════════════════════════════ */
.color-dist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-dist-label {
  width: 60px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.color-dist-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-card-2);
  border-radius: 4px;
  overflow: hidden;
}

.color-dist-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.color-dist-bar-fill.red { background: linear-gradient(90deg, #CC2233, #FF6B7A); }
.color-dist-bar-fill.green { background: linear-gradient(90deg, #1A9950, #4EE88A); }
.color-dist-bar-fill.violet { background: linear-gradient(90deg, #7C3AED, #C084FC); }

.color-dist-pct {
  width: 36px;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   PREDICTIONS PAGE
   ═══════════════════════════════════════════════════════════ */
.predictions-page { display: flex; flex-direction: column; gap: 20px; }

.pred-page-header { margin-bottom: 4px; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.page-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pred-models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.3s;
}

.model-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.model-icon { font-size: 1.6rem; margin-bottom: 10px; }

.model-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.model-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.model-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}

.model-bar {
  height: 4px;
  background: var(--bg-card-2);
  border-radius: 2px;
  overflow: hidden;
}

.model-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  border-radius: 2px;
  transition: width 1.2s ease;
  box-shadow: 0 0 8px rgba(0,245,255,0.3);
}

.pred-result-showcase {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
}

.showcase-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,245,255,0.05);
}

.showcase-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.showcase-number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 40px rgba(0,245,255,0.5);
  line-height: 1;
  margin-bottom: 16px;
  transition: all 0.4s;
}

.showcase-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.showcase-confidence {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.showcase-conf-val {
  font-weight: 700;
  color: var(--green);
}

.pred-history-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.phm-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.phm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.phm-row:last-child { border-bottom: none; }

.phm-period { font-size: 0.72rem; color: var(--text-muted); width: 80px; }
.phm-pred { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.phm-actual { font-size: 0.78rem; font-weight: 600; }
.phm-result { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: auto; }
.phm-result.win { background: rgba(204,255,0,0.1); color: var(--green); }
.phm-result.loss { background: rgba(255,71,87,0.1); color: var(--red-num); }

/* ═══════════════════════════════════════════════════════════
   HISTORY PAGE
   ═══════════════════════════════════════════════════════════ */
.history-page { display: flex; flex-direction: column; gap: 16px; }

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.history-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--border-bright); color: var(--text-primary); }

.filter-btn.active {
  background: var(--cyan-glow);
  border-color: rgba(0,245,255,0.3);
  color: var(--cyan);
}

.history-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table thead tr {
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
}

.history-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.history-table td {
  padding: 10px 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(26,42,74,0.5);
}

.history-table tbody tr:hover { background: var(--bg-hover); }
.history-table tbody tr:last-child td { border-bottom: none; }

.td-number {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.td-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.td-result {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.td-result.win { background: rgba(204,255,0,0.1); color: var(--green); }
.td-result.loss { background: rgba(255,71,87,0.1); color: var(--red-num); }
.td-result.pending { background: rgba(0,245,255,0.08); color: var(--cyan); }

/* ═══════════════════════════════════════════════════════════
   ANALYTICS PAGE
   ═══════════════════════════════════════════════════════════ */
.analytics-page { display: flex; flex-direction: column; gap: 16px; }

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-range-btns {
  display: flex;
  gap: 6px;
}

.range-btn {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.range-btn.active {
  background: var(--cyan-glow);
  border-color: rgba(0,245,255,0.3);
  color: var(--cyan);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.analytics-card.wide { grid-column: 1 / -1; }

.freq-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-top: 10px;
}

.freq-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.freq-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 1s ease;
  min-height: 4px;
}

.freq-bar-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.streak-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
  min-height: 120px;
}

.streak-cell {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  transition: transform 0.2s;
}

.streak-cell:hover { transform: scale(1.2); }

.accuracy-chart { padding: 8px 0; }

#acc-canvas { width: 100%; display: block; }

.ratio-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.ratio-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ratio-label {
  width: 50px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.ratio-bar-track {
  flex: 1;
  height: 20px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
}

.ratio-bar-a {
  height: 100%;
  transition: width 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.ratio-bar-b {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.ratio-pct {
  width: 40px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9998;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes numberFlip {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,245,255,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,245,255,0.4), 0 0 80px rgba(0,245,255,0.1); }
}

.card { animation: fadeInUp 0.4s ease both; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .pred-models-grid { grid-template-columns: repeat(2, 1fr); }
  .pred-result-showcase { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .main { padding: 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .nav-tabs { padding: 0 16px; overflow-x: auto; }
  .pred-models-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-card.wide { grid-column: 1; }
  .logo-sub { display: none; }
  .header-clock { display: none; }
  .recent-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .pred-models-grid { grid-template-columns: 1fr; }
  .hot-cold-grid { grid-template-columns: 1fr; }
}