:root {
    --dorado: #D4AF37;
    --dorado-claro: #F9E076;
    --dorado-oscuro: #B8860B;
    --beige: #F5F5DC;
    --gris-oscuro: #1A1A1A;
    --blanco: #FFFFFF;
    --transicion: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    /* background: var(--gris-oscuro); */
    border-radius: 10px;
  }

  ::-webkit-scrollbar:hover {
    /* background: var(--secondary-color-step-300); */
    background: rgb(from var(--dorado-claro) r g b / 0.25);
    border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb {
    /* background: var(--dorado-claro-step-950); */
    background: rgb(from var(--dorado-claro) r g b / 0.9);
    border-radius: 10px;
    /* border: 1px solid var(--secondary-color-step-500); */
  }

  .scroll-access::-webkit-scrollbar {
    background: rgb(from var(--dark-color) r g b / 0.25) !important;
  }

  .scroll-access::-webkit-scrollbar:hover {
    background: rgb(from var(--dark-color) r g b / 1) !important;
  }

  .scroll-access::-webkit-scrollbar-thumb {
    background: rgb(from var(--white-color) r g b / 0.7) !important;
  }
  .scroll-access::-webkit-scrollbar-thumb:hover {
    background: rgb(from var(--white-color) r g b / 1) !important;
  }

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

body {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    color: var(--beige);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23D4AF37' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
}

.carta {
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

.seccion {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 0;
    opacity: 1;
    transform: translateY(30px);
    transition: var(--transicion);
    position: relative;
}

.seccion::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--dorado), transparent);
    /* opacity: 0.3; */
}

/* .seccion.visible {
    opacity: 1;
    transform: translateY(0);
} */

.titulo {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--dorado);
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 1px;
}

.titulo::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--dorado), transparent);
}

.titulo::before {
    content: "✦";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--dorado);
    font-size: 1.2rem;
}

.mensaje {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    color: var(--beige);
    font-weight: 300;
    line-height: 1.9;
}

.flor-amarilla {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 5px;
    margin: 2.5rem auto;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.15);
    transition: var(--transicion);
    filter: sepia(20%) brightness(110%);
}

.flor-amarilla:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.25);
}

.corazon {
    font-size: 2.8rem;
    margin: 2rem 0;
    color: var(--dorado);
    animation: latido 1.8s infinite;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.petalo,
.paint-drop,
.corazon {
  will-change: transform, opacity;
}


@keyframes latido {
    0% {
        transform: scale(1);
        text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    }

    50% {
        transform: scale(1.15);
        text-shadow: 0 0 25px rgba(212, 175, 55, 0.8);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    }
}

.flotantes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.petalo {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    color: var(--dorado-claro);
    animation: caer 10s linear forwards;
    z-index: -1;
}

@keyframes caer {
    0% {
        transform: translateY(-10vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(110vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

.final {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 4rem 3rem;
    backdrop-filter: blur(10px);
    margin: 4rem auto;
    max-width: 700px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.final::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    z-index: 1;
}

.firma {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--dorado);
    margin-top: 3rem;
    font-style: italic;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.firma::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dorado), transparent);
}

.control-musica {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transicion);
    z-index: 1000;
}

.control-musica:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.1);
}

.control-musica i {
    color: var(--dorado);
    font-size: 1.2rem;
}

.decoracion {
    position: absolute;
    opacity: 0.1;
    color: var(--dorado);
    font-size: 8rem;
    z-index: -1;
}

.decoracion-1 {
    top: 5%;
    left: 5%;
    transform: rotate(-15deg);
}

.decoracion-2 {
    bottom: 10%;
    right: 5%;
    transform: rotate(15deg);
}

.flor-interactiva {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transicion);
    z-index: 1000;
}

.flor-interactiva:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.1);
}

.flor-interactiva i {
    color: var(--dorado);
    font-size: 1.5rem;
}

.flor-mensaje {
    position: fixed;
    bottom: 7rem;
    left: 2rem;
    background: rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1rem;
    font-weight: 500;
    border-radius: 10px;
    max-width: 250px;
    opacity: 0.9;
    transform: translateY(10px);
    transition: var(--transicion);
    pointer-events: none;
    animation: rebota 1s alternate infinite ease-out;
}
@-webkit-keyframes rebota {
  0% {
    transform: translateY(4px);
  }
  100% {
    transform: translateY(12px);
  }
}

.flor-mensaje.mostrar {
    opacity: 0;
    transform: translateY(0);
}

.flor-mensaje p {
    font-size: 0.9rem;
    color: var(--beige);
    margin: 0;
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.modal.mostrar {
    opacity: 1;
    visibility: visible;
}

.modal-contenido {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(45, 45, 45, 0.95) 100%);
    border: 2px solid var(--dorado);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-cerrar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--dorado);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transicion);
    z-index: 10;
}

.modal-cerrar:hover {
    transform: scale(1.2);
}

.modal-titulo {
    font-family: 'Cormorant Garamond', serif;
    color: var(--dorado);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.modal-ramo {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--dorado);
    transition: transform 0.5s ease;
}

.modal-ramo:hover {
    transform: scale(1.03);
}

/* Efecto de lluvia de pintura */
.paint-drop {
    position: absolute;
    width: 8px;
    height: 12px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: var(--dorado-claro);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    animation: paint-fall 8s linear forwards;
}

@keyframes paint-fall {
    0% {
        transform: translateY(-10px) rotate(0deg) scale(0.8);
        opacity: 0.8;
    }

    10% {
        opacity: 0.9;
        transform: translateY(10vh) rotate(5deg) scale(1);
    }

    20% {
        transform: translateY(20vh) rotate(-5deg) scale(1.1);
    }

    30% {
        transform: translateY(30vh) rotate(3deg) scale(1.2);
    }

    40% {
        transform: translateY(40vh) rotate(-3deg) scale(1.3);
    }

    50% {
        transform: translateY(50vh) rotate(2deg) scale(1.4);
    }

    60% {
        transform: translateY(60vh) rotate(-2deg) scale(1.3);
    }

    70% {
        transform: translateY(70vh) rotate(1deg) scale(1.2);
    }

    80% {
        transform: translateY(80vh) rotate(-1deg) scale(1.1);
    }

    90% {
        transform: translateY(90vh) rotate(0deg) scale(1);
        opacity: 0.7;
    }

    100% {
        transform: translateY(100vh) rotate(0deg) scale(0.9);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .carta {
        padding: 3rem 1.5rem;
    }

    .final {
        padding: 3rem 2rem;
    }

    .decoracion {
        font-size: 5rem;
    }

    .flor-interactiva {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .modal-contenido {
        padding: 2rem 1.5rem;
    }

    .modal-titulo {
        font-size: 2rem;
    }

    .modal-ramo {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .modal-contenido {
        padding: 1.5rem 1rem;
        width: 95%;
    }

    .modal-titulo {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .modal-ramo {
        max-width: 200px;
        margin: 1rem auto;
    }

    .mensaje {
        font-size: 1rem;
    }
}





/* -------------------- */

.lluvia-css {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.petalo {
    position: absolute;
    top: -2rem;
    font-size: 1.5rem;
    color: var(--dorado-claro);
    opacity: 0;
    animation: caer 12s linear infinite;
    will-change: transform, opacity;
}

.lluvia-css .petalo:nth-child(1) {
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}
.lluvia-css .petalo:nth-child(2) {
    left: 20%;
    animation-duration: 10s;
    animation-delay: 2s;
}
.lluvia-css .petalo:nth-child(3) {
    left: 35%;
    animation-duration: 14s;
    animation-delay: 1s;
}
.lluvia-css .petalo:nth-child(4) {
    left: 50%;
    animation-duration: 9s;
    animation-delay: 3s;
}
.lluvia-css .petalo:nth-child(5) {
    left: 65%;
    animation-duration: 11s;
    animation-delay: 5s;
}
.lluvia-css .petalo:nth-child(6) {
    left: 80%;
    animation-duration: 13s;
    animation-delay: 4s;
}
.lluvia-css .petalo:nth-child(7) {
    left: 90%;
    animation-duration: 15s;
    animation-delay: 6s;
}
.lluvia-css .petalo:nth-child(8) {
    left: 5%;
    animation-duration: 10s;
    animation-delay: 7s;
}
.lluvia-css .petalo:nth-child(9) {
    left: 25%;
    animation-duration: 8s;
    animation-delay: 8s;
}
.lluvia-css .petalo:nth-child(10) {
    left: 70%;
    animation-duration: 12s;
    animation-delay: 9s;
}

/* Aquí se añaden las 8 flores adicionales */
.lluvia-css .petalo:nth-child(11) {
    left: 15%;
    animation-duration: 9s;
    animation-delay: 10s;
}
.lluvia-css .petalo:nth-child(12) {
    left: 45%;
    animation-duration: 11s;
    animation-delay: 11s;
}
.lluvia-css .petalo:nth-child(13) {
    left: 75%;
    animation-duration: 13s;
    animation-delay: 12s;
}
.lluvia-css .petalo:nth-child(14) {
    left: 30%;
    animation-duration: 10s;
    animation-delay: 13s;
}
.lluvia-css .petalo:nth-child(15) {
    left: 85%;
    animation-duration: 14s;
    animation-delay: 14s;
}
.lluvia-css .petalo:nth-child(16) {
    left: 0%;
    animation-duration: 8s;
    animation-delay: 15s;
}
.lluvia-css .petalo:nth-child(17) {
    left: 80%;
    animation-duration: 10s;
    animation-delay: 2s;
}
.lluvia-css .petalo:nth-child(18) {
    left: 90%;
    animation-duration: 12s;
    animation-delay: 0s;
}

@keyframes caer {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}