* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #241034, #07040d 65%);
  font-family: Arial, sans-serif;
  color: white;
  overflow: hidden;
}

.story {
  width: 100vw;
  height: 100vh;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.slide img {
  max-width: 94vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(255, 79, 163, 0.35);
  user-select: none;
  pointer-events: none;
}

.textOverlay {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: min(88vw, 760px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.textLine {
  opacity: 0;
  transform: translateY(22px) scale(0.96);
  animation: textPop 0.55s ease forwards;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 12px 16px;
  font-size: clamp(20px, 5vw, 38px);
  line-height: 1.25;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9);
}

.textLine.soft {
  font-size: clamp(18px, 4.3vw, 31px);
  font-weight: 800;
}

.slide.enter-right {
  animation: enterRight 0.55s ease forwards;
}

.slide.exit-left {
  animation: exitLeft 0.55s ease forwards;
}

.slide.enter-left {
  animation: enterLeft 0.55s ease forwards;
}

.slide.exit-right {
  animation: exitRight 0.55s ease forwards;
}

.controls {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 50;
}

.controls button {
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 900;
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(255, 79, 163, 0.35);
}

#nextBtn {
  background: #ff4fa3;
}

#backBtn {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.controls button:active {
  transform: scale(0.96);
}

@keyframes textPop {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes enterRight {
  from {
    opacity: 0;
    transform: translateX(100vw);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes exitLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-100vw);
  }
}

@keyframes enterLeft {
  from {
    opacity: 0;
    transform: translateX(-100vw);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes exitRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100vw);
  }
}

@media (max-width: 600px) {
  .slide {
    padding: 10px;
    align-items: center;
  }

  .slide img {
    max-width: 96vw;
    max-height: 78vh;
    border-radius: 18px;
  }

  .textOverlay {
    width: 92vw;
    bottom: 13%;
    gap: 8px;
  }

  .textLine {
    border-radius: 15px;
    padding: 10px 13px;
  }

  .controls {
    bottom: 12px;
  }

  .controls button {
    padding: 12px 18px;
    font-size: 15px;
  }
}