/*
FILE:
 /core/styles/theme.css

FINALIZED THEME SYSTEM
- V1 immersive atmosphere restoration
- Educational light/dark orchestration
- Soft reading contrast system
- Malayalam-safe readability
- Glass hierarchy stabilization
- Module-ready visual foundation
*/

/* ================= LIGHT THEME ================= */

.theme-light{

  --bg-primary:#f4f8ff;

  --bg-secondary:#ffffff;

  --bg-card:
    rgba(255,255,255,.82);

  --bg-card-strong:
    rgba(255,255,255,.92);

  --bg-soft:
    rgba(255,255,255,.56);

  --text-primary:#0f172a;

  --text-secondary:#64748b;

  --text-soft:#94a3b8;

  --border:
    rgba(0,87,255,.08);

  --border-strong:
    rgba(255,255,255,.82);

  --blue:#0057ff;

  --cyan:#1bb8ff;

  --success:#10b981;

  --warning:#f59e0b;

  --danger:#ef4444;

  --shadow:
    0 18px 44px rgba(0,0,0,.06);

  --shadow-hover:
    0 24px 60px rgba(0,87,255,.12);

  --glass-blur:18px;
}

/* ================= DARK THEME ================= */

.theme-dark{

  --bg-primary:#07111f;

  --bg-secondary:#0f172a;

  --bg-card:
    rgba(15,23,42,.76);

  --bg-card-strong:
    rgba(15,23,42,.88);

  --bg-soft:
    rgba(255,255,255,.04);

  --text-primary:#f8fafc;

  --text-secondary:#94a3b8;

  --text-soft:#64748b;

  --border:
    rgba(255,255,255,.06);

  --border-strong:
    rgba(255,255,255,.08);

  --blue:#3b82f6;

  --cyan:#38bdf8;

  --success:#34d399;

  --warning:#fbbf24;

  --danger:#f87171;

  --shadow:
    0 20px 54px rgba(0,0,0,.34);

  --shadow-hover:
    0 26px 70px rgba(0,0,0,.42);

  --glass-blur:20px;
}

/* ================= BODY ================= */

body{

  background:
    var(--bg-primary);

  color:
    var(--text-primary);

  transition:
    background .22s ease,
    color .22s ease;
}

/* ================= DARK BODY ================= */

.theme-dark body{

  background:

    radial-gradient(
      circle at top left,
      rgba(59,130,246,.12),
      transparent 28%
    ),

    radial-gradient(
      circle at bottom right,
      rgba(56,189,248,.10),
      transparent 28%
    ),

    linear-gradient(
      135deg,
      #07111f,
      #0f172a
    );
}

/* ================= GLASS ================= */

.glass{

  background:
    var(--bg-card);

  backdrop-filter:
    blur(var(--glass-blur));

  border:
    1px solid var(--border-strong);

  box-shadow:
    var(--shadow);
}

/* ================= CARD ================= */

.card{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);

  box-shadow:
    var(--shadow);
}

/* ================= CARD HOVER ================= */

.card:hover{

  box-shadow:
    var(--shadow-hover);
}

/* ================= TEXT ================= */

.text-light{

  color:
    var(--text-secondary);
}

.section-title,
.section-heading,
.subject-name,
.module-name,
.hero-title,
.auth-title,
.nav-title,
.dashboard-title,
.dashboard-hero-title{

  color:
    var(--text-primary);
}

/* ================= PARAGRAPH ================= */

p,
.subject-description,
.module-description,
.dashboard-subject-description,
.dashboard-hero-text,
.auth-subtitle{

  color:
    var(--text-secondary);
}

/* ================= BUTTON ================= */

.btn-outline{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);

  color:
    var(--blue);
}

/* ================= THEME TOGGLE ================= */

.theme-toggle{

  width:46px;
  height:46px;

  border:none;

  outline:none;

  cursor:pointer;

  display:flex;

  align-items:center;

  justify-content:center;

  border-radius:16px;

  font-size:20px;

  background:
    var(--bg-card);

  color:
    var(--text-primary);

  border:
    1px solid var(--border);

  box-shadow:
    var(--shadow);

  transition:
    transform .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.theme-toggle:hover{

  transform:
    translateY(-1px);
}

/* ================= INPUT ================= */

.input-group{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);
}

.input-group input{

  background:transparent;

  color:
    var(--text-primary);
}

.input-group input::placeholder{

  color:
    var(--text-soft);
}

/* ================= OPTIONS ================= */

.option-btn{

  background:
    var(--bg-card);

  color:
    var(--text-primary);

  border:
    1px solid var(--border);
}

.option-btn:hover{

  border-color:
    rgba(0,87,255,.16);
}

/* ================= PROGRESS ================= */

.progress-bar{

  background:
    rgba(148,163,184,.16);
}

.progress-fill{

  background:
    linear-gradient(
      90deg,
      var(--blue),
      var(--cyan)
    );
}

/* ================= NAVBAR ================= */

.top-navbar{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);
}

/* ================= HERO ================= */

.hero-card,
.dashboard-hero{

  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--cyan)
    );
}

/* ================= LANGUAGE ================= */

.language-toggle{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);
}

/* ================= FOOTER ================= */

.site-footer{

  background:
    var(--bg-soft);

  border-top:
    1px solid var(--border);
}

/* ================= MODULE SURFACES ================= */

.subject-card,
.module-card,
.question-card,
.review-card,
.dashboard-subject-card,
.dashboard-summary-card{

  background:
    var(--bg-card);

  border:
    1px solid var(--border);
}

/* ================= DARK MODE SPECIAL FIXES ================= */

.theme-dark .option-btn:hover{

  background:
    rgba(255,255,255,.04);
}

.theme-dark .question-card{

  background:
    rgba(255,255,255,.03);
}

.theme-dark .review-option{

  background:
    rgba(255,255,255,.02);
}

.theme-dark .language-toggle{

  background:
    rgba(15,23,42,.88);
}

.theme-dark .dashboard-quote{

  background:
    rgba(255,255,255,.05);

  border:
    1px solid rgba(255,255,255,.06);
}

.theme-dark .nav-back-btn{

  background:
    rgba(59,130,246,.12);

  color:#7dd3fc;
}

/* ================= ORBS ================= */

.theme-dark .orb-blue{
  opacity:.16;
}

.theme-dark .orb-cyan{
  opacity:.14;
}

/* ================= SCROLLBAR ================= */

.theme-dark ::-webkit-scrollbar-thumb{

  background:
    rgba(148,163,184,.18);
}

/* ================= MOBILE ================= */

@media(max-width:768px){

  .theme-toggle{

    width:42px;
    height:42px;

    border-radius:14px;

    font-size:18px;
  }
}