:root {
  --bg: #0b0611;
  --bg-soft: #1b0c20;
  --paper: #ffffff;
  --paper-edge: #f4f1f5;
  --ink: #2b1b25;
  --muted: #7b6b77;
  --pink: #ff5aa5;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Quicksand", sans-serif;
  color: #fff;
  min-height: 100vh;
  background: radial-gradient(circle at top, #2a1031 0%, #140812 45%, var(--bg) 100%);
  overflow-x: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, rgba(42, 16, 49, 0.95) 0%, rgba(20, 8, 18, 0.98) 60%, var(--bg) 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-card {
  text-align: center;
  padding: 2.5rem 2.2rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  color: #fff;
  max-width: 520px;
}

.loader-card h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.4rem;
}

.loader-card p {
  color: #f0dbe8;
}

.loader-heart {
  font-size: 2.6rem;
  color: #ff7cc3;
  margin-bottom: 0.8rem;
  animation: floatText 1.4s ease-in-out infinite;
}
.is-locked .app {
  display: none;
}

.lock-screen {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background: radial-gradient(circle at top, rgba(42, 16, 49, 0.85) 0%, rgba(20, 8, 18, 0.95) 55%, var(--bg) 100%);
  z-index: 10;
}

.is-locked .lock-screen {
  display: grid;
}

.lock-card {
  width: min(480px, 92vw);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 2.5rem 2.2rem;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.lock-tag {
  font-size: 0.85rem;
  letter-spacing: 0.4rem;
  text-transform: uppercase;
  color: #ffb3d9;
  margin-bottom: 0.75rem;
}

.lock-subtitle {
  color: #eadbe4;
  margin: 0.4rem 0 1.6rem;
}

.lock-form {
  display: grid;
  gap: 0.9rem;
  text-align: left;
}

.lock-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: rgba(255, 255, 255, 0.7);
}

.lock-input {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.lock-input:focus {
  border-color: rgba(255, 90, 165, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 90, 165, 0.25);
}

.lock-button {
  margin-top: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--pink), #ff7cc3);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(255, 90, 165, 0.45);
}

.lock-error {
  min-height: 1.2rem;
  color: #ffd6ea;
  font-size: 0.9rem;
}

.app {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 4.5rem 1.5rem;
}

.hero-card {
  max-width: 640px;
  text-align: center;
  padding: 3rem 2.2rem;
  position: relative;
}

.tag {
  font-size: 1rem;
  letter-spacing: 0.35rem;
  text-transform: uppercase;
  color: #ffb3d9;
  margin-bottom: 1rem;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 4vw, 3.7rem);
  margin-bottom: 1rem;
}

.subtitle {
  color: #eadbe4;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.buttons {
  position: relative;
  height: 72px;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.no-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.btn {
  font-family: "Quicksand", sans-serif;
  font-size: 1rem;
  padding: 0.9rem 2.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-yes {
  background: linear-gradient(135deg, var(--pink), #ff7cc3);
  color: #fff;
  box-shadow: 0 16px 34px rgba(255, 90, 165, 0.45);
}

.btn-yes:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-no {
  position: absolute;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease;
  pointer-events: auto;
}

.hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.gallery {
  display: none;
  padding: 5rem 7vw 6rem;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.gallery.is-visible {
  display: block;
  animation: fadeIn 0.8s ease;
}

.gallery-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-header h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 0.8rem;
}

.gallery-header p {
  color: #e6dbe2;
}

.frame {
  display: grid;
  place-items: center;
}

.poster {
  width: min(980px, 92vw);
  background: var(--paper);
  border-radius: 18px;
  padding: 3.5rem 3rem 3rem;
  box-shadow: var(--shadow);
  border: 10px solid #f1ecf2;
  color: var(--ink);
}

.poster-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  text-align: center;
  margin-bottom: 0.3rem;
}

.poster-subtitle {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.timeline-vertical {
  position: relative;
  margin: 2.5rem auto 1.5rem;
  padding-left: 2.5rem;
  display: grid;
  gap: 1.4rem;
}

.timeline-vertical::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e6dbe2;
}

.event {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  margin-bottom: 8px;
  gap: 1rem;
  align-items: start;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.7s ease;
}

.event.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.event.is-locked {
  opacity: 0.35;
  filter: blur(0.6px);
  pointer-events: none;
}

.event-lock {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: #2c1a22;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem 1.5rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 2px dashed rgba(255, 90, 165, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.event-lock::before {
  content: "";
  position: absolute;
  inset: 10% 12%;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='32' viewBox='0 0 36 32'><path d='M18 30s-14-8.2-14-18A8 8 0 0 1 18 6a8 8 0 0 1 14 6c0 9.8-14 18-14 18z' fill='%23ff8ec7' fill-opacity='0.35'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='24' viewBox='0 0 36 32'><path d='M18 30s-14-8.2-14-18A8 8 0 0 1 18 6a8 8 0 0 1 14 6c0 9.8-14 18-14 18z' fill='%23ff5aa5' fill-opacity='0.25'/></svg>");
  background-size: 40px 36px, 28px 24px;
  background-position: 0 0, 20px 18px;
  background-repeat: repeat;
  opacity: 0.9;
  animation: heartDrift 6s linear infinite;
}

.event-lock::after {
  content: attr(data-text);
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid rgba(255, 90, 165, 0.55);
  box-shadow: 0 16px 36px rgba(255, 90, 165, 0.28);
  animation: floatText 1.2s ease-in-out infinite;
  color: #ff5aa5;
}

.event-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff5fb;
  border: 1px solid #f1cddd;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(43, 27, 37, 0.12);
  margin-left: -6px;
}

.event-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  box-shadow: 0 12px 26px rgba(43, 27, 37, 0.08);
}

.event-title {
  font-weight: 600;
margin-bottom: 10px;
}

.event-date {
  font-size: 14px;
  color: var(--muted);
 margin-bottom: 10px;
}

.event-note {
  font-size: 16px;
  margin-bottom: 10px;
  color: #5c4652;
}

.event-message {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.4rem;
}

.event-message label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  color: #a08a97;
}

.event-message textarea {
  width: 100%;
  min-height: 70px;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #ecd6e0;
  background: #fff8fb;
  color: #5c4652;
  font-family: "Quicksand", sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.event-message textarea:focus {
  border-color: rgba(255, 90, 165, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 90, 165, 0.15);
}

.event-message .send-message {
  justify-self: start;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--pink), #ff7cc3);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 90, 165, 0.35);
}


.event-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.event-photos img {
  width: 100%;
  height: auto;        /* Auto height */
  max-height: 350px;   /* Limit height */
  object-fit: contain; /* Show full image */
  border-radius: 12px;
  border: 2px solid #f1ecf2;
  background: #f3e9f0;
  min-height: 180px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.6s ease;
  cursor: pointer;
}

.event-photos img.is-loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: surprisePop 0.7s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.event-photos img.is-loading {
  background: linear-gradient(100deg, #f3e9f0 30%, #ffffff 45%, #f3e9f0 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}


.poster-footer {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  margin-top: 1rem;
  color: var(--ink);
}

.footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4rem;
  font-size: 0.95rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.95;
  }
}

@keyframes heartDrift {
  0% {
    background-position: 0 0, 20px 18px;
    opacity: 0.7;
  }
  50% {
    background-position: 20px 14px, 0 28px;
    opacity: 0.95;
  }
  100% {
    background-position: 40px 28px, -20px 36px;
    opacity: 0.7;
  }
}

@keyframes floatText {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes surprisePop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.82);
    filter: blur(6px);
    box-shadow: 0 0 0 rgba(255, 90, 165, 0);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    filter: blur(0);
    box-shadow: 0 22px 55px rgba(255, 90, 165, 0.22);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    box-shadow: 0 18px 35px rgba(39, 20, 30, 0.18);
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 12, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  z-index: 30;
  backdrop-filter: blur(8px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: min(920px, 92vw);
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 800px) {
  .timeline-vertical {
    padding-left: 2rem;
  }
}

@media (max-width: 600px) {
  .buttons {
    flex-direction: column;
    height: auto;
  }
}


/* Mobile devices */
@media (max-width: 600px) {
  .event-photos {
    /* display: flex; */
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex-direction: column;
}
}
