:root {
  --pink-100: #ffe8f0;
  --pink-200: #ffd4e5;
  --pink-300: #ffbdd6;
  --pink-500: #f06fa5;
  --rose-600: #d8578e;
  --white: #ffffff;
  --text: #6a3b55;
  --shadow: 0 18px 45px rgba(217, 111, 164, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 242, 248, 0.58), rgba(255, 230, 240, 0.58)),
    url("images/love.jpg") center / cover no-repeat fixed;
  background-color: #f6dce8;
  overflow-x: hidden;
}

.container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(92vw, 720px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  animation: fadeUp 700ms ease;
}

.title {
  margin: 0;
  text-align: center;
  font-family: "Dancing Script", cursive;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--rose-600);
}

.subtitle {
  text-align: center;
  margin: 8px 0 22px;
  font-size: 1.05rem;
}

.pass-form {
  display: grid;
  gap: 12px;
}

.input-label {
  font-weight: 700;
  font-size: 0.95rem;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ffd4e5;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(240, 111, 165, 0.15);
}

button {
  border: none;
  background: linear-gradient(135deg, #f9a6c6, #f06fa5);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(240, 111, 165, 0.25);
}

.feedback {
  min-height: 1.4em;
  text-align: center;
  margin-top: 12px;
  font-weight: 700;
}

.feedback.error {
  color: #cc3f73;
}

.feedback.success {
  color: #4d9f63;
}

.main-card {
  text-align: center;
}

.secret-card {
  text-align: center;
}

.music-panel,
.upload-panel {
  margin: 14px 0 16px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 245, 251, 0.9), rgba(255, 232, 243, 0.9));
  border: 1px solid rgba(240, 111, 165, 0.16);
  display: none;
}

.secret-card .upload-panel {
  display: block;
}

.panel-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.panel-note {
  margin: 10px 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.ghost-btn {
  background: #fff;
  color: var(--rose-600);
  border: 2px solid #ffc3dc;
}

.ghost-btn:hover {
  box-shadow: 0 10px 18px rgba(240, 111, 165, 0.15);
}

.upload-form {
  display: grid;
  gap: 10px;
}

.file-input-hidden {
  display: none;
}

.file-picker-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px dashed #f3a8c6;
  background: linear-gradient(135deg, #fff7fb, #ffe6f1);
  color: #c44d82;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.file-picker-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(240, 111, 165, 0.18);
  border-color: #ec7aac;
}

.file-selected-name {
  margin: -2px 0 2px;
  font-size: 0.9rem;
  color: #a85b7d;
}

.upload-submit-btn {
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8db8, #e45596);
  box-shadow: 0 12px 24px rgba(228, 85, 150, 0.28);
}

.upload-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(228, 85, 150, 0.32);
}

.message {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 12px 0;
}

.breakup-counter-card {
  width: min(100%, 320px);
  margin: 14px auto 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 245, 250, 0.92);
  border: 1px solid rgba(239, 124, 168, 0.35);
  box-shadow: 0 8px 18px rgba(217, 111, 164, 0.16);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.breakup-counter-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(226, 95, 154, 0.58);
  box-shadow: 0 14px 28px rgba(217, 111, 164, 0.3);
}

.breakup-counter-label {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: #aa5e81;
  font-weight: 700;
}

.breakup-counter-value {
  margin: 4px 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #cf4d88;
}

.photo-wrap {
  margin-top: 20px;
}

.photo-wrap img {
  width: min(100%, 380px);
  border-radius: 18px;
  border: 6px solid #fff;
  box-shadow: var(--shadow);
}

.photo-note {
  margin-top: 8px;
  font-size: 0.92rem;
  opacity: 0.8;
}

.photo-caption {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rose-600);
  font-style: italic;
  font-weight: 500;
  padding: 0 12px;
}

  .album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 20px 0;
  }

  .album-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 200ms ease, box-shadow 200ms ease;
    background: white;
  }

  .album-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(236, 72, 153, 0.15);
  }

  .album-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
  }

  .album-caption {
    padding: 12px;
    font-size: 0.9rem;
    color: var(--rose-600);
    font-style: italic;
    line-height: 1.4;
    margin: 0;
    border-top: 1px solid rgba(236, 72, 153, 0.1);
  }

  .album-upload-date {
    margin: 0;
    padding: 0 12px 12px;
    font-size: 0.78rem;
    color: #8c6a7c;
    text-align: left;
  }

  .delete-photo-btn {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff7da7, #df4f8f);
    color: #fff;
    font-size: 0.9rem;
  }

  .delete-photo-btn:hover {
    box-shadow: 0 10px 18px rgba(223, 79, 143, 0.3);
  }

.hidden {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 700ms ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 140ms;
}

.reveal:nth-of-type(3) {
  animation-delay: 260ms;
}

.reveal:nth-of-type(4) {
  animation-delay: 380ms;
}

.reveal:nth-of-type(5) {
  animation-delay: 500ms;
}

.reveal:nth-of-type(6) {
  animation-delay: 620ms;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -90px;
  right: -50px;
  background: rgba(255, 183, 212, 0.45);
}

.shape-2 {
  width: 220px;
  height: 220px;
  bottom: -60px;
  left: -50px;
  background: rgba(255, 210, 228, 0.55);
}

.heart-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.heart {
  position: absolute;
  bottom: -24px;
  color: #ef75aa;
  font-size: 18px;
  opacity: 0.85;
  animation: flyHeart linear forwards;
}

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

@keyframes flyHeart {
  from {
    transform: translateY(0) scale(0.9);
    opacity: 0.8;
  }
  to {
    transform: translateY(-110vh) scale(1.4);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .message {
    font-size: 1rem;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  animation: fadeUp 300ms ease;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(217, 111, 164, 0.3);
  animation: slideUp 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-title {
  margin: 0 0 12px;
  font-family: "Dancing Script", cursive;
  font-size: 1.8rem;
  color: var(--rose-600);
}

.modal-subtitle {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  opacity: 0.9;
}

.modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-yes,
.btn-no {
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-yes {
  background: linear-gradient(135deg, #f9a6c6, #f06fa5);
  color: var(--white);
}

.btn-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(240, 111, 165, 0.3);
}

.btn-no {
  background: rgba(255, 212, 229, 0.6);
  color: var(--rose-600);
  border: 2px solid #ffc3dc;
}

.btn-no:hover {
  background: rgba(255, 212, 229, 0.9);
  transform: translateY(-1px);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox.hidden {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 18, 0.75);
  backdrop-filter: blur(3px);
}

.lightbox-image {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 980px);
  max-height: 88vh;
  border-radius: 18px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  animation: fadeUp 180ms ease;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lightbox-caption {
  margin: 0;
  max-width: min(86vw, 620px);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 245, 251, 0.94);
  border: 1px solid rgba(255, 174, 206, 0.9);
  color: #b14678;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
