* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', serif;
  background-color: #111;
  color: #fff;
  overflow: hidden;
  height: 100vh;
}

.hidden {
  display: none !important;
}

/* ===== LOGIN ===== */

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  text-align: center;
  padding: 20vh 2rem 2rem;
  background-color: #fff5f5;
  color: #333;
}

.login-container h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: #c0392b;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
}

#password-input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e8c4c4;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

#password-input:focus {
  border-color: #c0392b;
}

#login-form button {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: #c0392b;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#login-form button:hover {
  background-color: #e74c3c;
}

.message {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.message.error {
  color: #e74c3c;
}

.message.success {
  color: #27ae60;
}

/* ===== STORIES SCREEN ===== */

#stories-screen {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Progress bar --- */

.progress-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  z-index: 10;
}

.progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* --- Slide --- */

.story-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem 1.5rem 2rem;
  transition: opacity 0.4s ease;
}

.story-slide.fade-out {
  opacity: 0;
}

.story-slide.fade-in {
  opacity: 1;
}

#story-img {
  max-width: 85%;
  max-height: 60vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.6s ease;
}

#story-img.visible {
  opacity: 1;
}

.story-text {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  text-align: center;
  line-height: 1.6;
  max-width: 500px;
  color: #eee;
  font-style: italic;
}

/* --- Final slide --- */

.story-slide.final {
  background: linear-gradient(135deg, #1a0000, #3d0f0f);
}

.final-title {
  font-size: 2.5rem;
  color: #e74c3c;
  margin-bottom: 0.5rem;
}

.final-subtitle {
  font-size: 1.3rem;
  color: #ccc;
}

/* --- Navigation --- */

.story-nav {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 5;
}

.story-nav-left,
.story-nav-right {
  flex: 1;
  cursor: pointer;
}

/* --- Counter --- */

.story-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  z-index: 10;
}

/* --- Next hint arrow --- */

.next-hint {
  position: absolute;
  bottom: 40px;
  right: 24px;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.next-hint.visible {
  opacity: 0.7;
}

/* ===== FALLING SUNFLOWERS ===== */

.falling-img {
  position: fixed;
  top: -60px;
  width: 45px;
  height: 45px;
  object-fit: contain;
  pointer-events: none;
  z-index: 999;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
  #story-img {
    max-width: 92%;
    max-height: 55vh;
  }

  .story-text {
    font-size: 1rem;
  }

  .final-title {
    font-size: 1.8rem;
  }
}
