/* ============ Global Reset ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* Links and buttons */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ===========================
   CSS Variables (Themes)
   =========================== */

:root {
  /* Night theme (default) */
  --bg-night: #020617;
  --bg-night-soft: #020617;
  --fg-night: #e5e7eb;
  --muted-night: #9ca3af;
  --accent-night: #38bdf8;
  --accent-strong-night: #0ea5e9;
  --card-bg-night: rgba(15, 23, 42, 0.92);
  --border-subtle-night: rgba(148, 163, 184, 0.28);

  /* Dark theme CSS variables (for night theme) */
  --bg: #050b18;
  --surface: rgba(255, 255, 255, 0.03);
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(0, 200, 255, 0.18);
  --text: #eaf6ff;
  --muted: rgba(234, 246, 255, 0.75);
  --shadow: rgba(0, 0, 0, 0.35);
  --glow: rgba(0, 200, 255, 0.35);
  /* Legacy compatibility */
  --panel: rgba(15, 23, 42, 0.92);

  /* Day theme */
  --bg-day: #f9fafb;
  --fg-day: #020617;
  --muted-day: #6b7280;
  --accent-day: #2563eb;
  --accent-strong-day: #1d4ed8;
  --card-bg-day: rgba(255, 255, 255, 0.92);
  --border-subtle-day: rgba(148, 163, 184, 0.2);

  /* Calm theme */
  --bg-calm: #020617;
  --fg-calm: #e5e7eb;
  --muted-calm: #a5b4fc;
  --accent-calm: #6366f1;
  --accent-strong-calm: #4f46e5;
  --card-bg-calm: rgba(15, 23, 42, 0.95);
  --border-subtle-calm: rgba(129, 140, 248, 0.45);

  /* Colors theme */
  --bg-colors: #020617;
  --fg-colors: #e5e7eb;
  --muted-colors: #cbd5f5;
  --accent-colors: #f97316;
  --accent-strong-colors: #22d3ee;
  --card-bg-colors: rgba(15, 23, 42, 0.96);
  --border-subtle-colors: rgba(248, 250, 252, 0.28);

  /* shared */
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.65);
}

/* Use data-theme on body */

body[data-theme="night"],
body:not([data-theme]) {
  --bg: #050b18;
  --surface: rgba(255, 255, 255, 0.03);
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(0, 200, 255, 0.18);
  --text: #eaf6ff;
  --muted: rgba(234, 246, 255, 0.75);
  --shadow: rgba(0, 0, 0, 0.35);
  --glow: rgba(0, 200, 255, 0.35);
  /* Legacy compatibility */
  --panel: rgba(15, 23, 42, 0.92);
  --bg-soft: var(--bg-night-soft);
  --fg-main: var(--fg-night);
  --accent: var(--accent-night);
  --accent-strong: var(--accent-strong-night);
  --card-bg: var(--card-bg-night);
  --border-subtle: var(--border-subtle-night);
}

body[data-theme="light"] {
  --bg: #edf2f7;
  --surface: rgba(255, 255, 255, 0.75);
  --card: rgba(255, 255, 255, 0.92);
  --border: rgba(0, 140, 255, 0.22);
  --text: #0b1f33;
  --muted: rgba(11, 31, 51, 0.68);
  --shadow: rgba(11, 31, 51, 0.16);
  --glow: rgba(0, 140, 255, 0.20);
  /* Legacy compatibility */
  --panel: rgba(255, 255, 255, 0.92);
  --bg-soft: #eff3ff;
  --fg-main: #0b1f33;
  --accent: var(--accent-day);
  --accent-strong: var(--accent-strong-day);
  --card-bg: rgba(255, 255, 255, 0.92);
  --border-subtle: rgba(0, 140, 255, 0.22);
}

body[data-theme="day"] {
  --bg: var(--bg-day);
  --bg-soft: #eff3ff;
  --fg-main: var(--fg-day);
  --muted: var(--muted-day);
  --accent: var(--accent-day);
  --accent-strong: var(--accent-strong-day);
  --card-bg: var(--card-bg-day);
  --border-subtle: var(--border-subtle-day);
}

/* calm */
body[data-theme="calm"] {
  --bg: var(--bg-calm);
  --bg-soft: #020617;
  --fg-main: var(--fg-calm);
  --muted: var(--muted-calm);
  --accent: var(--accent-calm);
  --accent-strong: var(--accent-strong-calm);
  --card-bg: var(--card-bg-calm);
  --border-subtle: var(--border-subtle-calm);
}

/* colors */
body[data-theme="colors"] {
  --bg: var(--bg-colors);
  --bg-soft: #020617;
  --fg-main: var(--fg-colors);
  --muted: var(--muted-colors);
  --accent: var(--accent-colors);
  --accent-strong: var(--accent-strong-colors);
  --card-bg: var(--card-bg-colors);
  --border-subtle: var(--border-subtle-colors);
}

/* Base body styles */
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol";
  line-height: 1.5;
  background: var(--bg, #050b18) !important;
  background-image: none !important;
  color: var(--text);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* ===========================
   Layout Base
   =========================== */

body[data-page="home"],
body[data-page="quizzes"],
body[data-page="question"],
body[data-page="profile"],
body[data-page="about"],
body[data-page="settings"],
body[data-page="success"],
body[data-page="dashboard"] {
  background: var(--bg, #050b18) !important;
  background-image: none !important;
  color: var(--text);
  overflow-x: hidden;
}

/* Padding for fixed navbar - removed since topbar is no longer used */
main {
  padding-top: 0;
}

/* Container and card styles */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.card {
  background: var(--card, var(--card-bg));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border, var(--border-subtle));
  box-shadow: 0 24px 60px var(--shadow, rgba(15, 23, 42, 0.65));
  padding: 24px;
  color: var(--text);
}

/* ===========================
   Background FX - DISABLED
   All background light effects removed for clean dark background
   =========================== */

.background {
  display: none !important;
}

.bg-gradient,
.bg-blobs,
.bg-grid,
.blob {
  display: none !important;
}
