@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Montserrat:wght@200;300;400;500;600;700&display=swap');

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

:root {
  /* PALETA INTENSA CON GRADIENTES */
  --color-lila-1:      #B878E8;    /* lila brillante */
  --color-lila-2:      #A058D0;    /* lila medio */
  --color-lila-3:      #8840B8;    /* lila profundo */
  --color-rose-1:      #E888C0;    /* rosa brillante */
  --color-rose-2:      #D068A8;    /* rosa medio */
  --color-rose-3:      #B84890;    /* rosa profundo */
  --color-gold-1:      #F0C088;    /* dorado claro */
  --color-gold-2:      #E8A868;    /* dorado medio */
  --color-mint-1:      #88D0B8;    /* menta brillante */
  --color-mint-2:      #68B898;    /* menta medio */
  
  --color-primary:     #1A0830;    /* violeta muy profundo */
  --color-muted:       #5A4078;    /* lila oscuro para texto */
  --color-danger:      #E87898;    /* rosa coral */
  
  --font-serif:        'Cormorant Garamond', serif;
  --font-sans:         'Montserrat', sans-serif;
  
  /* TAMAÑOS DE FUENTE */
  --text-xs: 12px;
  --text-sm: 15px;
  --text-base: 17px;
  --text-md: 22px;
  --text-lg: 30px;
  --text-xl: 48px;
  --text-2xl: 96px;
}

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(145deg, #D8B8F0 0%, #C8A0E8 100%);
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── PAGE ── */
.page { max-width: 540px; margin: 0 auto; text-align: center; }

/* ── PANTALLA DE BIENVENIDA ── */
#welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #D0A8F0 0%, #A878D8 70%, #9040B8 100%);
  padding: 2rem;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
#welcome-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ws-label {
  font-size: var(--text-xs);
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--color-rose-2);
  font-weight: 600;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 5px rgba(232, 136, 192, 0.5);
}
.ws-name {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 500;
  background: linear-gradient(135deg, #F0E8FF, #E8C8FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 15px rgba(120, 64, 160, 0.3);
  line-height: 1;
  margin-bottom: 0.6rem;
}
.ws-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  color: #E8C8FF;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2.5rem;
}
.ws-btn {
  padding: 16px 48px;
  border: 1.5px solid var(--color-rose-1);
  color: var(--color-rose-1);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50px;
}
.ws-btn:hover { 
  background: rgba(232, 136, 192, 0.3);
  border-color: #F0C088;
  color: #F0C088;
  transform: scale(1.02);
}
.ws-btn:active { transform: scale(0.98); }
.ws-note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin-top: 1.2rem;
  letter-spacing: 1px;
}

/* ── BOTÓN MÚSICA ── */
#music-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 120, 232, 0.6);
  background: linear-gradient(135deg, rgba(216, 184, 240, 0.95), rgba(192, 152, 224, 0.95));
  backdrop-filter: blur(12px);
  color: #A058D0;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
#music-btn:hover { 
  border-color: #88D0B8;
  color: #88D0B8;
  transform: scale(1.12);
  box-shadow: 0 6px 25px rgba(136, 208, 184, 0.3);
}
#music-btn.playing { 
  border-color: #E888C0;
  color: #E888C0;
  background: linear-gradient(135deg, rgba(232, 136, 192, 0.2), rgba(208, 104, 168, 0.2));
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  background: radial-gradient(ellipse at 50% 45%, #D8B0F0 0%, #C088E0 50%, #B070D0 100%);
  overflow: hidden;
}
.hero__ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.3;
}
.hero__ring svg { width: 85%; max-width: 400px; }
.hero__ring circle {
  stroke: #E8C8FF;
  stroke-width: 0.6;
}

.tag {
  font-size: var(--text-xs);
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--color-rose-1);
  font-weight: 600;
  margin-bottom: 2rem;
  text-shadow: 0 0 4px rgba(232, 136, 192, 0.5);
}
.subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  letter-spacing: 5px;
  color: #E8C0FF;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.name {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(135deg, #F8F0FF, #E8D0FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(128, 64, 168, 0.3);
}
.name--sm { font-size: 56px; }
.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: #E8D0FF;
  line-height: 1.9;
  max-width: 340px;
  margin: 1.8rem auto 0;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── DIVISORES ── */
.divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E8C0FF, #A058D0, #E8C0FF, transparent);
  margin: 2rem auto;
}
.divider--rose { background: linear-gradient(90deg, transparent, #F0A0D0, #D068A8, #F0A0D0, transparent); }
.divider--gold { background: linear-gradient(90deg, transparent, #F8D0A0, #E8A868, #F8D0A0, transparent); }

/* ── COUNTDOWN ── */
.countdown { display: flex; gap: 2rem; margin: 2.5rem auto; justify-content: center; }
.cdown-item { display: flex; flex-direction: column; align-items: center; }
.cdown-num {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 600;
  background: linear-gradient(135deg, #F8E8FF, #D8B0F0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  text-shadow: 0 0 20px rgba(216, 176, 240, 0.5);
}
.cdown-label {
  font-size: var(--text-xs);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D8B8F0;
  font-weight: 600;
  margin-top: 8px;
}
.countdown--done {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  background: linear-gradient(135deg, #F0E0FF, #D8B8F0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── SECCIONES ── */
.section {
  padding: 4.5rem 2rem;
  border-top: 1px solid rgba(184, 120, 232, 0.3);
}
.section--rose-bg {
  background: linear-gradient(180deg, #C898E8 0%, #D8B0F0 100%);
  border-top-color: rgba(232, 136, 192, 0.4);
}
.section--gold-bg {
  background: linear-gradient(180deg, #D4B0EC 0%, #C498E4 100%);
  border-top-color: rgba(232, 168, 104, 0.4);
}
.section--confirm {
  background: linear-gradient(180deg, #D0A0E8 0%, #C088E0 100%);
  border-top: 1px solid rgba(232, 136, 192, 0.4);
  padding: 5rem 2rem;
}
.section__icon { font-size: 38px; margin-bottom: 1.2rem; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
.section__label {
  font-size: var(--text-xs);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #E8C8FF;
  font-weight: 600;
  margin-bottom: 1rem;
}
.section__label--rose { color: #F0B0D8; }
.section__label--gold { color: #F8D0A8; }
.section__value {
  font-family: var(--font-serif);
  font-size: 32px;
  color: #1A0830;
  line-height: 1.4;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255,255,255,0.3);
}
.section__sub {
  font-size: var(--text-sm);
  letter-spacing: 3px;
  color: #E8C8FF;
  margin-top: 10px;
  font-weight: 500;
}

/* ── DRESS CARD ── */
.dress-card {
  background: rgba(26, 8, 48, 0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(232, 136, 192, 0.5);
  border-radius: 20px;
  padding: 2rem;
  margin: 1.5rem auto 0;
  max-width: 340px;
}
.dress-card .section__value {
  font-size: 26px;
  margin-bottom: 0.8rem;
}
.dress-rule { 
  font-size: var(--text-sm); 
  color: #E8D0FF; 
  letter-spacing: 2px; 
  margin-top: 1rem;
  font-weight: 500;
}
.dress-rule strong { color: #F0A0B8; font-weight: 700; }

/* ── ALIAS BOX ── */
.alias-box {
  background: rgba(232, 168, 104, 0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(232, 168, 104, 0.5);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto 0;
  max-width: 340px;
}
.alias-box p { 
  font-size: var(--text-sm); 
  color: #E8D8F0; 
  letter-spacing: 1px; 
  line-height: 2.2;
  font-weight: 500;
}
.alias-box span { 
  background: linear-gradient(135deg, #F8E0FF, #E0B8F8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: var(--text-base);
  font-weight: 700;
}
.gift-note { 
  font-size: var(--text-sm); 
  color: #E8D0FF; 
  line-height: 1.9; 
  margin-top: 1rem;
  font-weight: 500;
}

/* ── BOTONES ── */
.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 16px 42px;
  border: 1.5px solid rgba(184, 120, 232, 0.7);
  background: rgba(26, 8, 48, 0.15);
  backdrop-filter: blur(4px);
  color: #E8C8FF;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: 50px;
}
.btn:hover { 
  background: rgba(136, 208, 184, 0.25);
  border-color: #88D0B8;
  color: #C8F0E0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(136, 208, 184, 0.3);
}
.btn:active { transform: translateY(1px); }
.btn--rose { 
  border-color: rgba(232, 136, 192, 0.7);
  color: #F0C8E0;
}
.btn--rose:hover { 
  background: rgba(232, 136, 192, 0.25);
  border-color: #E888C0;
  color: #F8E0F0;
}

/* ── CLOSING ── */
.closing-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  background: linear-gradient(135deg, #F8E0FF, #E8C0F8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 1.8rem;
  text-shadow: 0 2px 8px rgba(184, 120, 232, 0.3);
}

/* ── FOOTER ── */
.footer { padding: 2rem; border-top: 1px solid rgba(184, 120, 232, 0.2); }
.footer p { 
  font-size: var(--text-xs); 
  letter-spacing: 2px; 
  color: rgba(232, 200, 255, 0.5);
}

/* ── FADE UP ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 400px) {
  .name      { font-size: 72px; }
  .name--sm  { font-size: 48px; }
  .cdown-num { font-size: 56px; }
  .countdown { gap: 1.5rem; }
  .ws-name   { font-size: 64px; }
  .closing-phrase { font-size: 28px; }
}

.photo-section {
    padding: 30px;
    width: 60%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    margin: 30px auto;
    background-image: url('../images/img-04.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 4px solid #E888C0;
    box-shadow: 0 10px 35px rgba(160, 88, 208, 0.5);
}

/* ══════════════════════════════════════
   CALENDARIO
══════════════════════════════════════ */
.cal {
  margin: 2rem auto 0;
  max-width: 340px;
  background: rgba(26, 8, 48, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(184, 120, 232, 0.4);
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
}

.cal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: rgba(184, 120, 232, 0.15);
  border-bottom: 1px solid rgba(184, 120, 232, 0.3);
}
.cal__month {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(135deg, #F8E8FF, #E0C0F8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}
.cal__nav {
  background: transparent;
  border: none;
  color: #E8C8FF;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}
.cal__nav:hover { color: #88D0B8; background: rgba(136, 208, 184, 0.2); }

.cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 1rem 0.5rem 0.5rem;
}
.cal__wd {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #E8C8FF;
  text-align: center;
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0.2rem 0.5rem 1rem;
  gap: 4px;
}
.cal__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #E8D8F0;
  border-radius: 50%;
  cursor: default;
  transition: background 0.2s;
  position: relative;
}
.cal__day--empty { opacity: 0; pointer-events: none; }
.cal__day--other { color: rgba(232, 216, 240, 0.35); }

.cal__day--event {
  background: radial-gradient(circle, rgba(232, 136, 192, 0.4) 0%, rgba(184, 120, 232, 0.25) 100%);
  color: #1A0830 !important;
  font-weight: 700;
  border: 1px solid rgba(232, 136, 192, 0.8);
  animation: pulseDay 2.4s ease-in-out infinite;
}
.cal__day--event::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #E888C0;
  box-shadow: 0 0 10px #E888C0;
}

.cal__day--today {
  color: #88D0B8;
  font-weight: 700;
  border: 1px solid rgba(136, 208, 184, 0.7);
}

@keyframes pulseDay {
  0%,100% { box-shadow: 0 0 0 0 rgba(232, 136, 192, 0.5); }
  50%      { box-shadow: 0 0 0 10px rgba(232, 136, 192, 0); }
}

.cal__legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 0 0.8rem 1.2rem;
  flex-wrap: wrap;
}
.cal__leg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #E8C8FF;
}
.cal__leg-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal__leg-dot--event { background: #E888C0; box-shadow: 0 0 8px #E888C0; }
.cal__leg-dot--today { background: #88D0B8; }

/* ══════════════════════════════════════
   SECCIÓN MENSAJES
══════════════════════════════════════ */
.section--msgs {
  background: linear-gradient(180deg, #D0A0E8 0%, #C890E0 100%);
}
.msgs-intro {
  font-size: var(--text-sm);
  color: #E8D0FF;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  line-height: 1.8;
}

.msg-form {
  margin: 2rem auto 0;
  max-width: 380px;
  text-align: left;
}
.msg-form__row { position: relative; margin-bottom: 14px; }
.msg-input {
  width: 100%;
  background: rgba(26, 8, 48, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(184, 120, 232, 0.5);
  border-radius: 14px;
  padding: 14px 18px;
  color: #1A0830;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  outline: none;
  transition: all 0.25s ease;
  resize: none;
}
.msg-input::placeholder { color: rgba(26, 8, 48, 0.4); }
.msg-input:focus { border-color: #E888C0; background: rgba(232, 136, 192, 0.1); }
.msg-textarea { min-height: 100px; padding-bottom: 26px; }
.msg-counter {
  position: absolute;
  bottom: 10px; right: 14px;
  font-size: var(--text-xs);
  color: rgba(26, 8, 48, 0.5);
  font-weight: 500;
  pointer-events: none;
}
.msg-error {
  font-size: var(--text-xs);
  color: #F0A0B8;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.msg-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgba(232, 136, 192, 0.2), rgba(184, 120, 232, 0.2));
  border: 1px solid rgba(232, 136, 192, 0.5);
  border-radius: 50px;
  color: #F0C8E0;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.msg-submit:hover { 
  background: linear-gradient(135deg, rgba(232, 136, 192, 0.35), rgba(184, 120, 232, 0.35));
  border-color: #E888C0;
  transform: scale(1.02);
}
.msg-submit:active { transform: scale(0.98); }

.msg-list {
  margin: 2rem auto 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg-card {
  background: rgba(26, 8, 48, 0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(184, 120, 232, 0.4);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  text-align: left;
  animation: msgIn 0.5s ease forwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.msg-card__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: #1A0830;
  flex-shrink: 0;
  background: rgba(232, 200, 255, 0.3);
  border: 1px solid rgba(232, 136, 192, 0.5);
}
.msg-card__meta { flex: 1; min-width: 0; }
.msg-card__name {
  font-size: var(--text-sm);
  font-weight: 700;
  background: linear-gradient(135deg, #F8E0FF, #E0B8F8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}
.msg-card__date {
  font-size: var(--text-xs);
  color: rgba(232, 200, 255, 0.6);
  font-weight: 500;
  margin-top: 2px;
}
.msg-card__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  color: #1A0830;
  line-height: 1.7;
}
.msg-card__butterfly {
  float: right;
  font-size: 18px;
  margin-left: 8px;
  opacity: 0.7;
}

.msg-empty {
  text-align: center;
  padding: 2rem 1rem;
  font-size: var(--text-sm);
  color: rgba(232, 200, 255, 0.6);
  font-weight: 500;
  letter-spacing: 1px;
  display: none;
}

.msg-loading {
  text-align: center;
  padding: 1.5rem;
}
.msg-spinner {
  display: inline-block;
  width: 28px; height: 28px;
  border: 2px solid rgba(184, 120, 232, 0.2);
  border-top-color: #E888C0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.footer > p {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-rose-3);
}

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