/* ═══════════════════════════════════════
   GRABMEDIA v2 — Editorial Brutalist Style
   Bebas Neue + Space Grotesk + JetBrains Mono
   ═══════════════════════════════════════ */

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

:root {
  /* ── Accent (same in both modes) ── */
  --accent:  #ff3d00;
  --accent2: #ff6d00;
  --green:   #00e676;
  --mono:    'JetBrains Mono', monospace;

  /* ── Default: DARK (night) ── */
  --bg:      #0c0c0c;
  --surface: #141414;
  --surface2:#1c1c1c;
  --border:  #2a2a2a;
  --border2: #333;
  --text:    #f5f5f0;
  --muted:   #555;
  --muted2:  #888;
  --shadow:  rgba(0,0,0,0.5);
  --mode-label: "🌙 NIGHT MODE";
}

/* ── LIGHT MODE (applied via JS based on time) ── */
body.light-mode {
  --bg:      #f5f3ee;
  --surface: #ffffff;
  --surface2:#f0ede6;
  --border:  #d8d4cc;
  --border2: #c8c4bc;
  --text:    #1a1814;
  --muted:   #9a9690;
  --muted2:  #6a6660;
  --shadow:  rgba(0,0,0,0.12);
  --mode-label: "☀️ DAY MODE";
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
.cursor {
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s, height 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
body:has(button:hover) .cursor,
body:has(input:hover) .cursor { width: 48px; height: 48px; border-color: var(--text); }

/* ── BG GRID ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.8) 100%);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(12,12,12,0.85);
  backdrop-filter: blur(20px);
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff;
}
.logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; letter-spacing: 2px; color: var(--text);
}
.logo-text em { color: var(--accent); font-style: normal; }

.nav-center {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted2);
}
.nav-tag { }
.nav-divider { color: var(--border2); }

.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted2);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── MAIN ── */
main {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  padding: 120px 24px 80px;
}

/* ── HERO ── */
.hero { margin-bottom: 56px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted2); margin-bottom: 28px;
  animation: fadeUp 0.5s ease both;
}
.eyebrow-chip {
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 0.65rem;
  padding: 2px 8px; letter-spacing: 1px;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.title-line {
  display: block;
  animation: fadeUp 0.5s ease both;
}
.title-line:nth-child(1) { animation-delay: 0.05s; }
.title-line:nth-child(2) { animation-delay: 0.1s; }
.title-line:nth-child(3) { animation-delay: 0.15s; }
.title-line.accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.hero-desc {
  font-size: 1rem; color: var(--muted2);
  font-weight: 300; letter-spacing: 0.3px;
  animation: fadeUp 0.5s 0.2s ease both;
}

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

/* ── INPUT SECTION ── */
.input-section {
  display: flex; gap: 0;
  border: 1px solid var(--border2);
  margin-bottom: 16px;
  animation: fadeUp 0.5s 0.25s ease both;
  position: relative;
}
.input-section::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}

.input-wrap {
  display: flex; align-items: center;
  flex: 1; background: var(--surface);
  padding: 0 16px; gap: 12px;
}
.input-prefix { color: var(--muted); display: flex; align-items: center; }

#urlInput {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 0.85rem;
  padding: 20px 0;
  caret-color: var(--accent);
}
#urlInput::placeholder { color: var(--muted); }

.paste-btn {
  background: none; border: none; border-left: 1px solid var(--border);
  color: var(--muted2); font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 1.5px; padding: 0 16px; cursor: pointer;
  height: 100%; transition: color 0.15s, background 0.15s;
}
.paste-btn:hover { color: var(--text); background: var(--surface2); }

.fetch-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--accent); border: none;
  color: #fff; font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem; letter-spacing: 3px;
  padding: 0 32px; cursor: pointer;
  transition: background 0.15s, gap 0.2s;
  white-space: nowrap;
}
.fetch-btn:hover { background: var(--accent2); gap: 18px; }
.fetch-btn:disabled { opacity: 0.4; cursor: not-allowed; gap: 12px; }
.fetch-btn-icon { display: flex; align-items: center; }

/* ── TABS ── */
.type-tabs {
  display: flex; gap: 2px;
  margin-bottom: 40px;
  animation: fadeUp 0.5s 0.3s ease both;
}
.type-tab {
  padding: 8px 20px;
  background: none; border: 1px solid var(--border);
  color: var(--muted2); font-family: var(--mono); font-size: 0.75rem;
  cursor: pointer; transition: all 0.15s; letter-spacing: 0.5px;
}
.type-tab:hover { border-color: var(--border2); color: var(--text); }
.type-tab.active {
  background: var(--surface2); border-color: var(--accent);
  color: var(--text);
}

/* ── LOADING ── */
.loading-state {
  display: none; padding: 32px 0;
  animation: fadeUp 0.3s ease both;
}
.loading-state.show { display: block; }
.loading-bar {
  height: 2px; background: var(--surface2);
  margin-bottom: 16px; overflow: hidden;
}
.loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
  background-size: 200%;
  animation: loadSlide 1.5s linear infinite;
}
@keyframes loadSlide {
  0% { background-position: 200% 0; width: 60%; margin-left: -60%; }
  100% { background-position: -200% 0; width: 60%; margin-left: 100%; }
}
.loading-text {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted2);
  letter-spacing: 1px;
}
.dots::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0%,20%  { content: ''; }
  40%     { content: '.'; }
  60%     { content: '..'; }
  80%,100%{ content: '...'; }
}

/* ── ERROR ── */
.error-state {
  display: none; align-items: center; gap: 12px;
  padding: 16px 20px; margin-bottom: 24px;
  border: 1px solid rgba(255,61,0,0.3);
  background: rgba(255,61,0,0.06);
}
.error-state.show { display: flex; }
.error-icon {
  width: 24px; height: 24px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.error-msg { font-size: 0.85rem; color: var(--muted2); }

/* ── RESULT PANEL ── */
.result-panel {
  display: none;
  border: 1px solid var(--border2);
  background: var(--surface);
  overflow: hidden;
  animation: fadeUp 0.4s ease both;
  margin-bottom: 48px;
}
.result-panel.show { display: block; }

/* ── PREVIEW AREA ── */
.preview-area {
  width: 100%; background: #000;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.preview-area video {
  width: 100%; max-height: 480px;
  object-fit: contain; display: block;
}
.preview-area img {
  width: 100%; max-height: 480px;
  object-fit: contain; display: block;
}
.preview-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px;
  color: var(--muted);
}
.preview-placeholder-icon { font-size: 2.5rem; }
.preview-placeholder-text { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 1px; }

/* Carousel slider */
.carousel-wrap {
  width: 100%; position: relative;
}
.carousel-track {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  min-width: 100%; scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.carousel-slide img, .carousel-slide video {
  width: 100%; max-height: 440px; object-fit: contain;
}
.carousel-nav {
  display: flex; justify-content: center; gap: 6px;
  padding: 12px; background: var(--surface);
}
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border2); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active { background: var(--accent); transform: scale(1.3); }

/* ── MEDIA INFO ── */
.media-info {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
}
.media-type-badge {
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 2px; padding: 4px 10px; flex-shrink: 0;
  align-self: flex-start; margin-top: 3px;
}
.media-caption {
  flex: 1; font-size: 0.9rem; color: var(--muted2);
  line-height: 1.5; min-width: 200px;
}
.media-meta {
  display: flex; gap: 16px; width: 100%;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  padding-top: 6px;
}

/* ── DOWNLOAD SECTION ── */
.download-section { padding: 20px 24px; }
.download-label {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 3px; color: var(--muted);
  margin-bottom: 12px;
}
.download-list { display: flex; flex-direction: column; gap: 8px; }

.dl-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.15s;
  gap: 12px;
}
.dl-item:hover { border-color: var(--border2); }

.dl-left { display: flex; align-items: center; gap: 14px; }
.dl-badge {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  color: var(--accent); letter-spacing: 1px; min-width: 40px;
}
.dl-label { font-size: 0.85rem; color: var(--muted2); }

.dl-save-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg);
  border: none; font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem; letter-spacing: 2px;
  padding: 10px 20px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.dl-save-btn:hover { background: var(--accent); color: #fff; }
.dl-save-btn svg { transition: transform 0.2s; }
.dl-save-btn:hover svg { transform: translateY(2px); }

/* ── STATS ROW ── */
.stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0; border: 1px solid var(--border);
  margin-bottom: 40px;
  animation: fadeUp 0.5s 0.35s ease both;
}
.stat-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px; gap: 4px;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; color: var(--text); letter-spacing: 1px;
}
.stat-label {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--muted); letter-spacing: 1px; text-transform: uppercase;
}
.stat-sep {
  width: 1px; height: 60px; background: var(--border);
}

/* ── HOW TO ── */
.how-section {
  display: flex; align-items: center; gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 0;
  animation: fadeUp 0.5s 0.4s ease both;
}
.how-step {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.how-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem; color: var(--border2); line-height: 1;
}
.how-text {
  font-size: 0.82rem; color: var(--muted2); line-height: 1.4;
}
.how-arrow {
  font-size: 1.2rem; color: var(--accent); flex-shrink: 0;
}

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  padding: 48px 24px 40px;
  margin-top: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border2);
  box-shadow: 0 -1px 0 0 var(--border), inset 0 1px 0 0 rgba(255,255,255,0.03);
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted2); letter-spacing: 0.5px;
}
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
}
.footer-top-row {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; justify-content: center;
}
.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 3px;
  color: var(--text);
}
.footer-brand em { color: var(--accent); font-style: normal; }
.footer-sep { color: var(--border2); margin: 0 4px; }
.footer-tagline {
  font-size: 0.7rem; color: var(--muted);
  text-align: center; line-height: 1.6;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: var(--text); color: var(--bg);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.5px;
  padding: 12px 20px;
  transform: translateY(80px); opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  z-index: 999; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-center { display: none; }
  main { padding: 96px 16px 60px; }
  .hero-title { font-size: clamp(3rem, 15vw, 6rem); }
  .input-section { flex-direction: column; }
  .fetch-btn { padding: 18px; justify-content: center; }
  .stats-row { flex-wrap: wrap; }
  .stat-sep { display: none; }
  .stat-item { flex: 0 0 45%; border-bottom: 1px solid var(--border); }
  .how-section { flex-direction: column; gap: 20px; }
  .how-arrow { transform: rotate(90deg); }
  .body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}

/* ══════════════════════════════════════
   PLATFORM SWITCHER
   ══════════════════════════════════════ */
.platform-switcher {
  display: flex; gap: 2px; margin-bottom: 20px;
  position: relative;
  animation: fadeUp 0.5s 0.22s ease both;
}
.platform-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted2); font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px;
}
.platform-btn:hover { border-color: var(--border2); color: var(--text); }
.platform-btn.active {
  background: var(--surface2); color: var(--text);
  border-color: var(--accent);
}
.platform-btn.active svg { color: var(--accent); }

/* YouTube mode accent overrides */
body.yt-mode .platform-btn.active { border-color: #ff0000; }
body.yt-mode .logo-mark { background: #ff0000; }
body.yt-mode .eyebrow-chip { background: #ff0000; }
body.yt-mode .fetch-btn { background: #ff0000; }
body.yt-mode .fetch-btn:hover { background: #cc0000; }
body.yt-mode .status-dot { background: #ff0000; box-shadow: 0 0 8px #ff0000; }
body.yt-mode .dl-save-btn:hover { background: #ff0000; }
body.yt-mode .type-tab.active { border-color: #ff0000; }
body.yt-mode .result-platform-bar { background: #ff0000; }
body.yt-mode .media-type-badge { background: #ff0000; }
body.yt-mode input:focus { border-color: rgba(255,0,0,0.4); box-shadow: 0 0 0 3px rgba(255,0,0,0.08); }
body.yt-mode .dl-badge { color: #ff0000; }
body.yt-mode .loading-fill { background: linear-gradient(90deg,#ff0000,#ff6666,#ff0000); background-size: 200%; }
body.yt-mode .stat-num { color: var(--text); }

/* IG mode stays default (accent orange-red) */
body.ig-mode .result-platform-bar { background: linear-gradient(90deg, #e1306c, #fd1d1d, #fcb045); }
body.ig-mode .media-type-badge { background: linear-gradient(90deg, #e1306c, #fd1d1d); }

/* Result platform bar */
.result-platform-bar {
  height: 3px; width: 100%;
}

/* YT info bar */
.yt-info {
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px; margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted2); letter-spacing: 0.3px;
  animation: fadeUp 0.3s ease both;
}
.yt-info.show { display: flex; }
.yt-info-icon {
  width: 18px; height: 18px; border-radius: 50%;
  background: #ff0000; color: #fff;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}

/* Audio badge in download list */
.dl-audio-badge {
  font-family: var(--mono); font-size: 0.6rem;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--muted2); padding: 2px 6px; letter-spacing: 0.5px;
}
.dl-no-audio { opacity: 0.6; }

/* ══════════════════════════════════════
   FOOTER CREDITS
   ══════════════════════════════════════ */
.footer-credits {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted2);
}
.footer-made-by {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 10px 20px;
  font-size: 0.82rem;
}
.footer-heart {
  color: var(--accent);
  display: inline-block;
  font-size: 1rem;
  animation: heartbeat 1.2s ease-in-out infinite;
}
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  14%     { transform: scale(1.4); }
  28%     { transform: scale(1); }
  42%     { transform: scale(1.25); }
  56%     { transform: scale(1); }
}
.footer-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem; letter-spacing: 2px;
  color: var(--text);
}
.footer-social {
  display: flex; align-items: center; gap: 8px;
}
.social-link {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted2); text-decoration: none;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  transition: all 0.2s;
  position: relative; overflow: hidden;
  letter-spacing: 1px;
}
.social-link::before {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 0;
}
.social-link:hover { color: #fff; }
.social-link span, .social-link svg { position: relative; z-index: 1; transition: color 0.2s; }
.social-link.github::before  { background: #fff; }
.social-link.github:hover    { color: #000; border-color: #fff; }
.social-link.github:hover svg { color: #000; }
.social-link.linkedin::before  { background: #0a66c2; }
.social-link.linkedin:hover    { border-color: #0a66c2; }
.social-link:hover::before { transform: translateX(0); }

/* ═══════════════════════════════════════════
   LIGHT MODE OVERRIDES
   ═══════════════════════════════════════════ */

/* BG grid lighter */
body.light-mode .bg-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
}
body.light-mode .bg-vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(200,190,180,0.4) 100%);
}

/* Nav */
body.light-mode nav {
  background: rgba(245,243,238,0.88);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 var(--border);
}

/* Input */
body.light-mode input[type="text"] {
  background: var(--surface);
  border-color: var(--border2);
  color: var(--text);
}
body.light-mode input[type="text"]:focus {
  border-color: rgba(255,61,0,0.5);
  box-shadow: 0 0 0 3px rgba(255,61,0,0.08);
}

/* Cards / surfaces */
body.light-mode .result-panel,
body.light-mode .stats-row,
body.light-mode .how-section,
body.light-mode .dl-item {
  box-shadow: 0 2px 12px var(--shadow);
}

/* Download item hover */
body.light-mode .dl-item:hover { border-color: var(--accent); }

/* Cursor */
body.light-mode .cursor { border-color: var(--accent); }
body.light-mode .cursor-dot { background: var(--accent); }

/* Footer */
body.light-mode footer { background: var(--surface); }
body.light-mode .social-link { background: var(--surface2); }

/* Toast */
body.light-mode .toast {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 24px var(--shadow);
}

/* Type tabs */
body.light-mode .type-tab { background: var(--surface); }

/* Loading bar stays vivid */
body.light-mode .loading-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
  background-size: 200%;
}

/* How section numbers */
body.light-mode .how-num { color: var(--border2); }

/* ── MODE TOGGLE BUTTON ── */
.mode-toggle {
  position: fixed;
  bottom: 28px; left: 28px;
  z-index: 500;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 1px; padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--shadow);
}
.mode-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}
.mode-toggle-icon { font-size: 1rem; transition: transform 0.5s; }
.mode-toggle:hover .mode-toggle-icon { transform: rotate(20deg); }

/* ── MODE TRANSITION ── */
body {
  transition:
    background-color 0.8s ease,
    color 0.8s ease;
}
body * {
  transition:
    background-color 0.6s ease,
    border-color 0.6s ease,
    color 0.4s ease,
    box-shadow 0.4s ease;
}
/* Don't transition transforms/animations */
body .cursor,
body .cursor-dot,
body .blob-1,
body .blob-2,
body .blob-3,
body .loading-fill,
body .footer-heart,
body .status-dot {
  transition: none !important;
}

/* ── LIGHT MODE BLOBS ── */
body.light-mode .blob-1 {
  background: radial-gradient(circle, rgba(255,80,0,0.1) 0%, transparent 70%);
}
body.light-mode .blob-2 {
  background: radial-gradient(circle, rgba(255,120,0,0.08) 0%, transparent 70%);
}
body.light-mode .blob-3 {
  background: radial-gradient(circle, rgba(200,100,60,0.06) 0%, transparent 70%);
}


.time-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

@media (max-width: 640px) {
  .mode-toggle { bottom: 16px; left: 16px; padding: 8px 12px; font-size: 0.62rem; }
}
