:root {
  --bg: #0b1220;
  --text: #ffffff;
  --primary: #7c3aed;
  --accent: #06b6d4;

  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Light mode */
body.light-mode {
  --bg: #f8fafc;
  --text: #0f172a;
  --primary: #2563eb;
  --accent: #22c55e;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(0, 0, 0, 0.10);
}

/* Background Glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.25), transparent 50%),
              radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.20), transparent 50%);
  z-index: -1;
}

body.light-mode::before {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 50%),
              radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.18), transparent 50%);
}

/* Navbar */
.glass-navbar {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
}

.navbar-brand .brand-text {
  font-weight: 900;
  font-size: 1.3rem;
}

.navbar-brand .brand-id {
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--primary);
}

.nav-link {
  font-weight: 700;
  opacity: 0.75;
  color: var(--text) !important;
}

.nav-link.active {
  opacity: 1;
  color: var(--primary) !important;
}

/* Buttons */
.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
}

.btn-outline-custom {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s;
}

.btn-outline-custom:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary-custom {
  background: var(--primary);
  border: none;
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s;
}

.btn-primary-custom:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Header */
.lesson-header {
  padding: 70px 0 40px;
}

.lesson-title {
  font-size: 2.6rem;
  font-weight: 900;
}

.lesson-subtitle {
  opacity: 0.8;
  max-width: 780px;
  margin: 0 auto;
}

.lesson-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Lesson Content */
.lesson-content {
  padding: 30px 0 90px;
}

.lesson-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 25px;
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
}

.lesson-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.30);
}

body.light-mode .lesson-card:hover {
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.18);
}

.card-title {
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.card-desc {
  opacity: 0.85;
  font-size: 0.95rem;
}

.content-title {
  font-weight: 900;
  margin-bottom: 14px;
}

.content-list {
  margin-top: 12px;
  padding-left: 18px;
}

.content-list li {
  margin-bottom: 10px;
  opacity: 0.9;
}

/* Highlight Box */
.highlight-box {
  border-left: 4px solid var(--primary);
  background: rgba(124, 58, 237, 0.10);
  padding: 14px 16px;
  border-radius: 14px;
}

/* Code Box */
.code-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  overflow-x: auto;
}

body.light-mode .code-box {
  background: rgba(255, 255, 255, 0.65);
}

.code-box pre {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

/* Footer */
.footer-section {
  padding: 30px 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.dev-link {
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
}

.dev-link:hover {
  color: var(--accent);
}

/* Scroll To Top */
.scroll-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 1.3rem;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  transition: 0.25s;
  z-index: 999;
}

.scroll-top-btn:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}