.envelope-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 1s;
    background: radial-gradient(circle at center, #fdf2f8 0%, #fce7f3 100%);
    background-image: url('https://www.transparenttextures.com/patterns/paper.png');
}


.envelope-box {
    position: relative;
    cursor: pointer;
    margin-bottom: 2rem;
    width: 90vw;
    max-width: 550px;
    height: 380px;
    perspective: 2000px;
    filter: drop-shadow(0 20px 40px rgba(157, 23, 77, 0.4));
}


.envelope-body {
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid rgba(190, 24, 93, 0.3);
    background: #fdf2f8 url('https://www.transparenttextures.com/patterns/cream-paper.png');
    box-shadow:
        inset 0 0 60px rgba(157, 23, 77, 0.1),
        0 10px 30px rgba(157, 23, 77, 0.2);
}


.flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    transform-origin: top;
    transition: transform 1.2s ease-in-out;
    height: 220px;
    background: linear-gradient(145deg, #9d174d 0%, #f472b6 45%, #ffffff 50%, #f472b6 55%, #9d174d 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}


.flap::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: translateX(-100%);
    animation: shine 5s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) skewX(-30deg); }
    20%, 100% { transform: translateX(200%) skewX(-30deg); }
}


.envelope-box.open .flap {
    transform: rotateX(160deg);
    z-index: 1;
}


.jewel-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    background: radial-gradient(circle at 30% 30%,
        rgba(251, 207, 232, 0.9) 0%,
        rgba(190, 24, 93, 0.8) 70%);
    box-shadow:
        0 0 40px rgba(212, 175, 55, 0.6),
        0 15px 30px rgba(0,0,0,0.4),
        inset -6px -6px 12px rgba(0,0,0,0.4),
        inset 6px 6px 12px rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(212, 175, 55, 0.6);
}


.engraved-b {
    font-family: 'Imperial Script', cursive;
    font-weight: 700;
    font-size: 5.5rem;
    background: linear-gradient(
        145deg,
        #ffd700 0%,
        #ffed4e 25%,
        #ffd700 50%,
        #daa520 75%,
        #b8860b 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow:
        0 -2px 4px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.3);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
    transform: translateY(5px) translateX(3px);
    display: block;
    line-height: 1;
}

/* Efecto de pulso dorado */
.engraved-b::after {
    content: 'B';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: goldPulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes goldPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}


.envelope-box.open .jewel-seal {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.5);
}

/* Contenido principal */
.invitation-main {
    display: none;
    opacity: 0;
    transition: opacity 1s;
}

.invitation-main.visible {
    display: block;
    opacity: 1;
}


.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: #fdf2f8;
    background-image: url('./imagenes/fondo-animado-poster.jpg'); /* Fallback imagen */
    background-size: cover;
    background-position: center;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

    
}

.text-shadow-gold {
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.4);
}

.video-number-container {
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    mask-image: radial-gradient(circle, black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 70%);
}

@media (min-width: 768px) {
    .video-number-container {
        width: 600px;
        height: 600px;
    }
}

.fade-in {
    animation: fadeIn 2s ease-out forwards;
}


.title-animation {
    animation: gentleFloat 4s ease-in-out infinite;
    text-shadow:
        0 0 10px rgba(236, 72, 153, 0.5),
        0 0 20px rgba(236, 72, 153, 0.3),
        0 0 30px rgba(157, 23, 77, 0.2);
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


.pink-dust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
    opacity: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(236, 72, 153, 0.15) 0%,
        rgba(236, 72, 153, 0.1) 30%,
        rgba(236, 72, 153, 0.05) 50%,
        transparent 70%
    );
    filter: blur(20px);
}

.dust-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(5px);
    pointer-events: none;
}


@keyframes dustExpand {
    0% { transform: scale(0.1); opacity: 0; }
    20% { opacity: 0.8; }
    40% { opacity: 0.6; }
    60% { opacity: 0.4; transform: scale(2); }
    80% { opacity: 0.2; transform: scale(3); }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes dustFloat {
    0% { transform: translateY(0) rotate(0deg) scale(0.5); opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { transform: translateY(-100px) rotate(360deg) scale(1); opacity: 0; }
}

.font-kalnia {
    font-family: 'Kalnia', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

body {
    font-family: 'Cormorant Garamond', serif;
    overflow-x: hidden;
    background-color: #fdf2f8;
}


@media (max-width: 767px) {
    .font-montecarlo.text-7xl {
        font-size: 6rem !important;
        line-height: 0.9;
        margin-top: 1rem;
    }
    .video-number-container {
        width: 280px;
        height: 280px;
    }
    .text-4xl {
        font-size: 2rem !important;
    }
}

.font-mono {
    word-break: break-all;
}


@media (max-width: 767px) {
    #transferDataContainer {
        display: none;
    }
    #transferDataContainer.show {
        display: block;
    }
}

.swipe-icon {
    font-size: 1.8rem;
    color: rgba(190, 24, 93, 0.7);
    animation: swipeAnimation 1.8s infinite ease-in-out;
}

@keyframes swipeAnimation {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}