/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */
:root {
  --bg: #020408;
  --bg2: #060a14;
  --surface: rgba(10, 16, 32, 0.7);
  --surface2: rgba(16, 24, 48, 0.5);
  --surface3: rgba(20, 30, 56, 0.4);
  --line: rgba(100, 140, 220, 0.08);
  --line-hover: rgba(139, 92, 246, 0.2);
  --muted: #6b7fa0;
  --text: #e4eaf4;
  --text2: #f0f4fc;
  --purple: #8b5cf6;
  --purple2: #a78bfa;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --blue: #06b6d4;
  --blue-dim: rgba(6, 182, 212, 0.15);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 25px 60px rgba(0,0,0,0.5);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --primary: #8b5cf6;
  --glass-bg: rgba(10, 16, 32, 0.6);
  --glass-border: rgba(120, 150, 220, 0.08);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ==========================================================================
   2. Global Reset & Typography
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #020408;
  color: var(--text);
  font-family: 'Inter', Cairo, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  animation: bgFloat 15s ease-in-out infinite alternate;
}

body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  top: -220px;
  left: -180px;
}

body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15), transparent 70%);
  bottom: -220px;
  right: -120px;
  animation-delay: -7s;
  animation-direction: alternate-reverse;
  animation-duration: 18s;
}

@keyframes bgFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -40px) scale(1.2); }
}

button, input, select, textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

/* ==========================================================================
   3. Container & Layout Utilities
   ========================================================================== */
.container {
  width: min(1280px, calc(100% - 48px));
  margin: auto;
}

/* ==========================================================================
   4. Top Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  background: rgba(6, 10, 20, 0.7);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom: 1px solid rgba(120, 150, 220, 0.06);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.nav-shell {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 140px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, #8b5cf6, #06b6d4);
  position: relative;
  box-shadow: 0 0 32px rgba(139, 92, 246, 0.55), 0 0 64px rgba(139, 92, 246, 0.18);
  animation: logoRing 4s ease-in-out infinite;
}

@keyframes logoRing {
  0%, 100% { box-shadow: 0 0 32px rgba(139, 92, 246, 0.55), 0 0 64px rgba(139, 92, 246, 0.18); }
  50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.7), 0 0 80px rgba(139, 92, 246, 0.25); }
}

.brand-logo::before,
.brand-logo::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.brand-logo::before {
  width: 23px;
  height: 10px;
  left: 8px;
  top: 16px;
  transform: rotate(-18deg);
}

.brand-logo::after {
  width: 6px;
  height: 6px;
  right: 7px;
  top: 9px;
  background: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.brand b {
  font-size: 28px;
  line-height: 1;
}

.brand small {
  display: block;
  font: 600 10px Inter;
  letter-spacing: 6px;
  color: #a78bfa;
  margin-top: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  color: #6b7fa0;
}

.nav-links a {
  padding: 25px 0;
  position: relative;
  font-size: 15px;
  transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
  color: #ffffff;
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.nav-links a::after {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
}

.user-name-hdr {
  font-size: 13px;
  font-weight: 600;
  color: #b8c4d8;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   5. Mobile Menu Drawer
   ========================================================================== */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border-left: 1px solid rgba(120, 150, 220, 0.06);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mobile-menu-drawer.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 4, 8, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.mobile-drawer-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

.mobile-drawer-close:hover {
  color: white;
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-drawer-links a {
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s;
}

.mobile-drawer-links a:hover,
.mobile-drawer-links a.active {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

.mobile-drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-toggle {
  display: none;
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */
.btn {
  border: 1px solid rgba(100, 140, 220, 0.1);
  color: white;
  background: rgba(10, 16, 32, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 14px 24px;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.18);
}

.btn.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none;
  color: white;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}

.btn.primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.55s;
}

.btn.primary:hover::before {
  left: 100%;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(139, 92, 246, 0.55), 0 8px 24px rgba(139, 92, 246, 0.35);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(100, 140, 220, 0.1);
  color: var(--muted);
}

.btn.ghost:hover {
  border-color: var(--purple);
  color: white;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.18);
}

.btn.small {
  padding: 7px 16px;
  font-size: 12px;
  border-radius: 10px;
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.icon-btn {
  border: 1px solid rgba(100, 140, 220, 0.1);
  color: white;
  background: rgba(10, 16, 32, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.18);
}

/* ==========================================================================
   7. Cards & Panels
   ========================================================================== */
.card {
  border-radius: 22px;
  padding: 36px 28px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 16, 32, 0.55);
  border: 1px solid rgba(120, 150, 220, 0.06) !important;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(139, 92, 246, 0.4) !important;
  box-shadow: 0 0 56px rgba(139, 92, 246, 0.22), 0 28px 56px rgba(0, 0, 0, 0.45);
}

.panel {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 32px;
}

.path-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.path-card h3 {
  margin: 10px 0 4px;
  font-size: 1.1rem;
}

.path-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.path-card .meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.path-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(120, 150, 220, 0.06);
}

.art-platform {
  position: relative;
}

/* ==========================================================================
   8. Course Thumbnails
   ========================================================================== */
.course-thumb {
  width: 100%;
  height: 170px;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.course-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.2) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
}

.course-thumb .thumb-icon {
  font-size: 52px;
  z-index: 1;
  filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.35));
}

/* ==========================================================================
   9. Course Cards with Level Badges
   ========================================================================== */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 22px;
  font-size: 11px;
  font-weight: 600;
}

.level-badge.beginner {
  color: #4ade80;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.level-badge.intermediate {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.level-badge.advanced {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.student-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.enrolled-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 22px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   10. Grid Layouts
   ========================================================================== */
.grid {
  display: grid;
  gap: 28px;
}

.path-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.path-grid .card,
.dash-grid .card {
  animation: cardFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.path-grid .card:nth-child(1) { animation-delay: 0.05s; }
.path-grid .card:nth-child(2) { animation-delay: 0.1s; }
.path-grid .card:nth-child(3) { animation-delay: 0.15s; }
.path-grid .card:nth-child(4) { animation-delay: 0.2s; }
.path-grid .card:nth-child(5) { animation-delay: 0.25s; }
.path-grid .card:nth-child(6) { animation-delay: 0.3s; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

/* ==========================================================================
   11. Form Elements
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12), 0 0 24px rgba(139, 92, 246, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* ==========================================================================
   12. Badges & Status
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 22px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple2);
  background: rgba(139, 92, 246, 0.08);
}

.badge-green {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
}

.badge-amber {
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

.badge-red {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

.status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 600;
}

.status.published {
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.status.draft {
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

/* ==========================================================================
   13. Search
   ========================================================================== */
.search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(100, 140, 220, 0.08);
  border-radius: 18px;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search:focus-within {
  border-color: rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.25), 0 0 56px rgba(139, 92, 246, 0.1);
}

.search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
}

.search button {
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.3);
}

.search button:hover {
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.45);
  transform: translateY(-1px);
}

/* ==========================================================================
   14. Filters
   ========================================================================== */
.filters {
  display: flex;
  gap: 10px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.filters button {
  padding: 10px 20px;
  border: 1px solid rgba(100, 140, 220, 0.08);
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.45);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
}

.filters button:hover {
  border-color: rgba(139, 92, 246, 0.4);
  color: white;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.12);
}

.filters button.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.15));
  border-color: rgba(139, 92, 246, 0.5);
  color: white;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.22);
}

/* Sort Bar */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sort-bar select {
  padding: 10px 16px;
  border: 1px solid rgba(100, 140, 220, 0.08);
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.sort-bar .result-count {
  font-size: 13px;
  color: var(--muted);
  margin-right: auto;
}

/* ==========================================================================
   15. Hero Section
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 3.6rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 14px 0;
}

.hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple2), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--purple2);
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
}

.planet {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8b5cf6, #3b0f7a, #0b0620);
  box-shadow: 0 0 90px rgba(139, 92, 246, 0.5), 0 0 140px rgba(139, 92, 246, 0.18), inset 0 0 35px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: pulsePlanet 8s ease-in-out infinite;
}

.float-card {
  position: absolute;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid rgba(120, 150, 220, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 16px 22px;
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45);
}

.float-card b {
  display: block;
  font-size: 24px;
  color: var(--purple2);
}

.float-card span {
  font-size: 12px;
  color: var(--muted);
}

.float-card.one {
  top: 20%;
  right: 0;
  animation: floatY 4s ease-in-out infinite;
}

.float-card.two {
  bottom: 25%;
  left: 0;
  animation: floatY 4.5s ease-in-out infinite 0.5s;
}

.float-card.three {
  top: 10%;
  left: 20%;
  animation: floatY 5s ease-in-out infinite 1s;
}

/* ==========================================================================
   16. Stats
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 36px 0;
}

.stat {
  text-align: center;
  padding: 32px 24px;
  border-radius: 22px;
  background: rgba(10, 16, 32, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(120, 150, 220, 0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 48px rgba(139, 92, 246, 0.18);
  transform: translateY(-6px);
}

.stat b {
  display: block;
  font-size: 2.2rem;
  color: var(--purple2);
}

.stat span {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* ==========================================================================
   17. Progress Bars
   ========================================================================== */
.progress {
  height: 10px;
  background: rgba(16, 24, 48, 0.6);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 10px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.progress span::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: shimmer 2s ease-in-out infinite;
  background-size: 200% 100%;
}

.ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--purple) calc(var(--p, 0) * 1%), rgba(16, 24, 48, 0.6) 0);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.18);
}

.ring::before {
  content: "";
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(8, 12, 24, 0.88);
  position: absolute;
}

.ring b {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 800;
}

/* ==========================================================================
   18. KPIs
   ========================================================================== */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px;
}

.kpi {
  padding: 32px 24px;
  text-align: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(10, 16, 32, 0.55), rgba(16, 24, 48, 0.4));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(120, 150, 220, 0.06);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.kpi:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 32px rgba(139, 92, 246, 0.14);
}

.kpi span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.kpi b {
  font-size: 30px;
  background: linear-gradient(135deg, var(--purple2), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kpi-icon {
  font-size: 30px;
  margin-bottom: 10px;
  display: block;
}

/* ==========================================================================
   19. Section Heads
   ========================================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.section-head a {
  color: var(--purple2);
  font-size: 14px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.page-head .eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--purple2);
  margin-bottom: 8px;
  font-weight: 600;
}

.page-head h1 {
  margin: 0;
  font-size: 2.1rem;
}

.page-head p {
  color: var(--muted);
  margin-top: 6px;
}

/* ==========================================================================
   20. Dashboard Layout
   ========================================================================== */
.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  min-height: calc(100vh - 84px);
}

.side-nav {
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid rgba(120, 150, 220, 0.06);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 84px;
  height: calc(100vh - 84px);
  overflow-y: auto;
}

.side-nav .brand {
  padding: 10px;
  margin-bottom: 20px;
}

.side-nav a {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.side-nav a:hover {
  background: rgba(139, 92, 246, 0.1);
  color: white;
}

.side-nav a.active {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.side-nav button {
  margin-top: auto;
}

.dash-main {
  padding: 36px 40px;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

/* ==========================================================================
   21. Lesson Layout
   ========================================================================== */
.lesson-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 0;
  min-height: calc(100vh - 84px);
}

.lesson-sidebar {
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid rgba(120, 150, 220, 0.06);
  padding: 28px 18px;
  position: sticky;
  top: 84px;
  height: calc(100vh - 84px);
  overflow-y: auto;
}

.lesson-sidebar h3 {
  font-size: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(120, 150, 220, 0.06);
}

.lesson-main {
  padding: 0;
  min-width: 0;
}

/* ==========================================================================
   22. Lesson Sidebar
   ========================================================================== */
.sidebar-course-info {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(120, 150, 220, 0.06);
}

.sidebar-course-info h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.sidebar-progress {
  margin-top: 10px;
}

.sidebar-progress-bar {
  height: 6px;
  background: rgba(100, 140, 220, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sidebar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--green));
  border-radius: 12px;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

.sidebar-progress span {
  font-size: 11px;
  color: var(--muted);
}

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-nav-item span:first-child {
  flex-shrink: 0;
}

.lesson-nav-item span:nth-child(2) {
  flex: 1;
}

.lesson-nav-item small {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
}

.lesson-nav-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(100, 140, 220, 0.1);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.lesson-nav-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: white;
}

.lesson-nav-item.active {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.08);
}

.lesson-nav-item.active .lesson-nav-num {
  background: var(--purple);
  color: white;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}

.lesson-nav-item.done .lesson-nav-num {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

/* ==========================================================================
   23. Video Container
   ========================================================================== */
.video {
  background: #000;
  border-radius: 0;
  aspect-ratio: unset !important;
  overflow: visible !important;
  display: block !important;
  position: relative;
}

.video::before {
  display: none !important;
}

#youtubePlayer {
  aspect-ratio: 16/9;
  width: 100%;
  display: block;
}

.video-buffering {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
  pointer-events: none;
}

.video-buffering.show {
  display: grid;
}

.video-buffering::after {
  content: "";
  width: 52px;
  height: 52px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.kb-overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.kb-overlay.show {
  display: grid;
  opacity: 1;
}

.kb-overlay span {
  font-size: 52px;
  color: white;
  font-weight: 800;
  text-shadow: 0 4px 24px rgba(139, 92, 246, 0.55);
}

/* ==========================================================================
   24. Video Controls
   ========================================================================== */
.video-controls {
  background: linear-gradient(180deg, rgba(4, 6, 14, 0.92), rgba(4, 6, 14, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 18px;
  border-top: 1px solid rgba(120, 150, 220, 0.06);
}

.video-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow: visible;
}

.vc-btn {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
  white-space: nowrap;
  line-height: 1;
  position: relative;
}

.vc-btn:hover {
  background: rgba(139, 92, 246, 0.18);
}

.vc-btn:active {
  transform: scale(0.92);
}

.vc-btn[title]::before {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 10, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 10;
  border: 1px solid rgba(120, 150, 220, 0.08);
}

.vc-btn:hover[title]::before {
  opacity: 1;
}

.vc-speed {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 12px;
  border-radius: 8px;
}

.vc-save {
  font-size: 11px;
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 14px;
  border-radius: 8px;
}

.vc-save:hover {
  background: rgba(16, 185, 129, 0.15);
}

.vc-fullscreen {
  font-size: 13px;
}

.vc-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc-volume input[type="range"] {
  width: 65px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.vc-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.video-seek {
  flex: 1;
  min-width: 80px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple) var(--seek-pct, 0%), rgba(255, 255, 255, 0.12) var(--seek-pct, 0%));
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  direction: ltr;
  transition: height 0.15s;
}

.video-seek:hover {
  height: 8px;
}

.video-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.65);
  border: 2px solid white;
  opacity: 0;
  transition: opacity 0.15s;
}

.video-seek:hover::-webkit-slider-thumb {
  opacity: 1;
}

.video-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.65);
  border: 2px solid white;
}

.video-time-label {
  font-size: 12px;
  color: #6b7fa0;
  font-family: "Inter", monospace;
  min-width: 96px;
  text-align: center;
}

/* ==========================================================================
   25. Video Progress Bar
   ========================================================================== */
.video-progress {
  height: 5px;
  background: rgba(100, 140, 220, 0.1);
  width: 100%;
  transition: height 0.2s;
}

.video-progress:hover {
  height: 7px;
}

.video-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 4px 4px 0;
  position: relative;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.video-progress-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65);
}

/* ==========================================================================
   26. Video Keyboard Hints
   ========================================================================== */
.video-kb-hint {
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 6, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(120, 150, 220, 0.08);
  display: flex;
  gap: 14px;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.video:hover .video-kb-hint {
  opacity: 1;
}

/* ==========================================================================
   27. Lesson Content
   ========================================================================== */
.lesson-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 36px;
}

.lesson-title h1 {
  margin: 0;
  font-size: 1.5rem;
}

.lesson-title p {
  color: var(--muted);
  margin-top: 6px;
}

.lesson-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.lesson-breadcrumb a {
  color: var(--purple2);
}

.lesson-breadcrumb a:hover {
  text-decoration: underline;
}

.lesson-breadcrumb span {
  margin: 0 8px;
}

.lesson-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.lesson-dur-badge {
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid rgba(100, 140, 220, 0.08);
  border-radius: 22px;
  color: var(--muted);
}

.lesson-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-notes {
  padding: 32px 36px;
}

.lesson-notes textarea {
  width: 100%;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  resize: vertical;
  font-size: 14px;
  line-height: 1.85;
}

.lesson-progress-top {
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 150, 220, 0.06);
  padding: 16px 28px;
}

.lesson-progress-bar {
  height: 7px;
  background: rgba(100, 140, 220, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 12px;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

.lesson-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   28. Toast Notifications
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(124, 58, 237, 0.92));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  padding: 18px 36px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.45), 0 0 24px rgba(139, 92, 246, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
  box-shadow: 0 12px 48px rgba(16, 185, 129, 0.4), 0 0 24px rgba(16, 185, 129, 0.12);
}

.toast-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.92));
  box-shadow: 0 12px 48px rgba(239, 68, 68, 0.4), 0 0 24px rgba(239, 68, 68, 0.12);
}

.toast-info {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.92), rgba(37, 99, 235, 0.92));
  box-shadow: 0 12px 48px rgba(6, 182, 212, 0.4), 0 0 24px rgba(6, 182, 212, 0.12);
}

/* ==========================================================================
   29. Back to Top
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.45), 0 0 18px rgba(139, 92, 246, 0.22);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.6), 0 0 28px rgba(139, 92, 246, 0.35);
}

/* ==========================================================================
   30. Mobile Bottom Nav
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-top: 1px solid rgba(120, 150, 220, 0.06);
  z-index: 90;
  padding: 12px 0 8px;
  box-shadow: 0 -6px 36px rgba(0, 0, 0, 0.45);
}

.mobile-bottom-nav .nav-items {
  display: flex;
  justify-content: space-around;
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.mobile-bottom-nav .nav-item.active {
  color: var(--purple2);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

.mobile-bottom-nav .nav-item span:first-child {
  font-size: 22px;
}

/* ==========================================================================
   31. Accordion
   ========================================================================== */
.accordion-item {
  margin-bottom: 10px;
}

.accordion-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border: none;
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  border-radius: 14px;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s;
  border: 1px solid rgba(120, 150, 220, 0.06);
}

.accordion-btn:hover {
  background: rgba(16, 24, 48, 0.6);
  border-color: rgba(120, 150, 220, 0.1);
}

.accordion-btn span {
  color: var(--muted);
  font-size: 13px;
}

.lessons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}

.lessons.hide {
  display: none;
}

.lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-row:hover {
  background: rgba(139, 92, 246, 0.08);
  color: white;
}

.lesson-row small {
  color: var(--muted);
}

/* ==========================================================================
   32. Road Items
   ========================================================================== */
.roadmap {
  padding: 36px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.road-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(100, 140, 220, 0.06);
}

.road-item:last-child {
  border-bottom: none;
}

.road-number {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   33. Tables
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(100, 140, 220, 0.08);
  text-align: right;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table tbody tr:hover {
  background: rgba(139, 92, 246, 0.04);
}

.table-wrap {
  overflow: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-wrap th,
.table-wrap td {
  padding: 16px;
  border-bottom: 1px solid rgba(100, 140, 220, 0.08);
  text-align: right;
}

.table-wrap th {
  color: #6b7fa0;
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap table {
  min-width: 760px;
}

/* ==========================================================================
   34. Quiz
   ========================================================================== */
.quiz-shell {
  max-width: 800px;
  margin: 0 auto;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.question-card {
  margin-bottom: 24px;
}

.question-card h3 {
  margin-bottom: 18px;
  font-size: 1rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin: 8px 0;
  border: 1.5px solid rgba(100, 140, 220, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  background: rgba(10, 16, 32, 0.4);
}

.option:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.option.selected {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.14);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}

.option input[type="radio"] {
  accent-color: var(--purple);
}

.result {
  text-align: center;
  padding: 56px 36px;
}

.result-icon {
  font-size: 72px;
  margin-bottom: 18px;
}

.result-score {
  font-size: 5.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple2), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 18px 0;
}

/* ==========================================================================
   35. Certificates
   ========================================================================== */
.certificate-grid {
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.certificate-card {
  display: flex;
  gap: 18px;
  padding: 24px;
}

.cert-preview {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  flex-shrink: 0;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.3);
}

.cert-premium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(10, 16, 32, 0.7), rgba(6, 10, 20, 0.8));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(212, 175, 55, 0.22);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.cert-premium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.cert-premium-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 20px 56px rgba(212, 175, 55, 0.1), 0 10px 28px rgba(0, 0, 0, 0.45);
}

.cert-premium-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe066, #d4af37 60%, #a37b14);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 20px rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 7px/1 Inter, sans-serif;
  color: #3b2803;
  letter-spacing: 1px;
  animation: certBadgePulse 2.5s ease-in-out infinite;
}

@keyframes certBadgePulse {
  0%, 100% { box-shadow: 0 2px 20px rgba(212, 175, 55, 0.45); }
  50% { box-shadow: 0 2px 30px rgba(212, 175, 55, 0.7), 0 0 40px rgba(212, 175, 55, 0.2); }
}

.cert-premium-body {
  margin-top: 58px;
  position: relative;
  z-index: 1;
}

.cert-premium-body h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--text);
}

/* ==========================================================================
   36. Verify
   ========================================================================== */
.verify-box {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 56px;
}

.verify-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  margin-top: 32px;
  text-align: right;
}

.qr-img {
  width: 150px;
  height: 150px;
  background: #fff;
  padding: 8px;
  border-radius: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   37. Career & Skills
   ========================================================================== */
.career-gauge {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 28px;
  padding: 32px;
  margin-top: 24px;
}

.skill-list {
  display: grid;
  gap: 16px;
}

.skill-row {
  display: grid;
  grid-template-columns: 220px 1fr 60px;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.skill-row small {
  display: block;
  color: var(--muted);
}

.skill-group {
  padding: 28px;
  margin-bottom: 20px;
}

.skill-nodes {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.skill-node {
  min-width: 200px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(100, 140, 220, 0.08);
  background: rgba(10, 16, 32, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  transition: border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-node:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.1);
}

.skill-node > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.skill-node small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.skill-node.mastered {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}

.skill-node.mastered > span {
  background: rgba(16, 185, 129, 0.15);
  color: #86efac;
}

.project-card {
  padding: 26px;
}

.achievement {
  text-align: center;
  padding: 26px;
}

.achievement > div {
  font-size: 36px;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 28px;
  padding: 36px;
  margin-top: 36px;
}

.portfolio-avatar {
  width: 95px;
  height: 95px;
  font-size: 36px;
}

/* ==========================================================================
   38. Notifications
   ========================================================================== */
.notice-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(100, 140, 220, 0.06);
}

.notice-item p {
  margin: 6px 0;
  color: var(--muted);
}

.notice-item.unread b,
.notification-row.unread h3 {
  color: #c4b5fd;
}

.notification-list {
  display: grid;
  gap: 14px;
}

.notification-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.notification-row.unread {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12) inset;
}

.notification-row p {
  color: var(--muted);
}

.notification-row small {
  color: var(--muted);
}

/* ==========================================================================
   39. Profile
   ========================================================================== */
.profile-form {
  max-width: 900px;
}

/* ==========================================================================
   40. Legal Pages
   ========================================================================== */
.legal-page {
  max-width: 1000px;
}

.legal-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(120, 150, 220, 0.06);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
}

.legal-section p {
  line-height: 2;
  color: var(--muted);
}

/* ==========================================================================
   41. Auth Pages
   ========================================================================== */
.auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 48px 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 56px 48px;
}

.auth-card h1 {
  margin: 24px 0 10px;
  font-size: 1.7rem;
}

.auth-card .lead {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 14px;
}

/* ==========================================================================
   42. Empty States
   ========================================================================== */
.empty {
  text-align: center;
  padding: 56px 28px;
  color: var(--muted);
  font-size: 15px;
}

.empty h1 {
  font-size: 5rem;
  margin: 0 0 14px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty a {
  color: var(--purple2);
}

/* ==========================================================================
   43. Footer
   ========================================================================== */
.footer {
  border-top: 1px solid rgba(120, 150, 220, 0.06);
  padding: 40px 0;
  font-size: 13px;
  color: var(--muted);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 48px;
}

.footer.hide {
  display: none;
}

.footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 0.3s;
}

.footer a:hover {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

/* ==========================================================================
   44. Utility Classes
   ========================================================================== */
.muted {
  color: var(--muted);
}

.hide {
  display: none !important;
}

.danger-text {
  color: #f87171;
}

.mini-checks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.mini-checks span {
  font-size: 12px;
  padding: 7px 14px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.06);
  border-radius: 10px;
  color: #bbf7d0;
}

.check-line {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 15px 0;
  color: var(--muted);
}

.notice {
  padding: 16px 20px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.06);
  border-radius: 16px;
  margin: 20px 0;
  color: #6b7fa0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section {
  padding: 0;
  margin: 56px 0;
}

.course-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 36px;
}

.course-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.35);
}

.path-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  padding: 36px;
}

/* ==========================================================================
   45. Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulsePlanet {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 90px rgba(139, 92, 246, 0.5), 0 0 140px rgba(139, 92, 246, 0.18), inset 0 0 35px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 0 110px rgba(139, 92, 246, 0.6), 0 0 170px rgba(139, 92, 246, 0.22), inset 0 0 35px rgba(0, 0, 0, 0.3);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes celebrationPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.celebration-icon {
  animation: celebrationPop 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.road-item {
  animation: rowSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.road-item:nth-child(1) { animation-delay: 0.05s; }
.road-item:nth-child(2) { animation-delay: 0.1s; }
.road-item:nth-child(3) { animation-delay: 0.15s; }
.road-item:nth-child(4) { animation-delay: 0.2s; }
.road-item:nth-child(5) { animation-delay: 0.25s; }

/* ==========================================================================
   46. Page Transitions
   ========================================================================== */
.page-fade-in {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   47. Focus Ring (Accessibility)
   ========================================================================== */
*:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
}

/* ==========================================================================
   48. Scrollbar Customization
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a78bfa, #8b5cf6);
}

/* ==========================================================================
   49. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1200px) {
  .path-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 14px;
    gap: 10px;
    border-left: none;
    border-bottom: 1px solid rgba(120, 150, 220, 0.06);
  }

  .side-nav .brand {
    display: none;
  }

  .side-nav a {
    font-size: 12px;
    padding: 10px 14px;
  }

  .dash-main {
    padding: 36px 40px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    position: relative;
    height: auto;
    border-left: none;
    border-bottom: 1px solid rgba(120, 150, 220, 0.06);
    max-height: 260px;
  }

  .lesson-title {
    flex-direction: column;
    padding: 24px 20px;
  }

  .lesson-progress-top {
    margin-left: 20px;
    margin-right: 20px;
  }

  .lesson-actions {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-art {
    display: none;
  }

  .mobile-toggle {
    display: grid;
  }

  .nav-links {
    display: none;
  }

  .mobile-bottom-nav {
    display: block;
  }

  body {
    padding-bottom: 74px;
  }

  .notification-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .career-gauge,
  .portfolio-hero {
    grid-template-columns: 1fr;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }

  .skill-node {
    width: 100%;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .user-name-hdr {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .user-name-hdr {
    display: none;
  }
}

@media (max-width: 600px) {
  .path-grid {
    grid-template-columns: 1fr;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .verify-result {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   50. Skeleton Loading
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, rgba(10, 16, 32, 0.5) 25%, rgba(16, 24, 48, 0.4) 50%, rgba(10, 16, 32, 0.5) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 10px;
  min-height: 18px;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 12px;
}

.skeleton-block {
  height: 190px;
  border-radius: 18px;
}

/* ==========================================================================
   51. Particle Canvas Background
   ========================================================================== */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   52. 3D Tilt Cards
   ========================================================================== */
.card-3d {
  perspective: 800px;
  transform-style: preserve-3d;
}

.card-3d-inner {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}

.card-3d-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.22), transparent 60%);
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}

.card-3d:hover .card-3d-inner::after {
  opacity: 1;
}

/* Disable 3D tilt on elements with progress bars inside */
.kpi,
.lesson-row,
.road-item {
  transform: none !important;
}

/* ==========================================================================
   53. Animated Gradient Border Glow
   ========================================================================== */
.glow-card {
  position: relative;
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--glow-angle, 0deg), #8b5cf6, #06b6d4, #10b981, #f59e0b, #8b5cf6);
  opacity: 0;
  transition: opacity 0.45s;
  z-index: 0;
  filter: blur(10px);
}

.glow-card:hover::before {
  opacity: 0.65;
}

.glow-card > * {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   54. Scroll-Triggered Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   55. Activity Heatmap (GitHub-style)
   ========================================================================== */
.heatmap {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 3px;
  direction: ltr;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(16, 24, 48, 0.6);
  transition: background 0.2s, transform 0.2s;
  cursor: default;
}

.heatmap-cell:hover {
  transform: scale(1.6);
  z-index: 5;
  position: relative;
}

.heatmap-cell.lvl-1 { background: rgba(139, 92, 246, 0.22); }
.heatmap-cell.lvl-2 { background: rgba(139, 92, 246, 0.42); }
.heatmap-cell.lvl-3 { background: rgba(139, 92, 246, 0.68); }
.heatmap-cell.lvl-4 { background: var(--purple); box-shadow: 0 0 10px rgba(139, 92, 246, 0.35); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  direction: ltr;
}

.heatmap-legend span {
  display: inline-flex;
}

/* ==========================================================================
   56. Ripple Click Effect
   ========================================================================== */
.ripple-host {
  position: relative;
}

.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.38), transparent 70%);
  transform: scale(0);
  animation: rippleExpand 0.55s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================================================
   57. Confetti Particle System
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   58. SVG Animated Progress Ring
   ========================================================================== */
.svg-ring {
  transform: rotate(-90deg);
}

.svg-ring-bg {
  fill: none;
  stroke: rgba(16, 24, 48, 0.6);
  stroke-width: 6;
}

.svg-ring-fill {
  fill: none;
  stroke: var(--purple);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.45));
}

.svg-ring-center {
  fill: var(--text);
  font-size: 24px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  transform: rotate(90deg);
  transform-origin: center;
}

/* ==========================================================================
   59. Animated Counter Number
   ========================================================================== */
.counter-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   60. Video Chapter Markers
   ========================================================================== */
.chapter-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chapter-marker {
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  background: rgba(139, 92, 246, 0.5);
  border-radius: 2px;
  transition: background 0.2s, box-shadow 0.2s;
}

.chapter-marker:hover {
  background: var(--purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

.chapter-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  margin-bottom: 8px;
  border: 1px solid rgba(120, 150, 220, 0.08);
}

.chapter-marker:hover .chapter-tooltip {
  opacity: 1;
}

/* ==========================================================================
   61. Typing Cursor Effect
   ========================================================================== */
.typing-cursor::after {
  content: '|';
  animation: blinkCursor 0.8s infinite;
  color: var(--purple);
  margin-left: 2px;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   62. Floating Particle Orbs (Hero Enhancement)
   ========================================================================== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  animation: orbFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: var(--purple);
  top: -110px;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 270px;
  height: 270px;
  background: var(--blue);
  bottom: -90px;
  right: 15%;
  animation-delay: -3s;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: var(--green);
  top: 40%;
  left: 60%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -25px) scale(1.15); }
}

/* ==========================================================================
   63. Glassmorphism Enhancements
   ========================================================================== */
.glass-card {
  background: rgba(10, 16, 32, 0.55);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(120, 150, 220, 0.08);
  border-radius: var(--radius);
  transition: border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 36px rgba(139, 92, 246, 0.12), 0 10px 36px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   64. Floating Badge Pulse
   ========================================================================== */
.pulse-badge {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.38); }
  50% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
}

/* ==========================================================================
   65. Staggered Grid Entry
   ========================================================================== */
.stagger-grid > .card,
.stagger-grid > .path-card,
.stagger-grid > article {
  opacity: 0;
  transform: translateY(22px);
  animation: staggerIn 0.45s ease-out forwards;
}

.stagger-grid > .card:nth-child(1),
.stagger-grid > article:nth-child(1) { animation-delay: 0.04s; }
.stagger-grid > .card:nth-child(2),
.stagger-grid > article:nth-child(2) { animation-delay: 0.08s; }
.stagger-grid > .card:nth-child(3),
.stagger-grid > article:nth-child(3) { animation-delay: 0.12s; }
.stagger-grid > .card:nth-child(4),
.stagger-grid > article:nth-child(4) { animation-delay: 0.16s; }
.stagger-grid > .card:nth-child(5),
.stagger-grid > article:nth-child(5) { animation-delay: 0.20s; }
.stagger-grid > .card:nth-child(6),
.stagger-grid > article:nth-child(6) { animation-delay: 0.24s; }
.stagger-grid > .card:nth-child(7),
.stagger-grid > article:nth-child(7) { animation-delay: 0.28s; }
.stagger-grid > .card:nth-child(8),
.stagger-grid > article:nth-child(8) { animation-delay: 0.32s; }
.stagger-grid > .card:nth-child(9),
.stagger-grid > article:nth-child(9) { animation-delay: 0.36s; }

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   66. Smooth Number Flip
   ========================================================================== */
.num-flip {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   67. Hover Spotlight (cards)
   ========================================================================== */
.spotlight-card {
  position: relative;
  overflow: clip;
}

.spotlight-card .spotlight {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 1;
}

.spotlight-card:hover .spotlight {
  opacity: 1;
}

/* ==========================================================================
   68. Scroll Progress Bar
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  z-index: 999;
  transition: width 0.1s linear;
  border-radius: 0 0 0 3px;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.55);
}
