/* ===== General body & container ===== */
body {
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  background: #f0f8ff;
}

.book-container {
  display: flex;
  align-items: center;
}

/* ===== Book page styling ===== */
.page {
  width: 650px; /* slightly larger to make images bigger */
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  text-align: center;
}

/* ===== Teacher Section ===== */
.teacher-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.teacher-section img {
  width: 100%;       /* fill the page width */
  max-width: 600px;  /* larger than before to match Pirate Pat */
  height: auto;      /* maintain aspect ratio */
  border-radius: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.teacher-section button {
  margin: 5px;
  padding: 10px 15px;
  border-radius: 20px;
  border: none;
  background-color: #ffcc00;
  cursor: pointer;
  font-size: 1em;
}

.teacher-section button:hover {
  transform: scale(1.1);
}

/* ===== Student Section ===== */
.student-section {
  margin-top: 20px;
}

#cvc-words {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.word-container {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

/* Letter buttons */
.letter-button {
  margin: 2px;
  padding: 10px 15px;
  border-radius: 25px;
  border: none;
  background-color: #ffeb3b;
  cursor: pointer;
  font-size: 1em;
}

.letter-button:hover {
  transform: scale(1.1);
}

/* Play word button */
.play-word-button {
  padding: 10px 15px;
  border-radius: 25px;
  border: none;
  background-color: #4caf50;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-left: 10px;
}

.play-word-button:hover {
  transform: scale(1.1);
}

/* ===== Navigation buttons ===== */
.nav-button {
  font-size: 2em;
  background: none;
  border: none;
  cursor: pointer;
  user-select: none;
  margin: 0 10px;
  transition: transform 0.2s;
}

.nav-button:hover {
  transform: scale(1.2);
}

/* ===== Responsive adjustments ===== */
@media screen and (max-width: 400px) {
  .page {
    width: 90%; /* shrink container on small screens */
    padding: 10px;
  }

  .teacher-section img {
    max-width: 100%; /* fill container */
  }

  .nav-button {
    font-size: 1.8em;
  }
}

@media screen and (min-width: 1200px) {
  .page {
    width: 700px; /* slightly bigger container for large screens */
  }

  .teacher-section img {
    max-width: 650px; /* larger image on big desktop screens */
  }
}
