body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #111;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.hidden {
  display: none;
}

/* Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.popup-content {
  background: #222;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.popup-content h2 {
  margin-top: 0;
}

.popup-content button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-top: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #ff6600;
  color: white;
}

#chapter-name {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
}

#year {
  margin-top: 1rem;
  font-size: 1rem;
  color: #fff;
  text-align: center;
}

#page-number {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #ccc;
  text-align: center;
}

/* Comic Container */
#comic-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comic-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.comic-nav button {
  background: #444;
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
}

#comic-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#comic-wrapper img {
  max-height: 90vh;
  max-width: 100%; /* fit width if too wide */
  width: auto;
  height: auto;
}
}
