/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:           #0d0d0d;
  --bg-card:      #111111;
  --bg-inner:     #181818;
  --orange:       #FF6B2B;
  --orange-mid:   rgba(255, 107, 43, 0.25);
  --orange-low:   rgba(255, 107, 43, 0.08);
  --orange-glow:  rgba(255, 107, 43, 0.45);
  --silver:       #A8B2BD;
  --silver-dim:   rgba(168, 178, 189, 0.12);
  --white:        #F2F2F2;
  --green:        #3DFF8F;
  --red:          #FF4560;
  --ig-accent:    #E1306C;
  --tt-accent:    #69C9D0;
  --border:       rgba(255, 255, 255, 0.06);

  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'Satoshi', 'Inter', sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Noise overlay ───────────────────────────────────────── */
.noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* ── Header ──────────────────────────────────────────────── */
header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,107,43,0.04) 0%, transparent 100%);
}

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-cog { color: var(--orange); filter: drop-shadow(0 0 8px var(--orange-glow)); }
.logo-wordmark { display: flex; flex-direction: column; line-height: 1; }
.logo-brand {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.12em;
  color: var(--orange);
  text-shadow: 0 0 20px var(--orange-glow);
}
.logo-tagline {
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.2em; color: var(--silver); opacity: 0.5;
  margin-top: 0.1rem;
}

.header-title h1 {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: 0.3em;
  color: var(--silver); opacity: 0.7;
}

.live-badge { display: flex; align-items: center; gap: 0.5rem; }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green), 0 0 12px var(--green);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}
.live-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.15em; color: var(--green);
}
.last-updated {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--silver); opacity: 0.45;
}

/* ── Main layout ─────────────────────────────────────────── */
main { position: relative; z-index: 1; padding: 2rem 2.5rem; }

.platforms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Platform card ───────────────────────────────────────── */
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#card-instagram { animation-delay: 0.05s; }
#card-tiktok    { animation-delay: 0.2s;  }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Top accent glow line */
.card-top-glow {
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
}
.ig-glow { background: linear-gradient(90deg, transparent 0%, var(--ig-accent) 40%, var(--orange) 60%, transparent 100%); opacity: 0.7; }
.tt-glow { background: linear-gradient(90deg, transparent 0%, var(--tt-accent) 50%, transparent 100%); opacity: 0.6; }

/* ── Platform header ─────────────────────────────────────── */
.platform-header {
  display: flex; align-items: center; gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.platform-icon { flex-shrink: 0; opacity: 0.85; }
#card-instagram .platform-icon { color: var(--ig-accent); }
#card-tiktok    .platform-icon { color: var(--tt-accent); }

.platform-name {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.1em; color: var(--white); opacity: 0.9;
}
.platform-handle {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--silver); opacity: 0.45; margin-top: 0.1rem;
}

/* ── Counter block ───────────────────────────────────────── */
.counter-block { margin-bottom: 1.75rem; }

.follower-count {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 6.5rem);
  line-height: 1; letter-spacing: -0.02em;
  color: var(--white);
  text-shadow: 0 0 60px rgba(255, 107, 43, 0.15);
}

.delta-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.4rem;
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--green);
}
.delta-badge.negative { color: var(--red); }
.delta-arrow { font-size: 0.9rem; }
.delta-label { opacity: 0.5; }

/* ── Mission section ─────────────────────────────────────── */
.mission-section {
  background: var(--bg-inner);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.mission-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.625rem;
}
.mission-title {
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.18em; color: var(--silver); opacity: 0.55;
}
.mission-remaining {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--orange); font-weight: 500;
}

.progress-bar-track {
  height: 5px; background: rgba(255,255,255,0.05);
  border-radius: 3px; overflow: hidden; margin-bottom: 0.875rem;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, #FF6B2B 0%, #FF9F6B 100%);
  border-radius: 3px;
  box-shadow: 0 0 12px var(--orange-glow);
  transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.milestones-row {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.milestone-chip {
  font-family: var(--font-mono); font-size: 0.55rem;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--silver); opacity: 0.4;
  transition: all 0.4s ease;
}
.milestone-chip.reached {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-low);
  opacity: 1;
  box-shadow: 0 0 8px rgba(255,107,43,0.2);
}

.eta-line {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--silver); opacity: 0.4;
}

/* ── Chart section ───────────────────────────────────────── */
.chart-section { margin-bottom: 1.75rem; }

.section-label {
  font-family: var(--font-mono); font-size: 0.55rem;
  letter-spacing: 0.2em; color: var(--silver); opacity: 0.35;
  margin-bottom: 0.625rem;
}

.sparkline-canvas {
  width: 100%; height: 64px; display: block;
}

/* ── Videos section ──────────────────────────────────────── */
.videos-list { display: flex; flex-direction: column; gap: 0.5rem; }

.video-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  background: var(--bg-inner);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease;
  cursor: default;
}
.video-row:hover { border-color: rgba(255,107,43,0.3); }

.video-rank {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--orange); opacity: 0.4; width: 1.2rem;
  flex-shrink: 0; text-align: center; line-height: 1;
}
.video-thumb {
  width: 42px; height: 42px; object-fit: cover;
  border-radius: 6px; background: var(--bg-inner);
  flex-shrink: 0;
}
.video-info { flex: 1; min-width: 0; }
.video-title {
  font-size: 0.72rem; font-weight: 500;
  color: var(--white); opacity: 0.85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}
.video-stats {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--silver); opacity: 0.45;
}

/* Skeleton loading */
.skeleton-row {
  height: 54px; border-radius: 10px;
  background: linear-gradient(90deg, var(--bg-inner) 25%, rgba(255,255,255,0.04) 50%, var(--bg-inner) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.update-link {
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.15em; color: var(--silver); opacity: 0.35;
  text-decoration: none; border: 1px solid var(--border);
  padding: 0.3rem 0.6rem; border-radius: 6px;
  transition: opacity 0.2s, border-color 0.2s;
  position: absolute; right: 2.5rem; top: 50%; transform: translateY(-50%);
}
.update-link:hover { opacity: 0.8; border-color: var(--orange); color: var(--orange); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .platforms-grid { grid-template-columns: 1fr; }
  header { flex-direction: column; gap: 0.875rem; text-align: center; }
  main { padding: 1.25rem 1rem; }
}
