body {
  font-family:Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
  margin: 20px;
  background-color: #fafafa;
  background-image: url('../assets/chap5bg.webp');
  background-size: cover;       
  background-position: center;  
  background-attachment: fixed; 
  background-repeat: no-repeat;
  color: #ffffff;
  line-height: 1.6;
}

.nav-toggle-button {
    position: fixed;
    top: 20px;
    right:-15px;
    z-index: 1000;
    background-color: transparent; 
    color: transparent; 
    font-size: 0;
    width: 100px;
    height: 50px;
    border: none;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-toggle-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-toggle-button:hover {
    transform: scale(1.05);
}

.nav-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(30, 30, 30, 0.5); 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); 
    z-index: 999;
    transform: translateX(300px); 
    transition: transform 0.4s ease-in-out;
    padding-top: 80px; /* Space for the top toggle button */
}

/* State to show the menu */
.nav-wrapper.open {
    transform: translateX(0); 
}

.bookmark {
    width: 100%;
    padding: 10px 15px; 
    border-radius: 4px;
    text-align: left;
    display: block; 
    text-decoration: none; 
    color: #ffcc70; 
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Create the Bullet Point (using pseudo-element) */
.bookmark span::before {
    content: '•'; /* The bullet character */
    color: #ffcc70; /* Bullet color */
    font-size: 1.2em;
    margin-right: 15px; /* Space between bullet and text */
    display: inline-block;
    width: 15px; /* Give it a fixed width for alignment */
}

.bookmark:hover {
    background-color: rgba(255, 204, 112, 0.25);
    transform: scale(1.05);
}

.bookmark span {
    opacity: 1; 
    color: #f7e2b3;
    font-weight: normal;
    font-size: 13px;
    display: inline; 
}

.header-image {
  text-align: center; 
  width: 100%;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
  z-index: 10;
}

/* Optional: Clean up the image styles */
.header-image img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
}

.controls {
   margin: 15px 0;
   display: flex;
   gap: 20px;
   flex-wrap: wrap;
   align-items: center;
}

label {
  font-weight: 500;
}

select {
   padding: 6px 10px;
   border: 1px solid #ccc;
   border-radius: 4px;
   font-size: 15px;
}

#chart {
   margin-top: 5px;
   margin-left: 3px;
}

.chart-note {
  font-size: 13px;
  color: #cccccc; /* Light gray for dark themes */
  font-style: italic;
  margin-top: 2px;
  padding: 8px 0;
  text-align: left;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
}

.tooltip {
  max-width: 300px;
  font-family: sans-serif;
  line-height: 1.4;
}

.tooltip em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  color: #ddd;
  font-size: 13px;
}

.caption {
 	font-style: italic;
    padding: 12px;
    background: #f0f7ff;
    border-left: 4px solid #3498db;
    max-width: 800px;
    border-radius: 0 4px 4px 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    color: #2c3e50;
}

circle.point {
  stroke: white;
  stroke-width: 0.5;
}

.chart-side-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1400px; /* adjust based on your needs */
  margin: 0 auto;
}

.chart-container {
  flex: 1;
  min-width: 300px;
  max-width: 900px;
}

.side-image {
  flex: 0 0 450px; /* slightly wider */
  margin-top: 10px; /* space from controls */
}

.side-image img {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
  .chart-side-container {
    flex-direction: column;
    align-items: center;
  }
  
  .side-image {
    flex: none;
    width: 90%;
    margin-top: 20px;
  }
  
    /* Optional: make caption full-width and centered on mobile */
  .caption {
    width: 90%;
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    border-left: none;
    border-top: 4px solid #3498db;
    border-radius: 4px;
  }
}

.music-toggle {
  position: fixed;
  top: 20px;
  right: 100px; /* to the left of nav-toggle (which is at right: -15px) */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  padding: 0;
  width: auto;
  height: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent; /* removes tap highlight on mobile */
}

.next-button {
  position: fixed;
  bottom: 40px;
  right: -30px;
  width: 140px;
  height: 125px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
  z-index: 100;
  padding: 0;
  outline: none;
}

.next-button:hover {
  opacity: 0.9; /* or apply a filter if you prefer */
}

.next-btn-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.next-button:hover {
  /* Scale the button up by 10% (1.1) */
  transform: scale(1.2);
  /* Slightly increase the opacity for emphasis (optional, you already have one) */
  opacity: 1; 
}