﻿/* ================================================================
   THEMES.CSS — Dark Theme Default, Light Overrides, High Contrast
   Synapse · Product of Synaptix Technologies · Built by Gurnoor Singh
   ================================================================ */

/* ══════════════════════════════════════════════════════════
   DARK THEME (Default)
   All variables are defined in base.css :root.
   This file provides themed overrides and accessibility modes.
   ══════════════════════════════════════════════════════════ */

/* Dark theme explicit class (for JS toggling) */
[data-theme="dark"],
.theme-dark {
  --bg: #020408;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.08);
  --surface3: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --dim: #64748b;
  --border: rgba(139, 92, 246, 0.25);
  --border-hover: rgba(139, 92, 246, 0.45);
}


/* ══════════════════════════════════════════════════════════
   LIGHT THEME (Optional Override)
   ══════════════════════════════════════════════════════════ */
[data-theme="light"],
.theme-light {
  --bg: #f8fafc;
  --surface: rgba(0, 0, 0, 0.03);
  --surface2: rgba(0, 0, 0, 0.06);
  --surface3: rgba(0, 0, 0, 0.1);
  --text: #1e293b;
  --text-secondary: #475569;
  --dim: #64748b;
  --border: rgba(139, 92, 246, 0.2);
  --border-hover: rgba(139, 92, 246, 0.4);
  --blue: #0284c7;
  --purple: #7c3aed;
  --magenta: #c026d3;
  --gb: 0 0 12px rgba(2, 132, 199, 0.25), 0 0 40px rgba(2, 132, 199, 0.1);
  --gp: 0 0 12px rgba(124, 58, 237, 0.3), 0 0 40px rgba(124, 58, 237, 0.12);
  --gm: 0 0 12px rgba(192, 38, 211, 0.3), 0 0 40px rgba(192, 38, 211, 0.12);
}

[data-theme="light"] body,
.theme-light body {
  -webkit-font-smoothing: auto;
}

[data-theme="light"] ::-webkit-scrollbar-track,
.theme-light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

[data-theme="light"] ::-webkit-scrollbar-thumb,
.theme-light ::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
}

[data-theme="light"] ::selection,
.theme-light ::selection {
  background: rgba(124, 58, 237, 0.2);
  color: #1e293b;
}

[data-theme="light"] nav,
.theme-light nav {
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .code-block,
.theme-light .code-block {
  background: #1e293b;
}

[data-theme="light"] #footer,
.theme-light #footer {
  background: rgba(248, 250, 252, 0.99);
}

[data-theme="light"] .stars,
.theme-light .stars {
  display: none;
}

[data-theme="light"] .cert,
.theme-light .cert {
  background: rgba(248, 250, 252, 0.96);
}

[data-theme="light"] .quiz-card,
.theme-light .quiz-card {
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .pg-input,
[data-theme="light"] .pg-output,
[data-theme="light"] .token-stream,
.theme-light .pg-input,
.theme-light .pg-output,
.theme-light .token-stream {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] #cur,
.theme-light #cur {
  mix-blend-mode: multiply;
}

[data-theme="light"] .venn-ai,
.theme-light .venn-ai {
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 50, 120, 0.15), rgba(0, 30, 80, 0.08));
}

[data-theme="light"] .venn-ml,
.theme-light .venn-ml {
  background: radial-gradient(ellipse at 40% 30%, rgba(60, 0, 180, 0.12), rgba(40, 0, 150, 0.06));
}

[data-theme="light"] .venn-dl,
.theme-light .venn-dl {
  background: radial-gradient(ellipse at 40% 30%, rgba(0, 140, 220, 0.12), rgba(0, 100, 200, 0.06));
}


/* ══════════════════════════════════════════════════════════
   HIGH CONTRAST (prefers-contrast: more)
   ══════════════════════════════════════════════════════════ */
@media (prefers-contrast: more) {
  :root {
    --text: #ffffff;
    --dim: #a1a1aa;
    --border: rgba(139, 92, 246, 0.5);
    --border-hover: rgba(139, 92, 246, 0.7);
    --surface: rgba(255, 255, 255, 0.08);
    --surface2: rgba(255, 255, 255, 0.14);
  }

  .nav-link {
    font-size: 10px;
  }

  .sec-sub,
  .h-desc,
  .lab-desc,
  .popup-desc,
  .footer-desc {
    color: #cbd5e1;
  }

  .card,
  .quiz-card,
  .lab-card,
  .vote-box,
  .df-game,
  .scenario-card {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }

  .btn-p {
    font-weight: 900;
  }

  .q-opt,
  .vote-btn {
    border-width: 2px;
  }

  .h-card-ai,
  .h-card-ml,
  .h-card-dl {
    border-width: 2px;
  }

  .venn-ai {
    border-width: 3px;
  }

  .venn-ml {
    border-width: 3px;
  }

  .venn-dl {
    border-width: 3px;
  }

  /* Stronger glow effects */
  .hero-title {
    filter: drop-shadow(0 0 60px rgba(139, 92, 246, 0.5));
  }

  #scroll-prog {
    height: 4px;
  }

  .xp-val {
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.7);
  }

  /* Links must be clearly distinguishable */
  .nav-link:hover,
  .footer-link:hover {
    text-decoration: underline;
  }
}


/* ══════════════════════════════════════════════════════════
   FORCED COLORS (Windows High Contrast)
   ══════════════════════════════════════════════════════════ */
@media (forced-colors: active) {
  .btn-p {
    background: ButtonFace;
    color: ButtonText;
    border: 2px solid ButtonText;
  }

  .card,
  .quiz-card,
  .lab-card {
    border: 2px solid CanvasText;
  }

  .nav-link {
    color: LinkText;
  }

  .hero-title {
    -webkit-text-fill-color: unset;
    color: CanvasText;
    filter: none;
  }

  #cur,
  #cur2 {
    display: none;
  }

  .stars {
    display: none;
  }
}


/* ══════════════════════════════════════════════════════════
   COLOR SCHEME META
   ══════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}


