:root {
  --primary: #4A235A;
  --primary-light: rgba(74, 35, 90, 0.1);
  --primary-foreground: rgb(249, 249, 250);
  --secondary: rgb(228, 219, 237);
  --secondary-foreground: rgb(54, 44, 55);
  --muted: rgb(243, 242, 245);
  --muted-foreground: rgb(102, 88, 110);
  --accent: rgb(228, 219, 237);
  --accent-foreground: rgb(54, 44, 55);
  --border: rgb(228, 219, 237);
  --radius: 0.5rem;
  --background: rgb(255, 255, 255);
  --foreground: rgb(54, 44, 55);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--muted);
  scroll-behavior: smooth;
}

/* Navigation */
.navigation {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-link {
  color: var(--primary-foreground);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-link:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.nav-link.active {
  text-decoration: underline;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  margin-left: 1rem;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: var(--primary-foreground);
  border-radius: 2px;
  transition: 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Header */
.header-section {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(to bottom, var(--muted), var(--background));
  margin-bottom: 2rem;
}

.header-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.intro {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--muted-foreground);
}

.intro strong {
  color: var(--primary);
}

/* Chapters */
.chapter {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 2rem;
  animation: fadeIn 0.6s ease-in;
}

.video-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 2rem;
}

.video-intro video {
  max-width: 100%;
  height: auto;
  margin: 50px auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-intro .video-caption {
  margin-bottom: 1.5rem;
}

.video-caption p {
  text-align: center;
  color: var(--muted-foreground);
  margin-top: 10px ;
  margin-bottom: 10px;
}

.video-intro strong {
  color: var(--primary);
}

.video-title h2 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 0.5rem;
  text-align: center;
}
.chapter h2,
.chapter h3 {
  color: var(--primary);
}

.chapter h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.chapter h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.chapter p {
  margin-bottom: 1.5rem;
  color: var(--muted-foreground);
}

.chapter ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 2rem;
}

.chapter ul li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

.chapter ul li strong {
  color: var(--primary);
}

/* Chart Containers */
.chart {
  height: 450px;
  margin: 2rem 0;
  background-color: var(--background);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem 1.5rem 1.5rem; 
  overflow: visible;            
  position: relative;          
}

.apexcharts-title-text {
  margin-top: 1rem !important;
}

.chart-detail {
  max-width: 800px;
  margin: 1rem auto;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  text-align: center;
}

/* Conclusion */
.conclusion {
  background-color: var(--accent);
  padding: 2rem;
  border-radius: var(--radius);
}

.conclusion h2 {
  color: var(--primary);
}

.conclusion p strong {
  color: var(--primary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: var(--primary-foreground);
  text-align: center;
  padding: 1.2rem 0 1rem 0;
  margin-top: 2rem;
  font-size: 1rem;
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 600px) {
  .site-footer {
    font-size: 0.95rem;
    padding: 1rem 0 0.7rem 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .header-section {
    padding: 2rem 1rem;
  }

  .header-section h1 {
    font-size: 2rem;
  }

  .intro {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .chapter {
    padding: 0 0.5rem;
    margin: 2rem auto;
  }

  .chapter h2 {
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
  }

  .chapter h3 {
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
  }

  .chapter ul {
    margin-left: 1rem;
    font-size: 0.98rem;
  }

  .chart {
    height: 220px;
    padding: 1.2rem 0.5rem 1rem;
  }

  .chart-detail {
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }

  .conclusion {
    padding: 1rem 0.5rem;
  }

  .video-intro {
    margin-bottom: 1rem;
    padding: 0 0.5rem;
  }

  .video-intro video {
    margin: 20px auto;
    max-width: 100vw;
    width: 100%;
    height: auto;
  }

  .video-caption {
    font-size: 0.95rem;
    margin-top: 0.3rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .header-section h1 {
    font-size: 1.3rem;
  }
  .chapter h2 {
    font-size: 1.1rem;
  }
  .chapter h3 {
    font-size: 1rem;
  }
  .video-caption {
    font-size: 0.9rem;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }
  .nav-list {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 2rem;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1001;
  }
  .nav-list.open {
    display: flex;
  }
  .nav-list li {
    width: 100%;
    margin: 0.5rem 0;
  }
  .nav-link {
    width: 100%;
    display: block;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
  }
}
