/* ==============================================================================
   CALENDARIO DE ADVIENTO - ESTÉTICA NAVIDEÑA Y ROMÁNTICA DE LUJO
   Inspirado en el estilo cálido de 24puertas.com
   ============================================================================== */

:root {
  --bg-gradient-top: #1f0b12;
  --bg-gradient-bottom: #3d0d1b;
  --primary-red: #7c1a2d;
  --dark-red: #520f1c;
  --accent-gold: #e2ba59;
  --gold-glow: rgba(226, 186, 89, 0.45);
  --gold-light: #fae8b2;
  --pine-green: #1f472e;
  --cream-card: #fdfaf3;
  --cream-text: #2c2321;
  --text-light: #fef7ec;
  --shadow-deep: 0 16px 36px rgba(0, 0, 0, 0.55);
  --border-gold: 1px solid rgba(226, 186, 89, 0.35);
  --door-closed-bg: linear-gradient(145deg, #872033, #5a1120);
  --door-opened-bg: linear-gradient(145deg, #1f472e, #13301f);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background: radial-gradient(circle at 50% 15%, #421020 0%, #20060e 65%, #0f0307 100%);
  color: var(--text-light);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* Lienzo de nieve ambiental */
#snowCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Luces de Navidad superiores */
.fairy-lights {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.fairy-lights .light {
  width: 12px;
  height: 18px;
  border-radius: 50% 50% 45% 45%;
  margin-top: -4px;
  position: relative;
  animation: lightTwinkle 1.8s infinite alternate ease-in-out;
}

.fairy-lights .light.red {
  background: #ff3344;
  box-shadow: 0 4px 14px #ff3344;
  animation-delay: 0.1s;
}
.fairy-lights .light.gold {
  background: #ffcc00;
  box-shadow: 0 4px 14px #ffcc00;
  animation-delay: 0.6s;
}
.fairy-lights .light.green {
  background: #27ae60;
  box-shadow: 0 4px 14px #27ae60;
  animation-delay: 1.1s;
}
.fairy-lights .light.blue {
  background: #3498db;
  box-shadow: 0 4px 14px #3498db;
  animation-delay: 0.3s;
}

@keyframes lightTwinkle {
  0% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); }
}

/* Barra de controles superiores */
.top-controls {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.control-btn {
  background: rgba(26, 6, 12, 0.85);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.control-btn:hover {
  background: var(--primary-red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--gold-glow);
}

.control-btn.active {
  background: #1e5a2b;
  color: #fff;
  border-color: #5cd88a;
  box-shadow: 0 0 14px rgba(92, 216, 138, 0.45);
}

.test-btn.active {
  background: #d4af37;
  color: #2c0e14;
  border-color: #fff;
}

/* Contenedor principal */
.calendar-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 18px 20px;
  position: relative;
  z-index: 15;
}

/* Encabezado */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.decorative-ribbon {
  display: inline-block;
  background: linear-gradient(90deg, transparent, rgba(226, 186, 89, 0.25), transparent);
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 4px 22px;
  margin-bottom: 12px;
  border-radius: 20px;
}

.main-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 20px rgba(226, 186, 89, 0.35), 0 2px 4px rgba(0,0,0,0.8);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.dedication {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 4vw, 2.7rem);
  color: var(--accent-gold);
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.dedication .highlight-name {
  color: #fff;
  text-decoration: underline wavy var(--accent-gold);
  text-underline-offset: 6px;
}

.subtitle {
  font-size: 1.05rem;
  color: #ecdcc9;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.countdown-bar {
  display: inline-flex;
  gap: 20px;
  background: rgba(45, 12, 22, 0.7);
  border: 1px solid rgba(226, 186, 89, 0.3);
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  flex-wrap: wrap;
  justify-content: center;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
}

.test-banner {
  margin-top: 16px;
  background: rgba(226, 186, 89, 0.18);
  border: 1px dashed var(--accent-gold);
  padding: 10px 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ==============================================================================
   CUADRÍCULA DE REGALOS (BENTO / MASONRY GRID CON DISTINTOS TAMAÑOS)
   ============================================================================== */
.doors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 135px;
  grid-auto-flow: dense;
  gap: 14px;
  perspective: 1000px;
  margin-bottom: 50px;
}

@media (min-width: 600px) {
  .doors-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 145px;
    gap: 16px;
  }
}

@media (min-width: 960px) {
  .doors-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 155px;
    gap: 18px;
  }
}

/* Tamaños de las cajas de regalo */
.door-card {
  position: relative;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.25s ease;
}

.door-card.size-normal {
  grid-column: span 1;
  grid-row: span 1;
}

.door-card.size-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.door-card.size-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.door-card.size-big {
  grid-column: span 2;
  grid-row: span 2;
}

.door-card:hover {
  transform: translateY(-5px) scale(1.02);
  z-index: 5;
}

/* Interior de la caja de regalo */
.door-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.55), inset 0 2px 4px rgba(255,255,255,0.15);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px;
  overflow: hidden;
  transition: all 0.35s ease;
}

/* ==============================================================================
   COLORES Y ESTILOS DE ENVOLTORIO DE REGALO
   ============================================================================== */
/* Rojo Clásico */
.door-card.theme-red .door-inner {
  background: linear-gradient(135deg, #8b182b, #560a18);
  border-color: rgba(235, 190, 95, 0.45);
}
.door-card.theme-red .ribbon-v,
.door-card.theme-red .ribbon-h {
  background: linear-gradient(90deg, #f3d179, #d4af37, #b8860b);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}
.door-card.theme-red .ribbon-bow {
  background: radial-gradient(circle, #ffeaa7, #d4af37);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Verde Abeto */
.door-card.theme-green .door-inner {
  background: linear-gradient(135deg, #1c4e2e, #0d2817);
  border-color: rgba(243, 229, 171, 0.45);
}
.door-card.theme-green .ribbon-v,
.door-card.theme-green .ribbon-h {
  background: linear-gradient(90deg, #fff3cb, #e5c158, #c99c2d);
  box-shadow: 0 0 6px rgba(229, 193, 88, 0.4);
}
.door-card.theme-green .ribbon-bow {
  background: radial-gradient(circle, #fff3cb, #e5c158);
}

/* Dorado Lujo */
.door-card.theme-gold .door-inner {
  background: linear-gradient(135deg, #d4a737, #966f1e);
  border-color: rgba(255, 255, 255, 0.5);
}
.door-card.theme-gold .ribbon-v,
.door-card.theme-gold .ribbon-h {
  background: linear-gradient(90deg, #801020, #a81c30, #600b17);
  box-shadow: 0 0 6px rgba(128, 16, 32, 0.4);
}
.door-card.theme-gold .ribbon-bow {
  background: radial-gradient(circle, #c92a43, #801020);
}

/* Azul Noche Polar */
.door-card.theme-blue .door-inner {
  background: linear-gradient(135deg, #1c325c, #0d1830);
  border-color: rgba(200, 220, 255, 0.4);
}
.door-card.theme-blue .ribbon-v,
.door-card.theme-blue .ribbon-h {
  background: linear-gradient(90deg, #f5f7fa, #d0dbe5, #a3b8cc);
  box-shadow: 0 0 6px rgba(208, 219, 229, 0.4);
}
.door-card.theme-blue .ribbon-bow {
  background: radial-gradient(circle, #ffffff, #b5c7da);
}

/* Papel Kraft Rústico */
.door-card.theme-kraft .door-inner {
  background: linear-gradient(135deg, #966f4e, #69492f);
  border-color: rgba(230, 200, 160, 0.35);
}
.door-card.theme-kraft .ribbon-v,
.door-card.theme-kraft .ribbon-h {
  background: repeating-linear-gradient(45deg, #fff, #fff 6px, #c0392b 6px, #c0392b 12px);
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
.door-card.theme-kraft .ribbon-bow {
  background: radial-gradient(circle, #e74c3c, #962d22);
}

/* Burdeos Terciopelo */
.door-card.theme-berry .door-inner {
  background: linear-gradient(135deg, #611333, #38081c);
  border-color: rgba(243, 215, 160, 0.4);
}
.door-card.theme-berry .ribbon-v,
.door-card.theme-berry .ribbon-h {
  background: linear-gradient(90deg, #f7dfa5, #d4af37, #a48120);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}
.door-card.theme-berry .ribbon-bow {
  background: radial-gradient(circle, #fae8b2, #d4af37);
}

/* ==============================================================================
   ESTAMPADOS Y TEXTURAS DEL PAPEL DE REGALO
   ============================================================================== */
.door-card.pattern-stars .door-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 235, 170, 0.18) 1.5px, transparent 1.5px),
                    radial-gradient(rgba(255, 235, 170, 0.12) 1px, transparent 1px);
  background-size: 26px 26px, 13px 13px;
  background-position: 0 0, 13px 13px;
  pointer-events: none;
}

.door-card.pattern-snowflakes .door-inner::before {
  content: '❄';
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.14);
  pointer-events: none;
  text-shadow: 30px 40px 0 rgba(255,255,255,0.1),
               70px 15px 0 rgba(255,255,255,0.12),
               50px 70px 0 rgba(255,255,255,0.08);
}

.door-card.pattern-stripes .door-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,0.05) 12px, rgba(255,255,255,0.05) 24px);
  pointer-events: none;
}

/* ==============================================================================
   CINTAS Y LAZOS EN 3D
   ============================================================================== */
.ribbon-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.ribbon-h {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.ribbon-bow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

/* ==============================================================================
   ETIQUETA COLGANTE DE REGALO (CON EL NÚMERO DEL DÍA)
   ============================================================================== */
.gift-tag {
  position: relative;
  z-index: 4;
  background: rgba(254, 250, 240, 0.96);
  color: #38121a;
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45), 0 0 0 1px rgba(226, 186, 89, 0.6);
  min-width: 62px;
  transform: rotate(-3deg);
  transition: transform 0.25s ease;
}

.door-card:hover .gift-tag {
  transform: rotate(0deg) scale(1.08);
}

.gift-tag-string {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8860b;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.door-number {
  font-family: 'Cinzel', serif;
  font-size: 1.85rem;
  font-weight: 900;
  color: #560a18;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.door-card.size-big .door-number {
  font-size: 2.8rem;
}

.door-badge {
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7a5024;
  font-weight: 700;
  margin-top: 2px;
}

/* ESTADO: BLOQUEADA (Día futuro) */
.door-card.locked .door-inner {
  filter: brightness(0.92) saturate(0.9);
}

.door-card.locked .lock-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffeedb;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* Animación de temblor cuando se hace clic en una bloqueada */
.door-card.shake {
  animation: doorShake 0.45s ease-in-out;
}

@keyframes doorShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px) rotate(-1deg); }
  40%, 80% { transform: translateX(6px) rotate(1deg); }
}

/* ESTADO: DISPONIBLE HOY (Luz pulsante) */
.door-card.today .door-inner {
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.65), 0 8px 20px rgba(0,0,0,0.5);
  animation: pulseGold 2s infinite ease-in-out;
}

.door-card.today .gift-tag {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 4px 10px rgba(0,0,0,0.4);
}

.door-card.today::after {
  content: '✨ ¡ÁBREME! ✨';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd700;
  color: #460914;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 10;
}

@keyframes pulseGold {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 28px rgba(255, 215, 0, 0.85); }
}

/* ESTADO: YA ABIERTA */
.door-card.opened .door-inner {
  filter: brightness(0.85);
  border-color: rgba(90, 190, 120, 0.6);
}

.door-card.opened .gift-tag {
  background: #eafaf1;
  border-color: #5ab879;
}

.door-card.opened .door-number {
  color: #1a562f;
}

.door-card.opened .door-badge {
  color: #27ae60;
  font-weight: 800;
}

/* ==============================================================================
   MODAL / POPUP DE LA SORPRESA
   ============================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 3, 6, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--cream-card);
  color: var(--cream-text);
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  border-radius: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(226, 186, 89, 0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

/* Cinta superior del modal */
.modal-ribbon {
  background: var(--primary-red);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  border-bottom: 2px solid var(--accent-gold);
}

.modal-day-badge {
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
}

.modal-close:hover {
  transform: scale(1.2);
  color: var(--accent-gold);
}

.modal-content-scroll {
  padding: 24px 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  text-align: center;
}

.wax-seal {
  width: 44px;
  height: 44px;
  background: #9b1c2b;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 10px;
  box-shadow: 0 4px 10px rgba(155, 28, 43, 0.4), inset 0 2px 4px rgba(255,255,255,0.3);
  border: 2px dashed rgba(255,255,255,0.4);
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: #4a0d18;
  line-height: 1.25;
}

/* Foto estilo Polaroid */
.polaroid-wrapper {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.polaroid-frame {
  background: #fff;
  padding: 10px 10px 24px;
  border-radius: 3px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.22);
  transform: rotate(-1.5deg);
  position: relative;
  max-width: 340px;
  width: 100%;
}

.tape-strip {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  backdrop-filter: blur(2px);
  border-left: 1px dashed rgba(0,0,0,0.1);
  border-right: 1px dashed rgba(0,0,0,0.1);
}

.polaroid-frame img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

/* Caja de Mensaje / Carta */
.modal-message-box {
  background: #fff9f0;
  border: 1px solid #ebd9c5;
  border-left: 4px solid var(--primary-red);
  border-radius: 8px;
  padding: 16px;
}

.modal-message {
  font-size: 1rem;
  line-height: 1.7;
  color: #3b2c28;
  white-space: pre-line;
}

/* Vale canjeable / Ticket */
.coupon-ticket {
  background: linear-gradient(135deg, #fff7dc, #fee7b0);
  border: 2px dashed #cca040;
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.2);
}

.coupon-left {
  background: #cca040;
  color: #fff;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.coupon-right {
  padding: 14px 18px;
  flex: 1;
}

.coupon-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8c6414;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.coupon-desc {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3d280b;
  margin-bottom: 6px;
  line-height: 1.4;
}

.coupon-code {
  font-size: 0.7rem;
  color: #8c6414;
  font-style: italic;
}

/* Enlace a Canción */
.song-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f1f8f3;
  border: 1px solid #c0e0cc;
  padding: 12px 16px;
  border-radius: 10px;
}

.song-icon {
  font-size: 1.6rem;
}

.song-details {
  font-size: 0.88rem;
  color: #1a4227;
}

.song-details a {
  color: #1a753c;
  font-weight: 700;
  text-decoration: underline;
}

/* Botón inferior del modal y canje de boletos */
.modal-footer {
  padding: 16px 20px;
  background: #f7ede2;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid #e7d7c6;
}

.action-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.action-btn {
  background: linear-gradient(135deg, #87192d, #5a0e1c);
  color: #fff;
  border: 1px solid var(--accent-gold);
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 26, 45, 0.45);
  transition: all 0.25s ease;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 26, 45, 0.65);
  background: linear-gradient(135deg, #a52037, #6e1324);
}

.redeem-options {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #dfc7b0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.redeem-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a2818;
  display: block;
  margin-bottom: 6px;
}

.redeem-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.redeem-input-row input[type="date"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cca040;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #333;
  outline: none;
}

.btn-chip {
  background: #fff4d1;
  border: 1px solid #d4af37;
  color: #7a5010;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-chip:hover {
  background: #ffd700;
  color: #3b2203;
}

.redeem-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.share-img-btn {
  flex: 2;
  background: linear-gradient(135deg, #1b8a47, #0f5c2b);
  border: 1px solid #4cdb83;
  color: #fff;
  padding: 12px 18px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(27, 138, 71, 0.45);
  transition: all 0.25s ease;
}

.share-img-btn:hover {
  background: linear-gradient(135deg, #22a857, #137437);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(27, 138, 71, 0.65);
}

.btn-download-img {
  flex: 1;
  background: #fdfaf3;
  border: 1px solid #cca040;
  color: #5c3f15;
  padding: 12px 14px;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-download-img:hover {
  background: #f5ecd6;
  transform: translateY(-2px);
}
  background: #20b858;
}

.btn-copy {
  background: #f1f1f1;
  color: #444;
  border: 1px solid #ccc;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: #e2e2e2;
}

.redeem-feedback {
  font-size: 0.82rem;
  color: #1a753c;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
}

/* Toast de notificación */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(30, 8, 14, 0.95);
  border: 1px solid var(--accent-gold);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 600;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: none;
  text-align: center;
  max-width: 90%;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Pie de página */
.footer {
  text-align: center;
  font-size: 0.9rem;
  color: #e5cdb4;
  margin-top: 30px;
  line-height: 1.6;
}

.footer-small {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Adaptación a móviles pequeños */
@media (max-width: 480px) {
  .doors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .door-number {
    font-size: 1.8rem;
  }
  .top-controls .label {
    display: none;
  }
  .top-controls .control-btn {
    padding: 8px 10px;
  }
  .modal-content-scroll {
    padding: 18px 14px 12px;
  }
}

/* ==============================================================================
   MODAL DE AUTENTICACIÓN / CONTRASEÑA PARA ENTRAR AL CALENDARIO
   ============================================================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 3, 7, 0.96);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  background: radial-gradient(circle at 50% 10%, #3d121e, #220810);
  border: 2px solid var(--accent-gold);
  color: var(--text-light);
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--gold-glow);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.auth-modal-overlay.active .auth-modal-card {
  transform: translateY(0) scale(1);
}

.auth-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(226, 186, 89, 0.4));
}

.auth-modal-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 10px;
}

.auth-modal-card p {
  font-size: 0.92rem;
  color: #ebd9c5;
  line-height: 1.6;
  margin-bottom: 22px;
}

.auth-input {
  width: 100%;
  background: rgba(15, 3, 7, 0.7);
  border: 1px solid rgba(226, 186, 89, 0.5);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1.15rem;
  color: #fff;
  text-align: center;
  outline: none;
  margin-bottom: 14px;
  transition: border 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #27060e;
  border: none;
  padding: 14px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.auth-error-msg {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

.auth-footer-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 186, 89, 0.2);
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.82rem;
}

.auth-footer-links a {
  color: var(--accent-gold);
  text-decoration: underline;
  cursor: pointer;
}

/* Badge de código de calendario en encabezado */
.calendar-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(226, 186, 89, 0.15);
  border: 1px dashed rgba(226, 186, 89, 0.4);
  color: var(--gold-light);
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 0.78rem;
  margin-top: 10px;
}

.calendar-code-badge button {
  background: none;
  border: none;
  color: #ffd700;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
}
