/* ==========================================================================
   CS229 Stanford Machine Learning - Interactive Learning Platform Stylesheet
   Modern Glassmorphic Dark UI Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #0a0d16;
  --bg-secondary: #0f1422;
  --bg-tertiary: #151b2c;
  --bg-elevated: #1a2238;
  --bg-glass: rgba(18, 24, 40, 0.75);
  --bg-glass-card: rgba(22, 30, 50, 0.65);
  --bg-glass-hover: rgba(30, 41, 68, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-active: rgba(239, 68, 68, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b0f19;

  /* Stanford Cardinal & Vibrant Accents */
  --cardinal: #8c1515;
  --cardinal-light: #b83a4b;
  --cardinal-glow: rgba(184, 58, 75, 0.35);
  
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(229, 62, 62, 0.25);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(at 0% 0%, rgba(140, 21, 21, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 10%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(56, 189, 248, 0.08) 0px, transparent 60%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cardinal-light);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 22, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-badge {
  background: linear-gradient(135deg, var(--cardinal), #c22938);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(140, 21, 21, 0.4);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  padding: 0.45rem 1rem 0.45rem 2.25rem;
  font-size: 0.85rem;
  width: 220px;
  outline: none;
  transition: all var(--transition-normal);
  font-family: var(--font-sans);
}

.search-input:focus {
  width: 290px;
  border-color: var(--border-active);
  background: var(--bg-elevated);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  padding: 3.5rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(140, 21, 21, 0.15);
  border: 1px solid rgba(184, 58, 75, 0.35);
  color: #fca5a5;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 650px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cardinal), #ba263b);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(186, 38, 59, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(186, 38, 59, 0.6);
  background: linear-gradient(135deg, #a31c1c, #cf2e45);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Stats Card / Progress Hub */
.progress-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cardinal), var(--accent-indigo), var(--accent-blue));
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.progress-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-percent {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cardinal), var(--accent-rose), var(--accent-blue));
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-item {
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 0.9rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-rose);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.filter-pill.active {
  background: var(--cardinal);
  color: #ffffff;
  border-color: var(--cardinal-light);
  box-shadow: 0 2px 10px rgba(140, 21, 21, 0.4);
}

/* Lecture Cards Grid */
.lectures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.lecture-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.lecture-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  background: var(--bg-glass-hover);
  box-shadow: var(--shadow-md);
}

.lecture-card.completed {
  border-left: 4px solid var(--accent-emerald);
}

.lecture-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.lecture-num {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
}

.lecture-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lecture-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.lecture-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.lecture-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.topic-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lecture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.lecture-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.complete-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
}

.complete-check input {
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

/* Interactive Playground Section */
.playground-section {
  margin: 4rem 0;
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.playground-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.playground-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playground-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.playground-tab.active {
  color: #fff;
  background: rgba(140, 21, 21, 0.25);
  border: 1px solid rgba(184, 58, 75, 0.4);
}

.playground-canvas-wrap {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.canvas-container {
  background: #070910;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.canvas-container canvas {
  display: block;
  width: 100%;
  height: 420px;
  cursor: crosshair;
}

.canvas-controls {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.control-val {
  font-family: var(--font-mono);
  color: var(--accent-blue);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cardinal-light);
}

.btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.math-preview {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Problem Sets Hub */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.ps-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-normal);
}

.ps-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ps-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.ps-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ps-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.file-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.file-type-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.solutions-accordion {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.solutions-toggle {
  background: none;
  border: none;
  color: var(--accent-amber);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
}

.solutions-content {
  display: none;
  margin-top: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.solutions-content.open {
  display: block;
}

/* Sections & Supplementary Grid */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.section-item {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.section-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.section-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.section-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Projects Showcase */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.project-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.project-thumb-wrap {
  width: 100%;
  height: 160px;
  background: #090c15;
  position: relative;
  overflow: hidden;
}

.project-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb-wrap img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.project-cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-indigo);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.project-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.project-authors {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-links-row {
  display: flex;
  gap: 0.5rem;
}

/* Video Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.75rem;
}

.video-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-side-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.notes-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.notes-editor textarea {
  width: 100%;
  flex: 1;
  min-height: 140px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
}

.notes-editor textarea:focus {
  border-color: var(--border-active);
}

/* Quizzes Container */
.quiz-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quiz-opt {
  padding: 0.85rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quiz-opt:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.quiz-opt.selected-correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: #a7f3d0;
}

.quiz-opt.selected-wrong {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--cardinal-light);
  color: #fca5a5;
}

.quiz-feedback {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
}

.quiz-feedback.show {
  display: block;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  background: #070a12;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .playground-canvas-wrap {
    grid-template-columns: 1fr;
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .container {
    padding: 1rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
