:root {
  --cream: #fdf6f0;
  --blush: #f9e4e4;
  --rose: #e8a4b8;
  --dusty: #c97a9a;
  --lavender: #d4b8d8;
  --mauve: #5a3d4a;
  --soft: #9b7a88;
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 4px 28px rgba(201, 122, 154, 0.12);
  --shadow-h: 0 10px 40px rgba(201, 122, 154, 0.22);
  --r: 20px;
  --r-sm: 12px;
}

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

body {
  font-family: "Nunito", sans-serif;
  background: var(--cream);
  color: var(--mauve);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "🌸";
  position: fixed;
  font-size: 2rem;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: 1.5rem;
  left: 1.5rem;
  animation: float 6s ease-in-out infinite;
}
body::after {
  bottom: 1.5rem;
  right: 1.5rem;
  animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(10deg);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.header {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
  animation: fadeUp 0.8s ease;
}
.header h1 {
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 700;
  color: var(--dusty);
  line-height: 1.2;
}
.header p {
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--soft);
  margin-top: 0.3rem;
  font-size: 1.05rem;
}
.header .deco {
  margin-top: 0.6rem;
  font-size: 1.3rem;
  letter-spacing: 0.8rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  animation: fadeIn 1s ease 0.3s both;
}
nav button {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  background: transparent;
  color: var(--soft);
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}
nav button:hover {
  background: var(--blush);
  color: var(--dusty);
}
nav button.active {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 2px 12px rgba(232, 164, 184, 0.35);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 1rem 4rem;
}

.section {
  display: none;
  animation: fadeUp 0.45s ease;
}
.section.active {
  display: block;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.section-sub {
  color: var(--soft);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: var(--r);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  transition: box-shadow 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-h);
}

.input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.input-row input,
.input-row textarea {
  flex: 1;
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--blush);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--mauve);
  outline: none;
  transition: border-color 0.3s;
}
.input-row input:focus,
.input-row textarea:focus {
  border-color: var(--rose);
}
.input-row textarea {
  min-height: 80px;
  resize: vertical;
}

.btn {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.25s;
}
.btn-rose {
  background: var(--rose);
  color: #fff;
}
.btn-rose:hover {
  background: var(--dusty);
}
.btn-ghost {
  background: transparent;
  color: var(--soft);
  padding: 0.4rem 0.6rem;
}
.btn-ghost:hover {
  color: var(--dusty);
}

/* Dates */
.date-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(232, 164, 184, 0.15);
  animation: fadeUp 0.3s ease;
}
.date-item:last-child {
  border-bottom: none;
}
.date-item input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--rose);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}
.date-item input[type="checkbox"]:checked {
  background: var(--rose);
}
.date-item input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: 700;
}
.date-item .text {
  flex: 1;
  font-size: 0.95rem;
  transition: all 0.3s;
}
.date-item .text.done {
  text-decoration: line-through;
  opacity: 0.45;
}

/* Gifts */
.lock-screen {
  text-align: center;
  padding: 3rem 1rem;
}
.lock-screen .lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.lock-screen p {
  color: var(--soft);
  margin-bottom: 1.2rem;
}
.lock-screen input {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--blush);
  border-radius: var(--r-sm);
  text-align: center;
  outline: none;
  width: 220px;
  transition: border-color 0.3s;
}
.lock-screen input:focus {
  border-color: var(--rose);
}
.lock-screen .error {
  color: #d9534f;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.gift-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(232, 164, 184, 0.15);
  animation: fadeUp 0.3s ease;
}
.gift-item:last-child {
  border-bottom: none;
}
.gift-item .gift-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--blush);
  flex-shrink: 0;
}
.gift-item .info {
  flex: 1;
  min-width: 0;
}
.gift-item .name {
  font-weight: 600;
  font-size: 0.95rem;
}
.gift-item .note {
  font-size: 0.82rem;
  color: var(--soft);
}
.gift-item .gift-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dusty);
  margin-top: 0.15rem;
}
.gift-item .gift-link {
  font-size: 0.78rem;
  color: var(--rose);
  text-decoration: none;
  word-break: break-all;
}
.gift-item .gift-link:hover {
  text-decoration: underline;
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}
.photo-card {
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  animation: fadeUp 0.4s ease;
  position: relative;
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-h);
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-card .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  padding: 0.6rem 0.5rem 0.4rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.photo-card:hover .photo-overlay {
  opacity: 1;
}
.photo-card .photo-overlay .p-title {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}
.photo-card .del-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.photo-card:hover .del-photo {
  display: flex;
}

#upload-zone {
  border: 2px dashed var(--rose);
  border-radius: var(--r);
  padding: 2rem;
  text-align: center;
  color: var(--soft);
  cursor: pointer;
  transition:
    border-color 0.3s,
    background 0.3s;
  margin-bottom: 1rem;
}
#upload-zone:hover {
  background: rgba(232, 164, 184, 0.06);
}

.upload-fields {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--r-sm);
  animation: fadeUp 0.3s ease;
}
.upload-fields.active {
  display: flex;
}
.upload-fields input {
  font-family: "Nunito", sans-serif;
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--blush);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--mauve);
  outline: none;
  transition: border-color 0.3s;
}
.upload-fields input:focus {
  border-color: var(--rose);
}
.upload-fields .upload-actions {
  display: flex;
  gap: 0.5rem;
}
.upload-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.upload-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--blush);
}

/* Memories */
.memory-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: var(--r);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  animation: fadeUp 0.4s ease;
  position: relative;
}
.memory-card .date {
  font-size: 0.78rem;
  color: var(--soft);
  margin-bottom: 0.3rem;
}
.memory-card .body {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
.memory-card .del-mem {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--soft);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.memory-card:hover .del-mem {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
  user-select: none;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 88vw;
  max-height: 72vh;
  border-radius: var(--r-sm);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease;
}
.lb-info {
  text-align: center;
  margin-top: 1rem;
  color: #fff;
  max-width: 500px;
  padding: 0 1rem;
}
.lb-info .lb-title {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.lb-info .lb-desc {
  font-size: 0.88rem;
  opacity: 0.65;
  line-height: 1.4;
}
.lb-counter {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}
.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 210;
}
.lb-close:hover {
  opacity: 1;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lb-arrow.prev {
  left: 1rem;
}
.lb-arrow.next {
  right: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 500px) {
  nav {
    flex-wrap: wrap;
  }
  nav button {
    font-size: 0.84rem;
    padding: 0.5rem 0.9rem;
  }
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .lb-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
  .lb-arrow.prev {
    left: 0.4rem;
  }
  .lb-arrow.next {
    right: 0.4rem;
  }
}
/* Flores */
.flower-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  animation: fadeUp 0.4s ease;
  position: relative;
  transition: box-shadow 0.3s;
}
.flower-card:hover {
  box-shadow: var(--shadow-h);
}
.flower-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  cursor: pointer;
}
.flower-card .flower-info {
  padding: 1rem 1.2rem;
}
.flower-card .flower-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.flower-card .flower-reason {
  font-size: 0.9rem;
  color: var(--soft);
  line-height: 1.5;
}
.flower-card .flower-date {
  font-size: 0.78rem;
  color: var(--rose);
  margin-top: 0.3rem;
}
.flower-card .del-flower {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.8rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.flower-card:hover .del-flower {
  display: flex;
}
.flower-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.flower-form input {
  font-family: "Nunito", sans-serif;
  font-size: 0.92rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--blush);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--mauve);
  outline: none;
  transition: border-color 0.3s;
}
.flower-form input:focus {
  border-color: var(--rose);
}
.flower-form .flower-row {
  display: flex;
  gap: 0.5rem;
}
.flower-preview-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--blush);
}
/* Calendario */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.calendar-header .month-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.calendar-header button {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--dusty);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.calendar-header button:hover { background: var(--blush); }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-grid .day-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--soft);
  padding: 0.3rem 0;
}
.calendar-grid .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: var(--mauve);
}
.calendar-grid .day:hover { background: var(--blush); }
.calendar-grid .day.empty { cursor: default; }
.calendar-grid .day.empty:hover { background: none; }
.calendar-grid .day.marked {
  background: var(--rose);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232,164,184,0.35);
}
.calendar-grid .day.today {
  border: 2px solid var(--dusty);
}
.calendar-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--soft);
}
.calendar-stats span {
  font-weight: 700;
  color: var(--dusty);
}

.counter {
  margin-top: 0.8rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  color: var(--dusty);
  font-weight: 600;
  letter-spacing: 0.02rem;
}

.counter .count-num {
  font-size: 1.6rem;
  font-family: 'Dancing Script', cursive;
  color: var(--rose);
}
