*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #fef9ff;
  background: radial-gradient(circle at top, #ff9aeb 0, #1a1024 50%, #05030a 100%);
  overflow: hidden;
}

.bg-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.bg-gradient {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 20% 0, rgba(255, 192, 203, 0.7), transparent),
    radial-gradient(circle at 80% 100%, rgba(168, 85, 247, 0.6), transparent),
    radial-gradient(circle at 0 100%, rgba(56, 189, 248, 0.5), transparent);
  filter: blur(6px);
}

.bg-blur {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.5;
}

.bg-blur-1 {
  width: 260px;
  height: 260px;
  background: #ff80b5;
  top: 10%;
  left: 10%;
}

.bg-blur-2 {
  width: 260px;
  height: 260px;
  background: #818cf8;
  bottom: 5%;
  right: 5%;
}

.bg-stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 80px 80px, 120px 120px;
  background-position: 0 0, 40px 40px;
  opacity: 0.2;
  animation: twinkle 10s linear infinite;
}

@keyframes twinkle {
  0% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.15;
  }
}

#lock-container,
#gallery-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 540px;
  padding: 32px 24px 28px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), rgba(15, 23, 42, 0.9));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(28px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.7), rgba(129, 140, 248, 0.7));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.7;
  pointer-events: none;
}

.title-script {
  font-family: "Sacramento", cursive;
  font-size: 40px;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 6px;
}

.title-script.big {
  font-size: 52px;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  opacity: 0.82;
  margin-bottom: 24px;
}

.hint {
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.password-input {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
}

.password-input input {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.45);
  background: rgba(15, 23, 42, 0.55);
  color: #f9fafb;
  font-size: 14px;
  min-width: 0;
  width: 140px;
  outline: none;
  box-shadow: 0 0 0 1px transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.password-input input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.password-input input:focus {
  border-color: rgba(244, 114, 182, 0.8);
  box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.8);
  background: rgba(15, 23, 42, 0.9);
}

.password-input button {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fefce8;
  box-shadow:
    0 10px 22px rgba(236, 72, 153, 0.45),
    0 0 0 1px rgba(248, 250, 252, 0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.password-input button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 32px rgba(236, 72, 153, 0.6),
    0 0 0 1px rgba(248, 250, 252, 0.08);
}

.password-input button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.8),
    0 0 0 1px rgba(248, 250, 252, 0.16);
}

.error-message {
  margin-top: 10px;
  font-size: 13px;
  color: #fecaca;
  text-align: center;
  min-height: 18px;
}

.lock-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.lock {
  position: relative;
  width: 90px;
  height: 110px;
  cursor: pointer;
  transform-origin: bottom center;
  animation: lockFloat 3s ease-in-out infinite;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.lock-shackle {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 60px;
  height: 64px;
  transform: translateX(-50%);
  border-radius: 32px 32px 20px 20px;
  border: 6px solid #e5e7eb;
  border-bottom: 10px solid transparent;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.6);
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.8), transparent);
}

.lock-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 90px;
  height: 80px;
  transform: translateX(-50%);
  border-radius: 22px;
  background: linear-gradient(145deg, #f97316, #ec4899);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-keyhole {
  width: 14px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0, #fefce8, #111827);
  position: relative;
}

.lock-keyhole::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #fefce8, #111827 70%);
}

.lock-glow {
  position: absolute;
  inset: auto;
  left: 50%;
  bottom: -14px;
  width: 80px;
  height: 24px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(248, 250, 252, 0.6), transparent 60%);
  opacity: 0.7;
  filter: blur(4px);
}

@keyframes lockFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.02);
  }
}

.lock--shake {
  animation: lockShake 0.5s ease;
}

.lock--open {
  animation: none;
  transform: translateY(-16px) rotate(-12deg) scale(1.05);
  opacity: 0;
}

@keyframes lockShake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

/* LETTER / ENVELOPE */
.letter-card {
  padding-top: 40px;
  padding-bottom: 34px;
}

.envelope {
  position: relative;
  width: min(340px, 88vw);
  height: 230px;
  margin: 0 auto;
  cursor: pointer;
  perspective: 1200px;
}

.envelope-back {
  position: absolute;
  inset: 18px 8px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(148, 163, 184, 0.6);
}

.envelope-front {
  position: absolute;
  inset: 18px 8px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #f9fafb, #fef2f2);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(148, 163, 184, 0.7);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  transform-origin: top;
  transition: transform 0.7s ease-in-out;
}

.envelope-flap {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #fecaca, #f9a8d4);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}

.envelope-stamp {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffe4e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(248, 113, 113, 0.7);
}

.envelope-letter {
  position: absolute;
  inset: 10px 26px 26px;
  border-radius: 16px;
  background: #fff7ed;
  padding: 18px 18px 14px;
  box-shadow:
    0 12px 22px rgba(15, 23, 42, 0.6),
    0 0 0 1px rgba(248, 250, 252, 0.8);
  transform-origin: bottom;
  transform: translateY(42px);
  transition: transform 0.6s ease-out;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4b5563;
}

.envelope-letter p {
  font-size: 13px;
  line-height: 1.6;
}

.letter-footer {
  margin-top: 4px;
  font-size: 12px;
  text-align: right;
  color: #9ca3af;
}

.envelope--open .envelope-front {
  transform: rotateX(-160deg);
}

.envelope--open .envelope-letter {
  transform: translateY(-4px);
}

.floating-hearts::before,
.floating-hearts::after {
  content: "💖";
  position: absolute;
  font-size: 20px;
  opacity: 0.5;
  animation: floatHeart 4s ease-in-out infinite;
}

.floating-hearts::after {
  content: "💘";
  animation-duration: 5.2s;
  animation-delay: -1.3s;
}

@keyframes floatHeart {
  0% {
    transform: translate(60px, 80px) scale(0.7) rotate(0deg);
    opacity: 0;
  }
  30% {
    opacity: 0.8;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-40px, -60px) scale(1.1) rotate(-16deg);
    opacity: 0;
  }
}

/* GALLERY */
.gallery-card {
  padding-bottom: 30px;
}

.gallery-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.gallery-photo-wrapper {
  position: relative;
  width: min(380px, 84vw);
  height: 420px; /* tüm fotoğraflar için sabit yükseklik */
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(248, 250, 252, 0.5);
  background: radial-gradient(circle at top, #fef3c7, #fee2e2);
}

.gallery-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  opacity: 1;
  transform: none;
  transition: none;
  z-index: 2;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom, rgba(15, 23, 42, 0.55), transparent 55%);
  pointer-events: none;
}

.gallery-caption {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  padding: 0 8px;
}

.next-btn {
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: #ecfdf5;
  box-shadow:
    0 12px 26px rgba(45, 212, 191, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.6);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.next-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 18px 34px rgba(45, 212, 191, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.6);
}

.next-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.6);
}

.progress-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.progress-dot--active {
  width: 18px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.9),
    0 0 14px rgba(236, 72, 153, 0.75);
  transform: translateY(-1px);
}

/* FIREWORKS */
#fireworks-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
  display: none;
}

.firework {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, #fee2e2, #fb7185);
  box-shadow:
    0 0 0 3px rgba(251, 113, 133, 0.7),
    0 0 22px rgba(248, 250, 252, 1);
  animation:
    firework-rise 0.7s ease-out forwards,
    firework-explode 0.8s ease-out forwards 0.7s;
}

@keyframes firework-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-220px) scale(1);
    opacity: 1;
  }
}

@keyframes firework-explode {
  0% {
    box-shadow:
      0 0 0 0 rgba(248, 250, 252, 0.9),
      0 0 0 0 rgba(244, 114, 182, 0.9);
    opacity: 1;
  }
  100% {
    box-shadow:
      0 0 0 40px rgba(248, 250, 252, 0),
      0 0 0 80px rgba(244, 114, 182, 0);
    opacity: 0;
  }
}

/* CAKE */
.cake-card {
  padding-bottom: 34px;
}

.cake-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cake {
  position: relative;
  width: min(260px, 70vw);
  height: 220px;
  cursor: pointer;
  transform-origin: center bottom;
  animation: cakeFloat 4s ease-in-out infinite;
}

@keyframes cakeFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.cake-layer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 16px;
  background: linear-gradient(145deg, #fed7aa, #fecaca);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.6);
}

.cake-layer--bottom {
  bottom: 40px;
  width: 100%;
  height: 70px;
}

.cake-layer--middle {
  bottom: 82px;
  width: 78%;
  height: 60px;
}

.cake-layer--top {
  bottom: 118px;
  width: 58%;
  height: 50px;
}

.cake-cream {
  position: absolute;
  left: 50%;
  bottom: 124px;
  transform: translateX(-50%);
  width: 62%;
  height: 28px;
  background: #fef3c7;
  border-radius: 999px 999px 18px 18px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.7);
}

.cake-cream::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 10px 10px, #f97316 2px, transparent 0),
    radial-gradient(circle at 26px 18px, #ef4444 2px, transparent 0),
    radial-gradient(circle at 60px 16px, #ec4899 2px, transparent 0),
    radial-gradient(circle at 88px 6px, #22c55e 2px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.8;
}

.cake-plate {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 120%;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0, #e5e7eb, #9ca3af);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.candles {
  position: absolute;
  left: 50%;
  bottom: 156px;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.candle {
  width: 14px;
  height: 46px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    #f97316 0,
    #f97316 6px,
    #fef9c3 6px,
    #fef9c3 12px
  );
  box-shadow: 0 6px 10px rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
}

.flame {
  width: 12px;
  height: 24px;
  border-radius: 999px 999px 12px 12px;
  background: radial-gradient(circle at 50% 0, #fef9c3, #f97316 60%, transparent 70%);
  box-shadow:
    0 0 16px rgba(252, 211, 77, 0.9),
    0 0 30px rgba(251, 191, 36, 0.9);
  transform-origin: bottom center;
  animation: flameFlicker 0.25s infinite alternate;
}

@keyframes flameFlicker {
  0% {
    transform: translateX(0) scale(1);
  }
  100% {
    transform: translateX(1px) scale(1.07);
  }
}

.flame--off {
  opacity: 0;
  box-shadow: none;
  animation: none;
}

.cake-text {
  margin-top: 8px;
  font-size: 18px;
}

.cake-subtext {
  font-size: 12px;
  opacity: 0.78;
}

/* FINAL */
.final-card {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 32px;
}

.final-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.final-mini {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.84;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .card {
    padding: 24px 16px 22px;
    border-radius: 20px;
  }

  .title-script {
    font-size: 34px;
  }

  .title-script.big {
    font-size: 40px;
  }

  .password-input {
    flex-direction: column;
    align-items: stretch;
  }

  .password-input input {
    width: 100%;
  }

  .password-input button {
    width: 100%;
  }

  .envelope {
    height: 210px;
  }
}


