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

body {
    min-height: 100vh;
    background: #f8eee9;
    font-family: Georgia, serif;
    color: #572b36;
}

main {
    width: 100%;
}

/* ELEMENTOS GENERALES */
.oculto {
    display: none !important;
}

.subtitulo {
    color: #a77a65;
    letter-spacing: 4px;
    font-size: 11px;
    text-align: center;
    margin-bottom: 18px;
}

.firma {
    text-align: center;
    color: #a77a65;
    font-size: 13px;
    margin-top: 35px;
    font-style: italic;
}

/* CORAZÓN LUMINOSO Y ANIMADO */
.corazon {
    position: relative;
    text-align: center;
    color: #a34b60;
    font-size: 42px;
    margin: 20px 0;
    animation: latido-corazon 1.5s ease-in-out infinite;
    text-shadow:
        0 0 5px rgba(163, 75, 96, 0.5),
        0 0 12px rgba(232, 196, 126, 0.7),
        0 0 25px rgba(232, 196, 126, 0.4);
}

@keyframes latido-corazon {
    0%, 100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.18);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.12);
    }

    60% {
        transform: scale(1);
    }
}

/* PORTADA */
.portada {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
    text-align: center;
    background: #f8eee9;
    overflow: hidden;
}

.portada h1 {
    font-size: clamp(42px, 8vw, 75px);
    line-height: 1.1;
    color: #672d3d;
    font-weight: normal;
    margin: 10px 0 20px;
}

.descripcion {
    max-width: 350px;
    line-height: 1.8;
    font-size: 15px;
    color: #80545d;
}

.fecha {
    font-size: 12px;
    letter-spacing: 5px;
    color: #a77a65;
    margin: 15px 0 25px;
}

#empezar {
    background: #702d40;
    color: #fff8f2;
    border: 1px solid #a77a65;
    padding: 15px 28px;
    font-family: Georgia, serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.3s, box-shadow 0.3s;
}

#empezar:hover {
    background: #8b4054;
    box-shadow: 0 0 18px rgba(183, 139, 114, 0.5);
}

/* PARTÍCULAS DORADAS DE LA PORTADA */
.particulas-portada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* DESTELLOS DORADOS MÁS VISIBLES */
.particula-portada {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f1cc83;
    box-shadow:
        0 0 7px #f1cc83,
        0 0 15px #f5dca9,
        0 0 25px rgba(232, 196, 126, 0.8);
    opacity: 0;
    animation: destello-portada 3s ease-in-out infinite;
}

@keyframes destello-portada {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    30% {
        opacity: 1;
        transform: scale(1.6);
    }

    60% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* CONTENIDO POR ENCIMA DE LAS PARTÍCULAS */
.portada > *:not(.particulas-portada) {
    position: relative;
    z-index: 2;
}

/* CALENDARIO */
.calendario {
    min-height: 100vh;
    padding: 55px 20px;
    text-align: center;
    background: #f8eee9;
}

.calendario h2 {
    font-size: clamp(30px, 5vw, 45px);
    font-weight: normal;
    color: #672d3d;
    margin-bottom: 12px;
}

.texto-calendario {
    color: #916b6b;
    font-size: 14px;
    margin-bottom: 35px;
}

/* CUADRÍCULA */
.cuadricula {
    width: min(100%, 850px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
}

/* CASILLAS */
.dia {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #b78b72;
    border-radius: 8px;
    background: #702d40;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(75, 30, 42, 0.12);
    transition: background 0.3s, box-shadow 0.3s;
}

.dia:hover:not(:disabled) {
    background: #843c50;
    box-shadow: 0 5px 14px rgba(75, 30, 42, 0.2);
}

/* NÚMEROS */
.numero-casilla {
    position: absolute;
    z-index: 2;
    top: 7px;
    left: 9px;
    color: #fff4e8;
    font-size: 15px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ILUSTRACIONES PNG */
.dibujo-casilla {
    display: block;
    width: 190%;
    height: 190%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
    opacity: 1;
    filter: none;
    pointer-events: none;
    flex-shrink: 0;
}

/* DÍA ESPECIAL */
.dia.especial {
    border: 2px solid #d5ad72;
    background: #7b3447;
}

/* DÍAS BLOQUEADOS */
.dia:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* VENTANA DE SORPRESAS */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(42, 19, 27, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contenido-modal {
    position: relative;
    width: min(100%, 480px);
    padding: 45px 30px;
    background: #fff8f2;
    border: 1px solid #c7a17c;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

.contenido-modal h2 {
    font-size: 29px;
    font-weight: normal;
    color: #672d3d;
    margin: 15px 0;
}

#mensaje-sorpresa {
    color: #80545d;
    font-size: 15px;
    line-height: 1.8;
}

.cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    border: none;
    background: none;
    color: #702d40;
    font-size: 30px;
    cursor: pointer;
}

/* ANIMACIÓN DE APERTURA */
.animar-apertura .contenido-modal {
    animation: aparecer 0.5s ease;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* PARTÍCULAS DORADAS DE LAS SORPRESAS */
.particulas-doradas {
    position: fixed;
    inset: 0;
    z-index: 110;
    pointer-events: none;
    overflow: hidden;
}

.particula {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e7c17d;
    box-shadow: 0 0 8px #f7d99b;
    animation: brillar 2.5s ease-out forwards;
}

@keyframes brillar {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(var(--movimiento-x), var(--movimiento-y)) scale(0);
    }
}

/* ADAPTACIÓN A MÓVILES */
@media (max-width: 600px) {
    .cuadricula {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .calendario {
        padding: 35px 12px;
    }

    .dia {
        padding: 3px;
    }

    .numero-casilla {
        font-size: 12px;
        top: 5px;
        left: 6px;
    }
}
/* ============================================================
   PANTALLA DE CONTRASEÑA
   ============================================================ */
.acceso h1 {
    font-size: clamp(34px, 7vw, 56px);
}

.formulario-acceso {
    width: min(100%, 320px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 5px;
}

.formulario-acceso input {
    width: 100%;
    padding: 15px;
    border: 1px solid #c7a17c;
    border-radius: 3px;
    background: #fff8f2;
    color: #572b36;
    font-family: Georgia, serif;
    font-size: 16px; /* 16px evita que el iPhone haga zoom al escribir */
    text-align: center;
}

.formulario-acceso input:focus {
    outline: none;
    border-color: #a34b60;
    box-shadow: 0 0 14px rgba(232, 196, 126, 0.55);
}


.formulario-acceso #entrar {
    background: #702d40;
    color: #fff8f2;
    border: 1px solid #a77a65;
    padding: 15px 28px;
    font-family: Georgia, serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.3s, box-shadow 0.3s;
}

.formulario-acceso #entrar:hover {
    background: #8b4054;
    box-shadow: 0 0 18px rgba(183, 139, 114, 0.5);
}

.ver-contrasena {
    background: none;
    border: none;
    color: #a77a65;
    font-family: Georgia, serif;
    font-size: 12px;
    font-style: italic;
    cursor: pointer;
    text-decoration: underline;
}

.error-acceso {
    color: #a32f43;
    font-size: 13px;
}

/* DÍAS TODAVÍA NO DISPONIBLES (se pueden tocar, pero no abren la sorpresa) */
.dia.bloqueado {
    opacity: 0.55;
}

.dia.bloqueado:hover {
    background: #702d40;
    box-shadow: 0 4px 10px rgba(75, 30, 42, 0.12);
}