/* Reseteo agresivo para evitar márgenes no deseados en navegadores móviles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #fff;
    text-align: center;
    /* Desactiva el "font boosting" en Android */
    -webkit-text-size-adjust: 100%; 
    text-size-adjust: 100%;
}

/* --- PANTALLA DE CARGA --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #efe9df;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

.preloader p {
    margin-top: 15px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #888;
    text-transform: uppercase;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- CONTENEDOR PRINCIPAL (La clave del éxito) --- */
.main-container {
    position: fixed; /* Fixed evita problemas de scroll y repaint */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; /* Fallback para navegadores antiguos */
    height: -webkit-fill-available; /* Altura real en navegadores móviles */
    overflow: hidden;
}

/* --- CAPA DE IMAGEN DE FONDO (CORREGIDO A .PNG) --- */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* --- CAPA OSCURA --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.8) 100%);
    z-index: 2;
}

/* --- CONTENIDO (Aseguramos que esté por encima de todo) --- */
.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Un número muy alto para que siempre esté arriba */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 15px;
}

.landing-header { width: 100%; margin-top: 10px; }
.tiny-star { font-size: 18px; color: #fff; margin-bottom: 5px; opacity: 0.8; }
.wordmark { font-family: 'Times New Roman', Times, serif; font-size: 34px; letter-spacing: 4px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.9); font-weight: 300; text-transform: uppercase; line-height: 1.1; }
.landing-header p { font-size: 9px; letter-spacing: 2px; color: #fff; margin-top: 8px; text-shadow: 0 1px 5px rgba(0,0,0,0.9); opacity: 0.9; line-height: 1.4; }

.cta-group { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 20px; }
.invitation { font-family: 'Times New Roman', Times, serif; font-size: 20px; color: #fff; font-style: italic; text-shadow: 0 2px 8px rgba(0,0,0,0.9); }

.enter-button {
    display: inline-block;
    background-color: #fdf5e6;
    color: #333;
    text-decoration: none;
    padding: 16px 50px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    /* Aseguramos que el texto del botón no se agrande */
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

.enter-button:active { transform: scale(0.98); background-color: #fff; }

.lower-poem { width: 100%; font-family: 'Times New Roman', Times, serif; color: #fff; font-size: 16px; line-height: 1.4; text-shadow: 0 2px 8px rgba(0,0,0,0.9); margin-bottom: 10px; }
.lower-poem em { display: block; font-size: 19px; font-style: italic; }
.lower-poem div { margin-top: 8px; font-size: 12px; opacity: 0.8; }

.landing-footer { width: 100%; font-size: 8px; letter-spacing: 2px; color: #fff; opacity: 0.7; text-shadow: 0 1px 5px rgba(0,0,0,0.9); }

.scene-tools { position: absolute; top: 15px; right: 15px; display: flex; gap: 10px; }
.scene-tools button { background: none; border: none; color: #fff; cursor: pointer; opacity: 0.6; padding: 5px; }
.scene-tools svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.play-icon { display: none; }
.pause-icon { display: block; }