/* Header layout: title and buttons stacked on mobile, horizontal on larger screens */
body {
  background-color: black;
  text-align: center;
  font-family: "Comic Relief", system-ui, sans-serif;
}

a {
  color: blue;
  margin-bottom: 2%;
  justify-content: center;
  font-size: 20px;
}

header {
  display: flex;
  flex-direction: column; /* stack on small screens */
  align-items: center;
  gap: 0.5rem;
  margin: 0 2rem 1rem 2rem;
  border-radius: 40px;
  font-family: "Comic Relief", system-ui, sans-serif;
  color: blue;
  background: white;
  text-align: center;
  border: solid blue 6px;
}

/* Buttons container: horizontal layout */
.episode-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;   /* center buttons horizontally */
  flex-wrap: wrap;           /* wrap on small screens */
  margin: 1rem 0;
}

/* Buttons inside both containers */
.episode-buttons button {
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 2px solid blue;
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: "Comic Relief", system-ui, sans-serif;
  color: blue;
}

.episode-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive: stack buttons vertically on small screens */
@media (max-width: 480px) {
  .episode-buttons {
    flex-direction: column;
    gap: 0.3rem;
  }
  .episode-buttons button {
    width: 100%;
    font-size: 1rem;
  }
}

/* Comic container */
#comic-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers images */
  gap: 0;
  max-width: 900px;
  width: 100%;
  border-radius: 8px;
  margin: 0 auto; /* centers container on page */
}

/* Comic images */
#comic-container img {
  display: block;
  max-width: 90%; /* responsive */
  height: auto;
  margin: 0;
  padding: 0;
}