:root {
  --pink-lightest: #FFF0F5;
  --pink-light: #FFE4EC;
  --pink: #FFC0CB;
  --pink-deep: #E8A0B0;
  --rose-gold: #B76E79;
  --rose-gold-light: #D9A6AE;
  --white: #FFFFFF;
  --text-dark: #5A3A42;
  --text-muted: #8A6A72;
  --shadow: 0 8px 24px rgba(183, 110, 121, 0.15);
  --shadow-soft: 0 4px 14px rgba(183, 110, 121, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Lato', 'Playfair Display', serif;
  background: linear-gradient(180deg, var(--pink-lightest) 0%, #FFF7FA 40%, var(--pink-lightest) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.script-font {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
}

/* ---------- Floating hearts background ---------- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.heart-particle {
  position: absolute;
  bottom: -10%;
  left: var(--heart-left, 50%);
  font-size: var(--heart-size, 22px);
  opacity: 0;
  color: var(--pink-deep);
  animation-name: floatUpHeart;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--heart-duration, 20s);
  animation-delay: var(--heart-delay, 0s);
  will-change: transform, opacity;
}

@keyframes floatUpHeart {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: var(--heart-opacity, 0.18);
  }
  50% {
    transform: translateY(-55vh) translateX(var(--heart-drift, 20px)) rotate(180deg);
  }
  92% {
    opacity: var(--heart-opacity, 0.18);
  }
  100% {
    transform: translateY(-115vh) translateX(0) rotate(360deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heart-particle {
    animation: none;
    opacity: var(--heart-opacity, 0.18);
    transform: translateY(-40vh);
  }
}

/* ---------- Layout ---------- */
.hero, .container, .site-footer {
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 70px 20px 50px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.8rem;
  color: var(--rose-gold);
  margin: 0 0 6px;
  font-weight: 700;
}

.hero h1 {
  font-size: 4.2rem;
  margin: 0;
  color: var(--rose-gold);
  text-shadow: 0 2px 12px rgba(183, 110, 121, 0.25);
}

.hero-sub {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 1.05rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.site-footer {
  text-align: center;
  padding: 30px 20px 50px;
  color: var(--rose-gold);
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

/* ---------- Welcome banner ---------- */
.welcome-banner {
  background: var(--white);
  border: 1px solid var(--pink);
  border-radius: var(--radius);
  padding: 18px 24px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: var(--shadow-soft);
  font-size: 1.15rem;
}

.welcome-banner span {
  color: var(--rose-gold);
  font-weight: 700;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(90, 58, 66, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--white);
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(183, 110, 121, 0.35);
  border: 1px solid var(--pink);
}

.modal-deco {
  font-size: 2.4rem;
  margin-bottom: 6px;
}

.modal-box h2 {
  font-size: 2.4rem;
  margin: 0 0 12px;
  color: var(--rose-gold);
}

.modal-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

#welcome-form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#welcome-form input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--pink);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: var(--pink-lightest);
  color: var(--text-dark);
}

#welcome-form input:focus {
  border-color: var(--rose-gold);
}

.error-msg {
  color: #C0392B;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ---------- Buttons ---------- */
button, .upload-btn {
  cursor: pointer;
  font-family: 'Lato', sans-serif;
}

#welcome-form button,
.upload-btn {
  background: linear-gradient(135deg, var(--rose-gold), var(--pink-deep));
  color: var(--white);
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-block;
}

#welcome-form button:hover,
.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#welcome-form button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Pink alert toast ---------- */
.pink-alert {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FF6FA5, #FF9EC4);
  color: #fff;
  padding: 16px 26px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(255, 111, 165, 0.45);
  font-weight: 700;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
  animation: popIn 0.25s ease;
}

.pink-alert[hidden] {
  display: none;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Sections ---------- */
h2.script-font {
  font-size: 2.4rem;
  color: var(--rose-gold);
  margin-bottom: 4px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.upload-section, .gallery-section {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 34px 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-soft);
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2.5px dashed var(--pink-deep);
  border-radius: var(--radius);
  background: var(--pink-lightest);
  text-align: center;
  padding: 40px 20px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dropzone.drag-over {
  background: var(--pink-light);
  border-color: var(--rose-gold);
}

.dropzone-icon {
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.dropzone-or {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 8px 0;
}

.upload-progress-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress-item {
  background: var(--white);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-soft);
}

.upload-progress-item.ok { border-left: 4px solid #6BBF7A; }
.upload-progress-item.fail { border-left: 4px solid #E06C75; }

/* ---------- Gallery ---------- */
.gallery-status {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}

.gallery-status[hidden] {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  background: var(--pink-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 12, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-overlay img {
  max-width: min(90vw, 900px);
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: 2.8rem; }
  .modal-box { padding: 30px 22px; }
  .upload-section, .gallery-section { padding: 24px 16px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
}
