* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #1a0a0f;
  font-family: 'Lato', sans-serif;
  overflow-x: hidden;
  cursor: default;
}

.petals-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 10px; height: 14px;
  background: #ff6b8a;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0.7; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0;   }
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 50px 20px 30px;
}

.title-main {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 4rem);
  color: #f9d6e0;
  letter-spacing: 2px;
  line-height: 1.2;
}

.title-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #c4748a;
  margin-top: 10px;
  letter-spacing: 4px;
}

.hearts-divider {
  color: #c0392b;
  font-size: 18px;
  margin: 20px 0;
  letter-spacing: 8px;
}

.envelope-section {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.envelope-hint {
  color: #c4748a;
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 30px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

.envelope-wrap {
  position: relative;
  width: 280px;
  height: 200px;
  cursor: pointer;
  transition: transform 0.3s;
}

.envelope-wrap:hover {
  transform: scale(1.05) translateY(-5px);
}

.envelope-body {
  position: absolute;
  bottom: 0;
  width: 280px;
  height: 160px;
  background: #7a1a2e;
  border-radius: 4px 4px 12px 12px;
  border: 1px solid #9e2a40;
  overflow: hidden;
}

.envelope-seal {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 50px;
  background: #e84060;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid #f0728e;
  z-index: 5;
  transition: transform 0.3s, box-shadow 0.3s;
}

.envelope-wrap:hover .envelope-seal {
  transform: translateX(-50%) scale(1.1);
}

.flap {
  position: absolute;
  top: 0; left: 0;
  width: 280px;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 100px solid #5a0f1f;
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.flap.open {
  transform: rotateX(180deg);
}

.left-flap {
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 0;
  border-bottom: 80px solid #4a0d1a;
  border-right: 140px solid transparent;
  z-index: 2;
}

.right-flap {
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-bottom: 80px solid #420c18;
  border-left: 140px solid transparent;
  z-index: 2;
}

.rising-coupon {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 240px;
  background: #fff8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 6;
  pointer-events: none;
}

.rising-coupon.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-120px);
}

.rising-coupon-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.rising-coupon-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  color: #8b1a2e;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.coupons-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px 60px;
  display: none;
}

.coupons-section.visible {
  display: block;
}

.coupons-intro {
  text-align: center;
  color: #c4748a;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.coupon {
  background: #fff8f0;
  border: 1px dashed #d4788a;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeSlideIn 0.5s forwards;
  opacity: 0;
}

.coupon:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 40px rgba(150, 0, 30, 0.2);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1);      }
}

.coupon-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.coupon-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: #c0394e;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.coupon-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #3d0d17;
  margin-bottom: 8px;
  line-height: 1.3;
}

.coupon-desc {
  font-size: 0.82rem;
  color: #7a3040;
  line-height: 1.5;
}

.coupon-number {
  position: absolute;
  top: 12px; left: 14px;
  font-size: 0.65rem;
  color: rgba(192, 57, 78, 0.4);
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.footer-msg {
  text-align: center;
  margin-top: 40px;
  padding: 0 20px;
}

.footer-msg p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #c4748a;
}

.footer-hearts {
  color: #e84060;
  font-size: 20px;
  margin-top: 10px;
  letter-spacing: 6px;
}

/* ── Botón canjear ── */
.coupon-btn {
  margin-top: 14px;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #c0394e;
  border-radius: 20px;
  color: #c0394e;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  font-family: 'Lato', sans-serif;
}

.coupon-btn:hover {
  background: #c0394e;
  color: #fff8f0;
}

/* ── Cupón usado ── */
.coupon.usado {
  opacity: 0.5;
  filter: grayscale(60%);
  border-color: #aaa;
}

.coupon.usado .coupon-title {
  text-decoration: line-through;
  color: #999;
}

.coupon.usado .coupon-btn {
  background: #ccc;
  border-color: #ccc;
  color: #fff;
  cursor: not-allowed;
  pointer-events: none;
}

.usado-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 4px 12px;
}

/* ── Modal de confirmación ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 0, 5, 0.85);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #fff8f0;
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px dashed #d4788a;
}

.modal-overlay.visible .modal-box {
  transform: scale(1);
}

.modal-icon { font-size: 48px; margin-bottom: 12px; }

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #3d0d17;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.85rem;
  color: #7a3040;
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-question {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #c0394e;
  margin-bottom: 20px;
}

.modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-confirmar {
  padding: 10px 24px;
  background: #c0394e;
  border: none;
  border-radius: 20px;
  color: #fff8f0;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.2s;
}

.btn-confirmar:hover { background: #8b1a2e; }

.btn-cancelar {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 20px;
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}

.btn-cancelar:hover { border-color: #999; color: #555; }


/* ── Botón reiniciar ── */
.btn-reiniciar {
  display: block;
  margin: 30px auto 0;
  padding: 10px 28px;
  background: transparent;
  border: 1px solid #c4748a;
  border-radius: 20px;
  color: #c4748a;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.3s, color 0.3s;
}

.btn-reiniciar:hover {
  background: #c4748a;
  color: #fff8f0;
}

/* ══════════════════════════════
   RESPONSIVE MÓVIL
══════════════════════════════ */

@media (max-width: 600px) {

  /* ── Hero ── */
  .hero {
    padding: 36px 16px 20px;
  }

  .title-main {
    font-size: 2.2rem;
    letter-spacing: 1px;
  }

  .title-sub {
    font-size: 0.95rem;
    letter-spacing: 2px;
  }

  .hearts-divider {
    font-size: 15px;
    letter-spacing: 5px;
  }

  /* ── Sobre ── */
  .envelope-section {
    padding: 10px 16px;
  }

  .envelope-hint {
    font-size: 0.75rem;
    letter-spacing: 2px;
  }

  .envelope-wrap {
    width: 220px;
    height: 160px;
  }

  .envelope-body {
    width: 220px;
    height: 126px;
  }

  .flap {
    width: 220px;
    border-left: 110px solid transparent;
    border-right: 110px solid transparent;
    border-top: 80px solid #5a0f1f;
  }

  .left-flap {
    border-bottom: 63px solid #4a0d1a;
    border-right: 110px solid transparent;
  }

  .right-flap {
    border-bottom: 63px solid #420c18;
    border-left: 110px solid transparent;
  }

  .envelope-seal {
    width: 42px;
    height: 42px;
    font-size: 18px;
    bottom: 22px;
  }

  .rising-coupon {
    width: 180px;
    padding: 12px;
  }

  .rising-coupon.visible {
    transform: translateX(-50%) translateY(-100px);
  }

  /* ── Grid de cupones ── */
  .coupons-section {
    margin: 24px auto;
    padding: 0 12px 40px;
  }

  .coupons-intro {
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
  }

  .coupons-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .coupon {
    padding: 20px 16px;
  }

  .coupon-icon {
    font-size: 30px;
  }

  .coupon-title {
    font-size: 1rem;
  }

  .coupon-desc {
    font-size: 0.8rem;
  }

  .coupon-btn {
    padding: 8px 18px;
    font-size: 0.7rem;
  }

  /* ── Modal ── */
  .modal-box {
    padding: 28px 20px;
    max-width: 90%;
  }

  .modal-icon {
    font-size: 38px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-desc {
    font-size: 0.8rem;
  }

  .modal-question {
    font-size: 0.85rem;
  }

  .btn-confirmar,
  .btn-cancelar {
    padding: 9px 18px;
    font-size: 0.72rem;
  }

  /* ── Footer ── */
  .footer-msg p {
    font-size: 0.95rem;
  }

  .footer-hearts {
    font-size: 16px;
    letter-spacing: 4px;
  }

  .btn-reiniciar {
    font-size: 0.7rem;
    padding: 9px 22px;
  }
}

/* Tablets */
@media (min-width: 601px) and (max-width: 900px) {

  .coupons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .title-main {
    font-size: 3rem;
  }

  .envelope-wrap {
    width: 260px;
    height: 186px;
  }

  .envelope-body {
    width: 260px;
    height: 148px;
  }

  .flap {
    width: 260px;
    border-left: 130px solid transparent;
    border-right: 130px solid transparent;
    border-top: 94px solid #5a0f1f;
  }

  .left-flap {
    border-bottom: 74px solid #4a0d1a;
    border-right: 130px solid transparent;
  }

  .right-flap {
    border-bottom: 74px solid #420c18;
    border-left: 130px solid transparent;
  }
}