/* ===========================
   CSS Reset and Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-dark: #1e293b;
  --text-light: #475569;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* ===========================
   Typography
   =========================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================
   Header
   =========================== */
header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 3rem 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ===========================
   Main Content
   =========================== */
main {
  padding: 3rem 0;
}

section {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.intro h2,
.lectures h2,
.about h2 {
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
}

.section-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

/* ===========================
   Instructor Section
   =========================== */
.instructor-info {
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.instructor-info h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.instructor-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.instructor-image {
  flex: 0 0 140px;
  max-width: 140px;
}

.instructor-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.instructor-details {
  flex: 1;
}

.instructor-details h4 {
  color: var(--primary-color);
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.instructor-title {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.instructor-quote {
  background: linear-gradient(to right, #fef3c7, #fde68a);
  border-left: 4px solid #f59e0b;
  padding: 1.25rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #78350f;
  display: block;
}

.instructor-quote em {
  display: block;
  margin-bottom: 0.5rem;
}

.quote-author {
  display: block;
  text-align: right;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.instructor-bio {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.instructor-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.instructor-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.instructor-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.instructor-link svg {
  flex-shrink: 0;
}

.profile-link {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border-color: var(--primary-color);
  font-weight: 600;
}

.profile-link:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
  border-color: var(--primary-dark);
  color: white;
  transform: translateX(4px) scale(1.02);
}

.youtube-link {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: white;
  border-color: #ff0000;
  font-weight: 600;
}

.youtube-link:hover {
  background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
  border-color: #cc0000;
  color: white;
  transform: translateX(4px) scale(1.02);
}

/* ===========================
   Downloads Section
   =========================== */
.downloads {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(to right, #f0f9ff, #e0f2fe);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.downloads h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.download-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===========================
   Lecture Grid
   =========================== */
.lecture-grid {
  display: grid;
  gap: 2.5rem;
}

.lecture-category {
  margin-bottom: 1rem;
}

.category-title {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.lecture-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lecture-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.lecture-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.lecture-content {
  flex: 1;
}

.lecture-content h4 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.lecture-content h4 a {
  color: var(--text-dark);
  font-weight: 600;
  transition: color 0.2s ease;
}

.lecture-content h4 a:hover {
  color: var(--primary-color);
}

.lecture-instructor {
  margin: 0.3rem 0 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--primary-color);
  font-weight: 500;
}

.lecture-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-light);
}

.lecture-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.lecture-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.lecture-link-btn svg {
  width: 16px;
  height: 16px;
}

.video-link {
  background: #ff0000;
  color: white;
}

.video-link:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2);
}

.notes-link {
  background: var(--primary-color);
  color: white;
}

.notes-link:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===========================
   Video Thumbnail Section
   =========================== */
.video-container {
  margin: 2rem 0 3rem 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumbnail:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.video-play-overlay {
  position: relative;
  display: block;
  cursor: pointer;
}

.video-play-overlay img {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.video-play-overlay:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  margin-top: 1rem;
  text-align: center;
}

.video-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border-radius: 6px;
}

.video-notice svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

/* ===========================
   About & Disclaimer
   =========================== */
.disclaimer {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
}

.disclaimer h3 {
  color: #92400e;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.disclaimer p {
  color: #78350f;
  font-size: 0.9rem;
  margin: 0;
}

/* ===========================
   Footer
   =========================== */
footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.5rem 0;
  text-align: center;
  margin-top: 3rem;
}

footer p {
  margin: 0.25rem 0;
  color: rgba(255, 255, 255, 0.8);
}

/* ===========================
   Lecture Page Styles
   =========================== */
.lecture-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.lecture-header .lecture-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.lecture-header .lecture-meta {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
  color: rgba(255, 255, 255, 0.9);
}

.lecture-content-area {
  max-width: 900px;
  margin: 0 auto;
}

.content-body {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  line-height: 1.8;
}

.content-body h2 {
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.content-body h3 {
  color: var(--text-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.content-body ul,
.content-body ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.content-body li {
  margin-bottom: 0.5rem;
}

.content-body code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
  color: #e11d48;
}

.content-body pre {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #1e293b;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.95em;
  line-height: 1.6;
}

.content-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.content-body th,
.content-body td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.content-body th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

/* ===========================
   Navigation
   =========================== */
.lecture-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  gap: 1rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.nav-btn.disabled {
  background: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.5;
}

.nav-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header .subtitle {
    font-size: 1rem;
  }

  section {
    padding: 1.5rem;
  }

  .download-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .lecture-card {
    flex-direction: column;
    text-align: center;
  }

  .lecture-number {
    margin: 0 auto;
  }

  .instructor-info,
  .instructor-card {
    padding: 1.25rem;
  }

  .instructor-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .instructor-details {
    width: 100%;
    text-align: left;
  }

  .instructor-details h4,
  .instructor-title {
    text-align: center;
  }

  .instructor-image {
    flex: 0 0 auto;
    width: 40%;
    max-width: 140px;
    min-width: 100px;
    margin-bottom: 1rem;
  }

  .instructor-details h4 {
    font-size: 1.5rem;
  }

  .instructor-links {
    gap: 0.5rem;
  }

  .instructor-link {
    font-size: 0.9rem;
  }

  .content-body {
    padding: 1.5rem;
  }

  .video-container {
    padding: 1rem;
    margin: 1.5rem 0 2rem 0;
  }

  .video-notice {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .play-button svg {
    width: 54px;
    height: 38px;
  }

  .lecture-nav {
    flex-direction: column;
  }


  .nav-btn {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  .lecture-header .lecture-title {
    font-size: 1.5rem;
  }
}

/* ===========================
   Expandable Sections
   =========================== */
.expandable-section {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.expandable-section:hover {
  box-shadow: var(--shadow-md);
}

.expandable-section summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-color);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: color 0.2s ease;
}

.expandable-section summary::-webkit-details-marker {
  display: none;
}

.expandable-section summary::before {
  content: "▶";
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.expandable-section[open] summary::before {
  transform: rotate(90deg);
}

.expandable-section summary:hover {
  color: var(--primary-dark);
}

.expandable-section summary h2 {
  margin: 0;
  font-size: 1.25rem;
}

.expandable-content {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  animation: slideDown 0.3s ease;
}

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

.expandable-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.expandable-content ul,
.expandable-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.expandable-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.expandable-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.expandable-content strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Updated Downloads Section */
.intro .downloads {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.intro .downloads .btn {
  flex: 1;
  min-width: 200px;
}

/* Publishing Info Grid Layout */
.publishing-info-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.publishing-info-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.publishing-info-column img {
  max-width: 200px;
  height: auto;
}

@media (max-width: 768px) {
  .publishing-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .publishing-info-column:last-child {
    justify-content: center;
    align-items: center;
  }
}

/* About the Book Section */
.about-book-section {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.about-book-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.book-subsection {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.book-subsection:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.book-subsection h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* Inline Expandable Details */
.inline-expandable {
  margin-top: 0;
}

.inline-expandable summary {
  cursor: pointer;
  list-style: none;
  display: block;
  user-select: none;
  transition: all 0.2s ease;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 6px;
}

.inline-expandable summary::-webkit-details-marker {
  display: none;
}

.inline-expandable summary:hover {
  background-color: var(--bg-light);
}

.inline-expandable summary h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  pointer-events: none;
}

.inline-expandable summary .preview-text {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 0;
  pointer-events: none;
  position: relative;
}

.inline-expandable summary .preview-text::after {
  content: " ▼";
  color: var(--primary-color);
  font-size: 0.75rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.inline-expandable[open] summary .preview-text {
  display: none;
}

.inline-expandable[open] summary h3 {
  margin-bottom: 0;
}

.inline-expandable .expandable-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  animation: slideDown 0.3s ease;
}

.inline-expandable .expandable-content h4 {
  color: var(--text-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

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

.inline-expandable .expandable-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.inline-expandable .expandable-content ul,
.inline-expandable .expandable-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.inline-expandable .expandable-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  color: var(--text-light);
}

/* ===========================
   Flow Diagrams and Process Chains
   =========================== */
.flow-diagram {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.flow-step {
  background: var(--bg-white);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 0.5rem auto;
  max-width: 600px;
  font-weight: 500;
  color: var(--text-dark);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  transition: all 0.3s ease;
}

.flow-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.flow-arrow {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.25rem 0;
  line-height: 1;
}

/* Enhanced nested lists */
.content-body ul ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.content-body ul ul li {
  list-style-type: circle;
  font-size: 0.95em;
}

/* Enhanced code blocks */
.content-body code {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 500;
}

/* Enhanced ordered lists */
.content-body ol {
  counter-reset: item;
  list-style: none;
  margin-left: 0;
}

.content-body ol > li {
  counter-increment: item;
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
}

.content-body ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--primary-color);
  color: white;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Enhanced images */
.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

/* Enhanced emphasis */
.content-body em {
  font-style: italic;
  color: var(--text-light);
  display: block;
  margin: 0.5rem 0 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-color);
}

/* Enhanced strong in lists */
.content-body li strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Section spacing */
.content-body h4 {
  color: var(--primary-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* ===========================
   Math Equations (KaTeX)
   =========================== */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 0.5rem 0;
}

.math-block {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 2px solid #fde047;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  text-align: center;
  box-shadow: 0 2px 8px rgba(253, 224, 71, 0.2);
}

.math-block .katex-display {
  margin: 0;
  padding: 0; /* Reset padding inside math-block as it has its own padding */
}

.math-block .katex {
  font-size: 1.1em;
}

/* Inline math */
.content-body .katex {
  font-size: 1em;
}

/* ===========================
   Code Block Enhancements
   =========================== */
.content-body pre[class*="language-"] {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-body code[class*="language-"] {
  color: #334155;
  text-shadow: none;
}

/* Syntax highlighting color overrides for light theme */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #64748b;
  font-style: italic;
}

.token.punctuation {
  color: #475569;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #dc2626;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #16a34a;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #ea580c;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #2563eb;
}

.token.function,
.token.class-name {
  color: #7c3aed;
}

.token.regex,
.token.important,
.token.variable {
  color: #c026d3;
}

