/* Landing Page Screen */
#landingPageScreen {
  display: flex;
  flex-direction: column;
  visibility: visible;
  opacity: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: auto;
  min-height: 100%;
  background: #e1251b;
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#landingPageScreen .top-section {
  position: relative;
  height: var(--vh-top-section, 75vh);
  min-height: unset;
  max-height: unset;
  width: 100vw;
  align-items: center;
  display: flex;
  flex-direction: column;
  background-image: url("https://cdn.epicbreak.in/assets/images/landingPageBg.png");
  background-color: #e1251b;
  background-position: center -7px;
  background-size: cover;
  flex-shrink: 0;
}

#landingPageScreen .welcome-text {
  color: white;
  font-weight: 400;
  font-size: 2rem;
  text-align: center;
  text-transform: uppercase;
  font-family: "BobbyJones", serif;
  margin-top: 40px;
}

#landingPageScreen .landing-headline {
  width: 80%;
}

#landingPageScreen .cta-container {
  position: absolute;
  bottom: 5%;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#landingPageScreen .create-anime-btn,
#landingPageScreen .participate-btn {
  background-color: transparent;
  width: fit-content;
  height: fit-content;
  border: none;
}

.create-anime-btn img,
.participate-btn img {
  pointer-events: none;
  width: 70vw;
  max-width: 260px;
}

.top-copyright-text {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 8px;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.bottom-section {
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  padding-bottom: 28px;
}

/* Carousel wrapper */
.carousel {
  position: relative;
  width: 100%;
}

/* Track */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

/* Each slide */
.carousel-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-slide:nth-child(1) {
  background-color: black;
}

/* Media (video + image same size) */
.carousel-media {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

/* Video */
.carousel-media {
  width: 100%;
  height: 100%;
  display: block;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  cursor: pointer;
  z-index: 1;
}

.video-thumbnail.hidden {
  display: none;
}

/* Ensure play button stays above thumbnail */
.play-btn {
  z-index: 2;
}

/* Center Play Button */
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
}

/* Bottom Controls */
.video-controls {
  position: absolute;
  bottom: 30px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
}

.video-controls button {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-controls img {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Dots container */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Dot style */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid white;
  background-color: white;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Active dot */
.dot.active {
  background-color: #e1251b;
  opacity: 1;
}

/* Phase 1 */
/* Click Your Selfie Screen */
#clickYourSelfieScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: #e1251b;
  background-image: url("https://cdn.epicbreak.in/assets/images/backgroundOne.png");
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#clickYourSelfieScreen .headingOne {
  position: absolute;
  top: 20dvh;
  width: 100%;
  font-size: 2rem;
  color: white;
  line-height: 85%;
  text-align: center;
  font-family: "BobbyJones", serif;
  font-weight: 400;
}

#clickYourSelfieScreen .poster-form {
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.poster-form label {
  display: block;
  color: white;
  font-family: "DIN", sans-serif;
  font-size: 0.7rem;
  margin-bottom: 3px;
}

.poster-form .name-field {
  width: 80%;
}

.poster-form input[id="name"] {
  width: 100%;
  padding: 12px;
  border-radius: 3px;
  border: 1px solid white;
  background-color: transparent;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.poster-form input::placeholder {
  color: #ff9792;
  font-size: 10px;
}

input:focus {
  outline: none;
}

.poster-form .selfie-field {
  width: 80%;
}

.poster-form .selfie-btn {
  width: 100%;
  background-color: #ffc300;
  border: none;
  padding: 12px;
  border-radius: 3px;
  font-family: "DIN", sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  color: black;
}

.poster-form #previewContainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  display: none;
  border: 1px solid white;
  padding: 4px 12px;
  border-radius: 3px;
}

.poster-form #previewInfo {
  display: flex;
  gap: 10px;
  align-items: center;
  display: none;
}

.poster-form #imgPreview {
  display: none;
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 5px;
  /* transform: scaleX(-1); */
}

.poster-form #imgName {
  color: white;
  font-family: "DIN", sans-serif;
  display: none;
}

.poster-form #retakeSelfieBtn {
  width: 35%;
  padding: 9px;
  background-color: #ffc300;
  border: none;
  border-radius: 3px;
  font-family: "DIN", sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  color: black;
  display: none;
}

.poster-form .note {
  width: 80%;
  color: white;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

.note span {
  font-weight: 600;
}

#clickYourSelfieScreen .tnc-container {
  position: absolute;
  bottom: 17dvh;
  display: flex;
  font-size: 10px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 80%;
  left: 0;
  right: 0;
  margin: auto;
  font-family: arial;
  color: white;
}

.tnc-container #checkbox {
  transform: scale(1.5);
  margin-bottom: 25px;
}

.tnc-container a {
  color: #ffc300;
}

#clickYourSelfieScreen .generate-poster-btn {
  position: absolute;
  bottom: 8dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  background-color: transparent;
  border: none;
}

.generate-poster-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.generate-poster-btn img {
  pointer-events: none;
  width: 75vw;
  max-width: 280px;
}

/* Loading Screen */
#loadingScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: #e1251b;
  background-image: url("https://cdn.epicbreak.in/assets/images/backgroundTwo.png");
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

.loading-content {
  position: absolute;
  bottom: 75px;
  right: 0;
  left: 0;
  margin: auto;
}

.loading-content h1 {
  text-align: center;
  font-family: "BobbyJones", sans-serif;
  font-weight: 400;
  color: #ffc300;
}

.loading-content p {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
}

/* Final Poster Screen */
#posterScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: #e1251b;
  background-image: url("https://cdn.epicbreak.in/assets/images/backgroundThree.png");
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#posterScreen .upper-section {
  position: absolute;
  top: 8dvh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  width: 90%;
}

.upper-section h1 {
  font-family: "BobbyJones", sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 4rem);
}

.upper-section p {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(0.9rem, 3.5vw, 1.2rem);
}

.upper-section img {
  width: 45px;
  margin-left: 3px;
}

#posterScreen .frame-section {
  position: absolute;
  top: 22dvh;
  left: 50%;
  transform: translateX(-50%);
  width: 58vw;
  max-width: 320px;
}

.frame-section .frame-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-section .poster-selfie {
  position: absolute;
  top: 20%;
  left: 9%;
  width: 83%;
  height: 40%;
  object-fit: cover;
  object-position: center;
  /* transform: scaleX(-1); */
}

.frame-section .poster-name {
  position: absolute;
  bottom: 21%;
  left: 0;
  right: 0;
  margin: auto;
  width: 80%;
  text-align: center;
  font-family: "Times", sans-serif;
  font-size: clamp(0.9rem, 5vw, 1.1rem);
  transform: scaleY(1.7);
  text-transform: uppercase;
  color: #000;
  -webkit-text-stroke: 1.5px black;
  letter-spacing: 1.5px;
}

.buttons-section {
  position: absolute;
  bottom: 8dvh;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5dvh;
}

.button-flex {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.retake-btn,
.download-btn {
  width: 48%;
  background: none;
  border: none;
  padding: 0;
}

.retake-btn img,
.download-btn img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.return-to-home-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
}

.return-to-home-btn img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* CAMERA MODAL */
.camera-modal {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 9999;
}

.camera-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#cameraPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* transform: scaleX(-1); --> handling this in camera js startStream function */
}

/* Frame guide */
.camera-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  aspect-ratio: 550 / 395;
  transform: translate(-50%, -50%);
  border: 4px dashed white;
  border-radius: 12px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}

.overlay-text {
  color: white;
  font-size: 14px;
  position: relative;
  bottom: -40%;
}

.capture-btn {
  position: absolute;
  color: #000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 30px;
  border: none;
}

.close-camera-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  border-radius: 50%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-camera-btn img {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.rotate-camera-btn {
  position: absolute;
  bottom: 30px;
  right: 20%;
  background: #f0f0f0;
  border: none;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rotate-camera-btn img {
  width: 20px;
  height: 20px;
  pointer-events: none;
}
