/* Estilo rústico y animaciones */
body {
    background-color: #f4e4bc; /* Color crema suave */
    font-family: 'Comic Sans MS', cursive; /* Estilo infantil */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#envelope-container {
    cursor: pointer;
    transition: transform 0.5s;
}

.envelope {
    position: relative;
    width: 300px;
    height: 260px;
    background: #8b4513; /* Color madera */
    border-radius: 0 0 10px 10px;
}

.flap {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid #a0522d;
    transform-origin: top;
    transition: transform 0.4s ease;
    z-index: 3;
}

.envelope.open .flap {
    transform: rotateX(180deg);
}



.envelope.open .card {
    bottom: 150px; /* Subimos la tarjeta más alto para que el video y botones queden cómodos */
}

.hidden { display: none; }

/* Estilos para el contenido final */
#main-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 1s;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.btn-rsvp, .btn-location {
    display: block;
    margin: 15px;
    padding: 15px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
}

/* Ajustamos la altura de la tarjeta para que quepa todo */
.card {
    position: absolute;
    bottom: 10px; /* Mantenemos la tarjeta asomando un poco */
    left: 10px;
    width: 280px;
    height: 250px; /* Aumentamos la altura total de la tarjeta para compensar el espacio nuevo */
    background: white;
    text-align: center;
    
    /* --- EL CAMBIO CLAVE ESTÁ AQUÍ --- */
    /* Añadimos un padding superior grande (110px) para empujar el contenido hacia abajo, */
    /* asegurándonos de que empiece por debajo del pico del sobre cerrado. */
    padding-top: 110px; 
    
    z-index: 2; /* Sigue estando detrás de la solapa (que tiene z-index 3) */
    transition: all 0.5s ease; /* Transición suave para todos los cambios */
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    
    /* Asegura que el padding no afecte el ancho/alto total definido */
    box-sizing: border-box; 
}

.card-title {
    margin: 5px 0 10px 0;
    color: #d32f2f; /* Rojo granero */
    font-size: 1.4rem;
}

/* Estilos de la cuenta regresiva */
#front-countdown {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

#front-countdown .time-box {
    background: #ffecb3; /* Amarillo pastel */
    border: 2px dashed #f57c00; /* Naranja rústico */
    border-radius: 8px;
    padding: 8px 5px;
    min-width: 45px;
}

#front-countdown span {
    font-size: 1.3rem;
    font-weight: bold;
    color: #d84315;
    display: block;
}

#front-countdown p {
    margin: 0;
    font-size: 0.75rem;
    color: #5d4037;
    font-weight: bold;
    text-transform: uppercase;
}

/* Animación para invitar al clic */
.tap-text {
    color: #2e7d32; /* Verde pasto */
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
    animation: pulse 1.5s infinite;
    margin-bottom: 15px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}