body {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 105vh;
  background: #c1c1c1;
  background-size: 600px;
}

img,
button,
body,
html {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* disables "save image" menu */
}

[id^="arrow"],
#forward,
#backward {
  transform-box: fill-box;
  transform-origin: center;
}


.frame {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  user-select: none;
  pointer-events: none;
  touch-action: none;
}

#frame-bg {
  object-fit: cover;
  object-position: center center;
  filter: blur(25px) brightness(1);
  transform: translate(-50%, -50%) scale(1.1);
  /* prevent blur edges */
  z-index: -101;
}

#frame-fg {
  object-fit: contain;
  object-position: center center;
  z-index: -100;
}



#frame-controls {
  position: fixed;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 90vw;
  pointer-events: none;
}

.control-btn {
  position: relative;
  width: 20vh;
  height: 20vh;
  max-width: 110px;
  max-height: 110px;

  z-index: 500;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;

}

.control-btn:active {
  transform: scale(0.92);
}

.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.show {
  opacity: 1;
  pointer-events: none;
}

.triangle {
  width: 100%;
  height: 100%;

}

.triangle.left {
  transform: scaleX(-1);
}

.triangle path {
  fill: rgba(35, 35, 35, 0.867);
  transition: filter .25s ease, transform .25s ease;
  translate: 0px 30px;
  stroke-width: 20px;
  stroke: rgb(200, 200, 200);
}

#forward:hover path {
  filter: drop-shadow(20px 20px 14px rgb(36, 36, 36));
}

#backward:hover path {
  filter: drop-shadow(-20px 20px 14px rgb(31, 31, 31));
}

/* Pulsing stroke animation */
@keyframes pulseStroke {
  0% {
    stroke-width: 5;
    stroke: rgba(35, 35, 35, 0.867);
  }

  50% {
    stroke-width: 35;
    stroke: rgba(191, 191, 191);
  }

  100% {
    stroke-width: 5;
    stroke: rgba(35, 35, 35, 0.867);
  }
}

#forward.forward-hint svg path {
  animation: pulseStroke 2s ease-in-out infinite;
}

/* LOADING OVERLAY */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}


.loader-text {
  color: white;
  font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
  font-weight: 700;
  font-size: 1.7em;
  letter-spacing: 1px;
  opacity: 1;
  transition: opacity 0.4s ease;
}


/*SWIPE FUNCS*/

#swipe-button {
  position: fixed;
  top: 22%;
  left: 49.8%;
  transform: translate(-50%, -50%);
  z-index: 300;
}

.swipe {
  position: absolute;

  transform: translateX(-50%);

  width: 40vh;
  height: 40vh;
  max-width: 410px;
  max-height: 410px;

  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;
}



.swipe path {
  fill: rgba(34, 34, 34, 0.719);
  transition: filter .25s ease, transform .25s ease;
}


@keyframes glow {
  0% {
    opacity: 0.15;
    filter: drop-shadow(0 0 0px #fff);
    transform: scale(1);
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 8px #ffffffaa);
    transform: scale(1.06);
  }

  100% {
    opacity: 0.15;
    filter: drop-shadow(0 0 0px #fff);
    transform: scale(1);
  }
}

/* Base animation */
[id^="arrow"] {
  animation: glow 2.4s infinite ease-in-out;
  transform-origin: center;
}

/* Staggered delays (bottom → top) */
#arrow1  { animation-delay: 0s; }
#arrow2  { animation-delay: 0.2s; }
#arrow3  { animation-delay: 0.4s; }
#arrow4  { animation-delay: 0.6s; }
#arrow5  { animation-delay: 0.8s; }
#arrow6  { animation-delay: 1.0s; }
#arrow7  { animation-delay: 1.2s; }
#arrow8  { animation-delay: 1.4s; }
#arrow9  { animation-delay: 1.6s; }
#arrow10 { animation-delay: 1.8s; }
#arrow11 { animation-delay: 2.0s; }



/* -------------------------------------
   ROTATE DEVICE OVERLAY
--------------------------------------- */
#rotate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;

}

.rotate-phone {
  position: relative;

  width: 70px;
  height: 140px;

  margin-bottom: 15px;
  animation: rotatePhone 1.5s ease-in-out infinite alternate;
}


.rotate-phone .phone-frame {
  width: 100%;
  height: 100%;

  border: 2px solid white;
  box-sizing: border-box;
  border-radius: 14px;
  position: relative;
}

.rotate-phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 3px;
  background: white;
  border-radius: 10px;
  opacity: 0.9;
}

.rotate-text {
  font-size: 1.1em;
  color: white;
  font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
}


@keyframes rotatePhone {
  0% {
    transform: rotate(0deg);
    animation-timing-function: cubic-bezier(.45, .03, .65, .15);
  }

  60% {
    transform: rotate(-93deg);
    animation-timing-function: cubic-bezier(.20, .90, .35, 1);
  }

  100% {
    transform: rotate(-90deg);
  }
}

@media (orientation: portrait) {
  #rotate-overlay {
    opacity: 1;
    visibility: visible;
  }
}

/* Hide the overlay on desktop */
@media (min-width: 900px) {
  #rotate-overlay {
    display: none;
  }
}

#three-container {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
}