@property --flap-rotation{
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
@property --progress{
    syntax: "<percentage>";
    inherits: false;
    initial-value: 0%;
}
@property --text{
    syntax: "<number>";
    inherits: false;
    initial-value: 0.0;
}
@property --scale{
    syntax: "<number>";
    inherits: false;
    initial-value: 1;
}
@property --heart-left{
    syntax: "<percentage>";
    inherits: false;
    initial-value: 50%;
}
@property --heart-top{
    syntax: "<length>";
    inherits: false;
    initial-value: 0;
}

*{
    box-sizing: border-box;
}

body{
    height: 250vh;
    overflow-x: hidden;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-repeat: no-repeat
}

html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.scroll-indicator{
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 100px;
    z-index: 1000;
    animation: scroll-bounce 2s infinite;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hide{
    opacity: 0;
    pointer-events: none;
}

.top-controls.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

@keyframes scroll-bounce{

    40%{
        transform: translateX(-50%) translateY(-10px);
    }
    60%{
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes bounce{
    0%, 20%, 50%, 80%, 100%{
        transform: translateY(-50%) translateX(0);
    }
    
    40%{
        transform: translateY(-50%) translateX(-10px);
    }
    60%{
        transform: translateY(-50%) translateX(10px);
    }
}
.grid-template{
    top: 0;
    left: 0;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    /*padding: 2rem;*/
    align-content: center;
}


.envelope{
    container: envelope/ inline-size;
    perspective: 1000px;
    position: relative;
    width: 60vmin;
    aspect-ratio: 16/9;
    --tw-bg-opacity:1;
    background-color: rgb(226 232 240 / var(--tw-bg-opacity));
    --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
                 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    border-radius: 10px;
}

.flap{
   --tw-bg-opacity:1;
   background-color: rgb(203 213 225 / var(--tw-bg-opacity));
   clip-path: polygon(100% 0%, 0 0%, 50% 100% );
   width: 100cqw;
   height: 30cqw;
   transform-style: preserve-3d;
   transform: rotateX(var(--flap-rotation));
   transform-origin: 50% 0;
   animation: animate-flap ease both;
   animation-timeline: scroll();
   animation-range: 0 60%;
   z-index: 4;
   position: relative;
   border-radius: 10px;
}

.face{
    clip-path: polygon(50% 45%, 100% 0, 100% 100%, 0 100%, 0 0);
    --tw-bg-opacity:1;
    background-color: rgb(241 245 249 / var(--tw-bg-opacity));
    inset: 0px;
    position: absolute;
    z-index: 3;
    border-radius: 10px;
}

.sello{
  position: absolute;
  right: 40px;
  top: 45%;
  /* transform: translateY(-50%); */
  width: 25%;
  height: auto;
  z-index: 5;
  transform: rotate(-20deg);
}

.heart{
    --c: red;
    position: absolute;
    width: 50cqw;
    left: var(--heart-left);
    top: var(--heart-top);
    transform: translateX(-50%) translateY(var(--progress)) scale(var(--scale));
    animation: show-heart ease both, scale-heart ease both;
    animation-timeline: scroll(), scroll();
    animation-range: 60%, 80% 100%;
    aspect-ratio: 1/1;
    z-index: 3;
    background-image: url('img/Invitación Boda Elegante Botánica Flores Verde Dorado.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes animate-flap{
    from{
        --flap-rotation: 0deg;
    }
    99%{
        z-index: 4;
    }
    100%{
        --flap-rotation: 180deg;
        z-index: 1;
    }
}

@keyframes show-heart{
    from{
        --progress: 0%;
    }
    to{
        --progress: -90%;
    }
}

@keyframes reveal-text{
    from{
        --text: 0.0;
    }
    to{
        --text: 1.0;
    }
}

@keyframes scale-heart{
    from{
        --scale: 1;
        --heart-left: 50%;
        --heart-top: 0;
    }
    to{
        --scale: 2;
        --heart-left: 50%;
        --heart-top: 12vh;
        z-index: 99999;
    }
}

/* Floating button */
.confirm-btn{
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    opacity: 0;
    animation: float 3s ease-in-out infinite, reveal-button ease both;
    animation-timeline: scroll(), scroll();
    animation-range: 90% 100%;
    transition: transform 0.3s ease;
}

.confirm-btn:hover{
    transform: scale(1.05);
    box-shadow: 0 12px 20px rgba(0,0,0,0.4);
}

@keyframes float{
    0%, 100%{
        transform: translateY(0);
    }
    50%{
        transform: translateY(-10px);
    }
}

@keyframes reveal-button{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}

/* Floating hearts styles */
.floating-heart {
    position: absolute;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
  animation: floatUp var(--duration) ease-in forwards;
  filter: drop-shadow(0 0 6px rgba(255, 120, 160, 0.5));
  }

  .floating-heart svg {
    width: 100%;
    height: 100%;
    animation: swing 2.5s ease-in-out infinite, spin 10s linear infinite;
  }

.floating-heart::after {
    content: "";
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 40px;
    background: radial-gradient(circle, rgba(255,182,193,0.8), transparent 70%);
    opacity: 0.4;
    border-radius: 50%;
    filter: blur(6px);
    animation: trailFade var(--duration) ease-in forwards;
  }

/* Movimiento vertical + lateral */
@keyframes floatUp {
    0% {
      transform: translate(0, 0) scale(1);
      opacity: 1;
    }
    30% {
      transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3)) scale(1.1);
      opacity: 0.9;
    }
    70% {
      transform: translate(calc(var(--tx) * 0.7), calc(var(--ty) * 0.7)) scale(0.9);
      opacity: 0.7;
    }
    100% {
      transform: translate(var(--tx), var(--ty)) scale(0.8);
      opacity: 0;
    }
  }

  @keyframes swing {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(2deg) translateX(3px); }
    50% { transform: rotate(-2deg) translateX(-3px); }
    75% { transform: rotate(2deg) translateX(2px); }
  }

  @keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 140, 180, 0.6)); }
    50% { filter: drop-shadow(0 0 10px rgba(255, 170, 200, 0.8)); }
  }

/* Rotación suave */
@keyframes spin {
    0% { filter: drop-shadow(0 0 3px rgba(255, 120, 180, 0.5)); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 150, 200, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(255, 120, 180, 0.5)); }
  }
  @keyframes trailFade {
    0% { opacity: 0.5; height: 20px; }
    100% { opacity: 0; height: 80px; }
  }

/* Modal styles */
  /* === MODAL BASE === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.8), rgba(255, 105, 180, 0.8));
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
  }

  .modal.show {
    display: flex;
    opacity: 1;
  }

  /* === MODAL CON IMAGEN FLORAL Y EFECTOS ROMÁNTICOS === */
  .flower-frame {
    position: relative;
    width: 400px;
    height: 400px;
    background: url('img/4960424-removebg-preview.png') center/contain no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: romanticEntrance 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    box-shadow: 0 0 50px rgba(255, 182, 193, 0.6), inset 0 0 50px rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    overflow: hidden;
  }

  /* Botón de cerrar */
  .close-btn {
    position: absolute;
    top: 85px;
    right: 15px;
    background: linear-gradient(135deg, #ff6699, #ff3366);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 105, 155, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
  }

  .close-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 105, 155, 0.6);
  }

  /* Animación romántica de entrada */
  @keyframes romanticEntrance {
    0% {
      transform: scale(0) rotate(-180deg);
      opacity: 0;
      filter: blur(10px);
    }
    50% {
      transform: scale(1.1) rotate(-90deg);
      opacity: 0.7;
      filter: blur(5px);
    }
    100% {
      transform: scale(1) rotate(0deg);
      opacity: 1;
      filter: blur(0px);
    }
  }

  /* Confeti cayendo */
  .confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ff69b4, #ffb6c1);
    border-radius: 50%;
    animation: fall 3s linear infinite;
    pointer-events: none;
    top: -50px;
    left: 0;
  }

  @keyframes fall {
    0% {
      transform: translateY(0) rotate(0deg);
      opacity: 1;
    }
    100% {
      transform: translateY(550px) rotate(360deg);
      opacity: 0;
    }
  }
  
  /* === FORMULARIO DENTRO DEL CÍRCULO === */
  .flower-form {
    position: relative;
    width: 70%;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    padding: 1.5rem 2rem;
    box-shadow: 0 0 30px rgba(255, 182, 193, 0.7), inset 0 0 30px rgba(255, 255, 255, 0.3);
    font-family: 'Dancing Script', cursive; /* Fuente romántica */
  }

  .flower-form h2 {
    color: #d63384;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .form-group {
    margin: 1rem 0;
  }

  label {
    color: #555;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Dancing Script', cursive;
  }

  input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 3px solid #ffb6c1;
    border-radius: 20px;
    font-size: 1.1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
  }

  input[type="text"]:focus {
    border-color: #d63384;
    box-shadow: 0 0 12px rgba(214, 51, 132, 0.6);
    transform: scale(1.02);
  }

  .radio-group {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
  }

  .radio-group label {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: #d63384;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .radio-group input[type="radio"] {
    display: none;
  }

  .radio-group input[type="radio"] + label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #ffb6c1;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
  }

  .radio-group input[type="radio"]:checked + label::before {
    background: #d63384;
    border-color: #d63384;
    box-shadow: 0 0 10px rgba(214, 51, 132, 0.8);
  }

  .submit-btn {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #ff6699, #ff3366);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 155, 0.4);
    font-family: 'Dancing Script', cursive;
  }

  .submit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 105, 155, 0.6);
  }

  /* === MODAL DE RESPUESTA === */
  .response-content {
    text-align: center;
    padding: 1rem;
  }

  .response-content h2 {
    color: #d63384;
    margin-bottom: 1rem;
    font-size: 1.5rem;
  }

  .response-content p {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .response-content .emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .response-content .calendar-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 1rem;
  }

  .response-content .calendar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
  }

  /* === HIDDEN CLASS === */
  .hidden {
    display: none;
  }

/* Media queries para responsividad */
@media (max-width: 768px) {
  .envelope {
    width: 80vmin;
  }
  .confirm-btn {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }
  .flower-frame {
    width: 350px;
    height: 350px;
  }
  .flower-form {
    padding: 1rem 1.5rem;
    width: 75%;
  }
  .flower-form h2 {
    font-size: 1.3rem;
  }
  .radio-group {
    flex-direction: column;
    gap: 1rem;
  }
  .radio-group label {
    font-size: 1.1rem;
  }
  .submit-btn {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .envelope {
    width: 90vmin;
  }
  .confirm-btn {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }
  .modal {
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .flower-frame {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.9), rgba(255, 105, 180, 0.9));
    animation: romanticEntranceMobile 0.8s ease-out forwards;
  }
  .flower-form {
    width: 95%;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(255, 182, 193, 0.8), inset 0 0 40px rgba(255, 255, 255, 0.4);
  }
  .flower-form h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  input[type="text"] {
    font-size: 1.2rem;
    padding: 1rem 1.2rem;
  }
  .radio-group {
    gap: 2rem;
    flex-direction: column;
  }
  .radio-group label {
    font-size: 1.2rem;
  }
  .submit-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-top: 2.5rem;
  }
}

@keyframes romanticEntranceMobile {
  0% {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* === NUEVAS MEJORAS === */

/* Música y controles */
.music-btn, .theme-btn {
  position: fixed;
  top: 20px;
  z-index: 1001;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.music-btn:hover, .theme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.music-btn {
  right: 20px;
}

.theme-btn {
  right: 80px;
}

/* Contador regresivo */
.countdown-container {
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  max-width: 600px;
}

.countdown-container h3 {
  color: #d63384;
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.time-box {
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.time-box span {
  font-size: 2rem;
  font-weight: bold;
  display: block;
}

.time-box p {
  font-size: 0.8rem;
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
}

/* Galería */
.gallery-container {
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.gallery-container h3 {
  color: #d63384;
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Modal de galería */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.gallery-modal.show {
  display: flex;
}

.gallery-content {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.gallery-close:hover {
  color: #bbb;
}



/* Calendario */
.calendar-btn {
  display: block;
  margin: 2rem auto;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  font-family: 'Dancing Script', cursive;
}

.calendar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Tema oscuro */
body.dark-theme {
  background-image: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #e6e6e6;
}

body.dark-theme .countdown-container,
body.dark-theme .gallery-container {
  background: rgba(26, 26, 46, 0.9);
  color: #e6e6e6;
}

body.dark-theme .flower-form {
  background: rgba(26, 26, 46, 0.95);
}

/* Animaciones hover adicionales */
.confirm-btn:hover {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive para nuevas secciones */
@media (max-width: 768px) {
  .countdown {
    flex-wrap: wrap;
  }

  .time-box {
    min-width: 60px;
    padding: 0.8rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

}
  
  
  

/* === CONTROLES SUPERIORES === */
.top-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

/* Class to disable scroll-driven animations */
.no-animation {
    animation: none !important;
    animation-timeline: none !important;
}

.circular-countdown {
    display: flex;
   /* gap: 10px; */
}

.countdown-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(214, 51, 132, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.2);
    transition: all 0.3s ease;
}

.countdown-circle:hover {
    transform: scale(1.1);
    background: rgba(214, 51, 132, 0.1);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.3);
}

.countdown-circle span {
    font-size: 14px;
    font-weight: bold;
    color: #d63384;
    line-height: 1;
}

.countdown-circle p {
    font-size: 8px;
    margin: 0;
    color: #d63384;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.music-btn, .theme-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #d63384;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.2);
    border: 2px solid rgba(214, 51, 132, 0.3);
    transition: all 0.3s ease;
}

.music-btn:hover, .theme-btn:hover {
    transform: scale(1.1);
    background: rgba(214, 51, 132, 0.1);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.3);
}

.theme-btn {
  right: 65px;
}
  
  
  




