body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: url('background.gif') no-repeat center center fixed;
  background-size: cover;
}

.comic-reader {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#comic-page {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  cursor: pointer;
  object-fit: contain; /* Ensures the image maintains aspect ratio */
}

.page-number {
  position: absolute;
  bottom: 20px; /* Position it just above the bottom of the comic */
  font-size: 18px;
  color: white;
  background: rgba(0, 0, 0, 0.5); /* Light frosted glass effect */
  padding: 5px 10px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
  display: none; /* Hidden by default */
}


.tooltip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(90deg); /* Rotated 90 degrees */
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.5); /* Light frosted glass effect */
  color: black;
  font-size: 16px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.tooltip.left {
  left: -40px; /* Adjusted position */
}

.tooltip.right {
  right: -40px; /* Adjusted position */
}

.password-container {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.5); /* Light frosted glass effect */
  padding: 20px;
  border-radius: 10px;
  color: black;
  text-align: center;
  backdrop-filter: blur(10px);
  z-index: 20;
  width: 80%;
  max-width: 300px;
}

.password-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.password-box label,
.password-box input,
.button-container button {
  margin: 5px;
}

.button-container {
  display: flex;
  gap: 10px;
}

.button-container button {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.button-container button:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .tooltip {
      transform: translateY(-50%) rotate(0deg); /* No rotation on mobile */
      padding: 5px 10px;
  }

  .tooltip.left {
      left: 10px;
  }

  .tooltip.right {
      right: 10px;
  }

  .page-number {
      font-size: 16px;
  }

  .password-container {
      width: 90%;
      max-width: 250px;
  }

  .button-container {
      flex-direction: column;
  }

  .button-container button {
      width: 100%;
      margin: 5px 0;
  }
}
