body {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-family: Poppins, sans-serif;
  background-color: #fff;
  flex-direction: column;
  min-height: 100svh; /* Standardized */
  opacity: 0; /* Initial opacity for fade-in */
  transition: opacity 1s ease-in-out; /* Smooth fade-in effect */
}

#image-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
  background-color: black;
}

#image-overlay.showing {
  display: flex; /* Make it visible when triggered */
  background-color: black;
}

#image-overlay img {
  max-width: 95%;
  max-height: 80%;
  margin-bottom: 20px;
  border-radius: 2px;
}

.overlay-button {
  width: 80px;
  height: 80px;
  padding: 25px;
  background-color: white;
  color: #620000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.1s ease;
  margin-left: 5px;
  box-shadow: none;
}

.overlay-button:hover {
  background-color: #ddd;
}

.close-btn {
  width: 80px;
  height: 80px;
  padding: 25px;
  background-color: white;
  color: #620000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.1s ease;
  margin-right: 5px;
}

.close-btn:hover {
  background-color: #ddd;
}

.close-btn img {
  box-shadow: none;
}

#camera-container {
  position: relative;
  width: 95%;
  max-width: 600px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  display: block;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  background: #000;
}

#flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
  z-index: 1;
}

#video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror the live camera feed */
  z-index: 0;
}

.magazine-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url('magazine_cover_graphic1.png'); /* Initial image */
  background-size: contain;
}

#capture-btn {
  margin-top: 20px;
  width: 80px;
  height: 80px;
  padding: 25px;
  background-color: black;
  color: #620000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

#capture-btn:hover {
  background-color: #ccc;
}

@media (max-width: 768px) {
  body {
    max-height: 100vh; /* Use viewport height */
    overflow: hidden;
  }
}
