/**
 * Math 55 - Course Page Styles
 * Premium academic interface with excellent readability
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Dark theme - warm charcoal */
  --bg-dark: #0d0d0d;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-code: #0a0a0a;

  /* Text colors - warm white */
  --text-primary: #f5f5f0;
  --text-secondary: rgba(245, 245, 240, 0.75);
  --text-muted: rgba(245, 245, 240, 0.45);
  --text-bright: #ffffff;

  /* Accent colors */
  --accent-crimson: #c41e3a;
  --accent-crimson-light: #e84a5f;
  --accent-crimson-glow: rgba(196, 30, 58, 0.15);
  --accent-green: #228b22;
  --accent-green-light: #32cd32;
  --accent-green-glow: rgba(34, 139, 34, 0.15);

  /* Semantic colors */
  --color-insight: #fbbf24;
  --color-insight-bg: rgba(251, 191, 36, 0.08);
  --color-insight-border: rgba(251, 191, 36, 0.25);
  --color-diagram: #7ee787;
  --color-diagram-bg: rgba(126, 231, 135, 0.05);
  --color-solution: #60a5fa;
  --color-prereq: #a78bfa;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.15);

  /* Typography - using beautiful serif for math */
  --font-display: "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Spacing */
  --nav-height: 64px;
  --sidebar-width: 260px;
  --content-max: 1200px;

  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(196, 30, 58, 0.1);
}

/* Course-specific accent */
body.course-55a {
  --accent-primary: var(--accent-crimson);
  --accent-light: var(--accent-crimson-light);
  --accent-glow: var(--accent-crimson-glow);
}

body.course-55b {
  --accent-primary: var(--accent-green);
  --accent-light: var(--accent-green-light);
  --accent-glow: var(--accent-green-glow);
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

::selection {
  background: var(--accent-primary);
  color: white;
}

/* ============================================
   Navigation
   ============================================ */
.course-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 2rem;
  max-width: 2000px;
  margin: 0 auto;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.course-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.course-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.course-tab:hover {
  color: var(--text-secondary);
}

.course-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.tab-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

body.course-55a .course-tab[data-course="55a"] .tab-badge {
  background: rgba(196, 30, 58, 0.25);
  color: var(--accent-crimson-light);
}

body.course-55b .course-tab[data-course="55b"] .tab-badge {
  background: rgba(34, 139, 34, 0.25);
  color: var(--accent-green-light);
}

.github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.github-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Main Layout
   ============================================ */
.course-main {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* ============================================
   Sidebar
   ============================================ */
.course-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 0;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2.5rem;
}

.sidebar-title {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-list {
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-link.active {
  color: var(--accent-light);
  background: var(--accent-glow);
  border-left-color: var(--accent-primary);
}

/* ============================================
   Content Area - MUCH WIDER
   ============================================ */
.content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2.5rem 4rem;
  max-width: calc(100% - var(--sidebar-width));
}

.content-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  max-width: var(--content-max);
}

.content-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  margin-bottom: 1rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

body.course-55a .content-tag {
  background: rgba(196, 30, 58, 0.2);
  color: var(--accent-crimson-light);
}

body.course-55b .content-tag {
  background: rgba(34, 139, 34, 0.2);
  color: var(--accent-green-light);
}

.content-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.content-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.content-body {
  max-width: var(--content-max);
}

/* Welcome State */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
}

.welcome-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  color: var(--text-muted);
}

.welcome-state h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.welcome-state p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================
   Problem Cards - REDESIGNED
   ============================================ */
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  transition: all 0.3s ease;
}

.problem-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-soft);
}

.problem-card.enhanced {
  border-left: 4px solid var(--accent-primary);
}

.problem-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.problem-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

body.course-55a .problem-number {
  background: var(--accent-crimson);
  color: white;
  box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

body.course-55b .problem-number {
  background: var(--accent-green);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

.problem-header-text {
  flex: 1;
}

.problem-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

/* Prerequisites */
.problem-prereqs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.prereq-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.25rem;
  align-self: center;
}

.prereq-tag {
  padding: 0.3rem 0.75rem;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-prereq);
}

/* Question Section - LARGER TEXT */
.question-section,
.problem-section {
  margin-bottom: 2rem;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.question-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Given/Find Sections - CLEANER */
.given-section,
.find-section {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  font-size: 1.1rem;
}

.insight-icon {
  font-size: 1.25rem;
}

.given-list,
.find-list,
.check-list {
  list-style: none;
  padding-left: 0;
}

.given-list li,
.find-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.75rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.given-list li::before,
.find-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: 600;
}

.check-list {
  list-style: decimal;
  padding-left: 1.5rem;
}

.check-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Key Insight - PROMINENT */
.key-insight {
  background: var(--color-insight-bg);
  border: 1px solid var(--color-insight-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.key-insight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-insight), transparent);
  border-radius: 16px 16px 0 0;
}

.insight-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-insight);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.key-insight p {
  color: rgba(251, 191, 36, 0.95);
  font-size: 1.1rem;
  line-height: 1.7;
  font-family: var(--font-display);
  font-style: italic;
}

/* Visual Diagram - Modern styled diagram box */
.visual-diagram {
  margin: 2rem 0;
  background: linear-gradient(
    135deg,
    rgba(126, 231, 135, 0.03) 0%,
    rgba(126, 231, 135, 0.01) 100%
  );
  border: 1px solid rgba(126, 231, 135, 0.15);
  border-radius: 16px;
  overflow: hidden;
}

.diagram-header {
  padding: 0.875rem 1.5rem;
  background: rgba(126, 231, 135, 0.08);
  border-bottom: 1px solid rgba(126, 231, 135, 0.1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-diagram);
}

.diagram-body {
  padding: 1.5rem 2rem;
  overflow-x: auto;
}

.diagram-body pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  white-space: pre;
}

/* Solution Toggle - MORE PROMINENT */
.solution-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.solution-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.solution-toggle svg {
  transition: transform 0.3s ease;
}

.solution-toggle.expanded svg {
  transform: rotate(180deg);
}

.solution-toggle.expanded {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  color: var(--accent-light);
}

/* Solution Content - READABLE */
.solution-content {
  display: none;
  padding: 2rem;
  margin-top: 1.5rem;
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.solution-content.visible {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.solution-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.solution-prose {
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.solution-step {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.solution-answer {
  margin: 1.5rem 0;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-bright);
}

.solution-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

/* Check Understanding */
.check-understanding {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border-subtle);
}

.check-understanding .section-title {
  color: var(--color-solution);
}

/* ============================================
   Lecture Cards - BEAUTIFUL
   ============================================ */
.lecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3rem;
}

.lecture-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lecture-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--text-bright);
}

.lecture-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.topic-tag {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

body.course-55a .topic-tag {
  background: rgba(196, 30, 58, 0.12);
  color: var(--accent-crimson-light);
  border: 1px solid rgba(196, 30, 58, 0.2);
}

body.course-55b .topic-tag {
  background: rgba(34, 139, 34, 0.12);
  color: var(--accent-green-light);
  border: 1px solid rgba(34, 139, 34, 0.2);
}

.lecture-content {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.lecture-pre {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  color: var(--text-primary);
}

/* Lecture Sections */
.lecture-section {
  margin-bottom: 3rem;
}

.lecture-section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-primary);
}

.lecture-subsection {
  margin: 2rem 0;
}

.subsection-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.subsection-num {
  font-family: var(--font-mono);
  color: var(--accent-light);
}

/* Lecture Paragraphs */
.lecture-para {
  margin: 1rem 0;
  line-height: 1.85;
}

/* Lecture Bullets */
.lecture-bullet {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
  position: relative;
}

.lecture-bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: bold;
}

/* Lecture Definitions - Inline */
.lecture-definition {
  margin: 1.5rem 0;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.08) 0%,
    rgba(96, 165, 250, 0.03) 100%
  );
  border-left: 4px solid #60a5fa;
  border-radius: 0 12px 12px 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.75;
}

.lecture-definition.inline {
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.06) 0%,
    transparent 100%
  );
}

/* Lecture Theorems */
.lecture-theorem {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
  border: 1px solid var(--accent-primary);
  border-radius: 16px;
  position: relative;
}

.lecture-theorem::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 16px 16px 0 0;
}

.lecture-theorem .theorem-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.lecture-theorem .theorem-body {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-bright);
}

.lecture-theorem.inline {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
}

.lecture-theorem.inline::before {
  display: none;
}

/* Lecture Examples & Proofs */
.lecture-example,
.lecture-proof,
.lecture-note {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.lecture-example strong,
.lecture-proof strong,
.lecture-note strong {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-insight);
  margin-right: 0.5rem;
}

/* ============================================
   Math Rendering (KaTeX overrides)
   ============================================ */
.katex {
  font-size: 1.1em;
}

.katex-display {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  overflow-x: auto;
}

/* Math inline wrapper */
.math {
  font-family: var(--font-display);
}

/* Math Display (centered equations) */
.math-display {
  display: block;
  text-align: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

/* ============================================
   Math Boxes - Theorem, Definition, Answer
   ============================================ */

/* Theorem Box */
.math-theorem {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  position: relative;
}

.math-theorem .theorem-content,
.math-theorem .theorem-body {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-bright);
  white-space: pre-wrap;
  margin: 0;
}

/* Definition Box */
.math-definition {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.08) 0%,
    rgba(96, 165, 250, 0.02) 100%
  );
  border-left: 4px solid #60a5fa;
  border-radius: 0 12px 12px 0;
}

.math-definition .definition-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 0.875rem;
}

.math-definition .definition-body {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.75;
}

/* Concept Box (for properties like Injective, Surjective) */
.math-concept {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.math-concept .concept-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-insight);
  margin-bottom: 0.75rem;
}

.math-concept .concept-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Answer Box */
.math-answer {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(126, 231, 135, 0.1) 0%,
    rgba(126, 231, 135, 0.03) 100%
  );
  border: 2px solid rgba(126, 231, 135, 0.4);
  border-radius: 16px;
  position: relative;
}

.math-answer::before {
  content: "✓";
  position: absolute;
  top: -12px;
  left: 1.5rem;
  width: 24px;
  height: 24px;
  background: var(--bg-card);
  border: 2px solid rgba(126, 231, 135, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-diagram);
}

.math-answer .answer-body {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-bright);
}

/* Generic Math Box */
.math-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 12px;
}

.math-box .box-body,
.math-box .box-content {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}

/* Math Note */
.math-note {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(251, 191, 36, 0.05);
  border-left: 3px solid var(--color-insight);
  border-radius: 0 8px 8px 0;
}

.math-note .note-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Content Section Dividers */
.section-divider-major {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  margin: 3rem 0;
}

.section-divider-minor {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 2rem 0;
}

/* Content Section Titles */
.content-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-bright);
  margin: 2.5rem 0 1.5rem 0;
}

.content-subsection {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.content-subsection .subsection-num {
  font-family: var(--font-mono);
  color: var(--accent-light);
}

/* ============================================
   Syllabus Styling - Simple and Clean
   ============================================ */
.syllabus-simple {
  max-width: 900px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.syllabus-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.syllabus-heading:first-child {
  margin-top: 0;
}

.syllabus-paragraph {
  margin: 1rem 0;
  line-height: 1.85;
}

.syllabus-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(196, 30, 58, 0.4);
  transition: all 0.2s ease;
}

.syllabus-link:hover {
  color: var(--accent-primary);
  text-decoration-color: var(--accent-primary);
}

body.course-55b .syllabus-link {
  color: var(--accent-green-light);
  text-decoration-color: rgba(34, 139, 34, 0.4);
}

body.course-55b .syllabus-link:hover {
  color: var(--accent-green);
  text-decoration-color: var(--accent-green);
}

.syllabus-container {
  max-width: 900px;
}

.syllabus-hero {
  text-align: center;
  padding: 3rem 2rem;
  margin: -3rem -3rem 2rem -3rem;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
}

.syllabus-course-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.syllabus-institution {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.syllabus-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.syllabus-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.syllabus-meta-item .meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.syllabus-meta-item .meta-value {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.syllabus-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.syllabus-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.syllabus-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.syllabus-section-title::before {
  content: "";
  width: 4px;
  height: 1.25rem;
  background: var(--accent-primary);
  border-radius: 2px;
}

.syllabus-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.syllabus-description {
  font-family: var(--font-display);
  font-size: 1.15rem !important;
  line-height: 1.85 !important;
  color: var(--text-primary) !important;
}

.syllabus-notes {
  background: rgba(251, 191, 36, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.15);
}

.syllabus-notes .syllabus-section-title {
  color: var(--color-insight);
}

.syllabus-notes .syllabus-section-title::before {
  background: var(--color-insight);
}

.syllabus-staff {
  background: rgba(96, 165, 250, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.syllabus-staff .syllabus-section-title {
  color: #60a5fa;
}

.syllabus-staff .syllabus-section-title::before {
  background: #60a5fa;
}

.syllabus-staff-list {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text-secondary);
}

.syllabus-description-section .syllabus-description {
  font-size: 1.15rem;
  line-height: 1.9;
}

/* Homework Assignments */
.syllabus-homework {
  margin-top: 2rem;
}

.homework-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.homework-item {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.homework-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
}

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

.homework-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
}

.homework-due {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.homework-notes {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.homework-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.homework-link {
  padding: 0.5rem 1rem;
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.homework-link:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

body.course-55b .homework-link {
  background: var(--accent-green);
}

body.course-55b .homework-link:hover {
  background: var(--accent-green-light);
  box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
}

/* ============================================
   Loading State
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================
   Two Column Layout for Problems
   ============================================ */
@media (min-width: 1600px) {
  .problems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .problems-grid .problem-card {
    margin-bottom: 0;
  }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1400px) {
  html {
    font-size: 17px;
  }

  .content-area {
    padding: 2rem 3rem;
  }
}

@media (max-width: 1200px) {
  .course-sidebar {
    width: 240px;
  }

  .content-area {
    margin-left: 240px;
    max-width: calc(100% - 240px);
    padding: 2rem;
  }
}

@media (max-width: 1024px) {
  html {
    font-size: 16px;
  }

  .course-sidebar {
    width: 220px;
  }

  .content-area {
    margin-left: 220px;
    max-width: calc(100% - 220px);
  }

  .content-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .course-main {
    flex-direction: column;
  }

  .course-sidebar {
    position: relative;
    width: 100%;
    top: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
  }

  .content-area {
    margin-left: 0;
    max-width: 100%;
    padding: 1.5rem;
  }

  .tab-label {
    display: none;
  }

  .problem-card,
  .lecture-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .content-title {
    font-size: 1.75rem;
  }

  .problem-title {
    font-size: 1.3rem;
  }

  .diagram-content {
    font-size: 0.7rem;
  }

  .solution-text,
  .lecture-content {
    font-size: 0.85rem;
  }

  /* Mobile table styles */
  .markdown-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .markdown-content table img,
  .markdown-content table img[src$=".svg"] {
    max-width: 280px;
  }

  .markdown-content table td:first-child {
    min-width: 100px;
  }

  /* Mobile visualization sizing */
  .markdown-content img[src$=".svg"] {
    max-width: 100%;
    padding: 0.5rem;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-medium);
}

/* ============================================
   Markdown Content Styles
   ============================================ */
.markdown-content {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

/* Headers */
.markdown-content .md-h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-primary);
}

.markdown-content .md-h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.markdown-content .md-h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 1.75rem 0 1rem 0;
}

.markdown-content .md-h4 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-light);
  margin: 1.5rem 0 0.875rem 0;
}

.markdown-content .md-h5,
.markdown-content .md-h6 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1.25rem 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Paragraphs */
.markdown-content .md-p {
  margin: 1rem 0;
  line-height: 1.85;
}

/* Lists */
.markdown-content .md-ul,
.markdown-content .md-ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.markdown-content .md-li,
.markdown-content .md-oli {
  margin: 0.5rem 0;
  line-height: 1.7;
  color: var(--text-secondary);
}

.markdown-content .md-li::marker {
  color: var(--accent-light);
}

.markdown-content .md-oli::marker {
  color: var(--accent-light);
  font-weight: 600;
}

/* Blockquotes */
.markdown-content .md-blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Code */
.markdown-content .inline-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.5em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--accent-light);
}

.markdown-content .code-block {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow-x: auto;
}

.markdown-content .code-block code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Images/Figures */
.markdown-content .md-figure {
  margin: 2rem 0;
  text-align: center;
  display: block;
  clear: both;
}

.markdown-content .md-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: block;
  margin: 1rem auto;
}

.markdown-content .md-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Direct images in markdown (not wrapped in figure) */
.markdown-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

/* SVG Visualizations */
.markdown-content img[src$=".svg"] {
  max-width: 600px;
  width: 100%;
  height: auto;
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  display: block;
  margin: 1.5rem auto;
}

/* Tables */
.markdown-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  display: table;
  clear: both;
  table-layout: auto;
}

.markdown-content thead {
  background: rgba(255, 255, 255, 0.04);
}

.markdown-content th,
.markdown-content td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.markdown-content th {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.markdown-content td {
  color: var(--text-primary);
}

.markdown-content tbody tr:last-child td {
  border-bottom: none;
}

.markdown-content tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Table with images - visualization guide */
.markdown-content table img {
  max-width: 400px;
  width: 100%;
  height: auto;
  margin: 0.5rem auto;
  border-radius: 8px;
  display: block;
}

.markdown-content table img[src$=".svg"] {
  max-width: 400px;
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem auto;
  background: var(--bg-card);
  border-radius: 8px;
}

/* Visualization table - two columns layout */
.markdown-content table td:first-child {
  width: 30%;
  min-width: 120px;
  font-weight: 600;
  color: var(--accent-light);
  vertical-align: middle;
}

.markdown-content table td:last-child {
  width: 70%;
}

/* Ensure text doesn't wrap around images */
.markdown-content p + img,
.markdown-content img + p {
  clear: both;
}

/* Visual study guide section */
.markdown-content h2 + table {
  margin-top: 1.5rem;
}

/* Horizontal rule after visual guide */
.markdown-content table + hr,
.markdown-content table + .md-hr {
  margin-top: 2rem;
}

/* Links */
.markdown-content .md-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(196, 30, 58, 0.3);
  transition: all 0.2s ease;
}

.markdown-content .md-link:hover {
  color: var(--text-bright);
  text-decoration-color: var(--accent-primary);
}

body.course-55b .markdown-content .md-link {
  text-decoration-color: rgba(34, 139, 34, 0.3);
}

/* Horizontal rules */
.markdown-content .md-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  margin: 2.5rem 0;
}

/* Math boxes in markdown */
.markdown-content .math-definition,
.markdown-content .math-theorem,
.markdown-content .math-proposition,
.markdown-content .math-lemma,
.markdown-content .math-corollary {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
}

.markdown-content .math-definition {
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.08) 0%,
    rgba(96, 165, 250, 0.02) 100%
  );
  border-left: 4px solid #60a5fa;
}

.markdown-content .math-theorem {
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
  border: 2px solid var(--accent-primary);
}

.markdown-content .math-proposition,
.markdown-content .math-lemma {
  background: rgba(167, 139, 250, 0.08);
  border-left: 4px solid #a78bfa;
}

.markdown-content .math-corollary {
  background: rgba(251, 191, 36, 0.06);
  border-left: 4px solid var(--color-insight);
}

.markdown-content .math-example {
  background: rgba(126, 231, 135, 0.05);
  border-left: 4px solid var(--color-diagram);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.markdown-content .math-remark {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--text-muted);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.markdown-content .math-proof {
  margin: 1.5rem 0;
  padding: 1rem 0;
}

/* Labels for math elements */
.markdown-content .def-label,
.markdown-content .thm-label,
.markdown-content .prop-label,
.markdown-content .lemma-label,
.markdown-content .cor-label,
.markdown-content .ex-label,
.markdown-content .proof-label,
.markdown-content .remark-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 0.75rem;
}

.markdown-content .def-label {
  color: #60a5fa;
}
.markdown-content .thm-label {
  color: var(--accent-light);
}
.markdown-content .prop-label,
.markdown-content .lemma-label {
  color: #a78bfa;
}
.markdown-content .cor-label {
  color: var(--color-insight);
}
.markdown-content .ex-label {
  color: var(--color-diagram);
}
.markdown-content .proof-label {
  color: var(--text-muted);
  font-style: italic;
}
.markdown-content .remark-label {
  color: var(--text-secondary);
}

/* QED symbol */
.markdown-content .qed {
  float: right;
  color: var(--text-muted);
  font-size: 1.2em;
}

/* Sidebar extras */
.sidebar-divider {
  padding: 1.5rem 1.5rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  margin-top: 1rem;
}

.sidebar-empty {
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* References content */
.references-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.ref-card {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.ref-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
}

.ref-card strong {
  color: var(--accent-light);
  font-size: 1.1rem;
  min-width: 140px;
}

.ref-card span {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Syllabus content section */
.syllabus-content {
  padding: 1rem 0;
}

.syllabus-content h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.syllabus-content h4:first-child {
  margin-top: 0;
}

.syllabus-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0.75rem 0;
}

.syllabus-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.syllabus-content li {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.7;
}

.syllabus-content em {
  color: var(--text-primary);
}

/* Lecture description */
.lecture-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ============================================
   Solutions Section
   ============================================ */
.solutions-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-subtle);
}

.solutions-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

.solutions-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(138, 43, 226, 0.4);
}

.toggle-icon {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.solutions-content {
  margin-top: 1.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.solutions-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.solutions-header h2 {
  color: var(--accent-primary);
  font-size: 1.5rem;
  margin: 0;
}

.solutions-content .markdown-content h2 {
  color: var(--text-bright);
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.solutions-content .markdown-content h2:first-child {
  margin-top: 0;
}

/* Solution problem headers */
.solutions-content .markdown-content h2::before {
  content: "✓ ";
  color: var(--success-color, #10b981);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .course-nav,
  .course-sidebar,
  .solution-toggle {
    display: none;
  }

  .content-area {
    margin-left: 0;
    max-width: 100%;
  }

  .solution-content {
    display: block !important;
  }
}
