:root {
    --text-color: #f8f8f8;
    --overlay-color: rgba(0, 0, 0, 0.4);
    --highlight-color: #d4af37;
    --menu-bg: rgba(20, 20, 30, 0.95);

    /* --- TAMAÑOS DE FUENTE POR DEFECTO (PARA MÓVILES) --- */
    --font-size-verse: clamp(1.1rem, 3vh, 1.8rem); 
    --font-size-reference: clamp(0.85rem, 2vh, 1.2rem);

    /* El padding se adapta al ANCHO de la pantalla (vw) */
    --container-padding: clamp(1.5rem, 5vw, 3rem);
}

/* --- NUEVO: RESTAURAR TAMAÑOS PARA PANTALLAS DE PC --- */
@media (min-width: 992px) {
    :root {
        --font-size-verse: clamp(1.1rem, 4vh, 2.2rem);
        --font-size-reference: clamp(0.85rem, 2.5vh, 1.4rem);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 1.5s ease-in-out;
    position: relative;
    overflow-x: hidden;
    background-color: #000;
    padding: 1rem 0;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: -1;
}

.container {
    max-width: 900px;
    width: 90%;
    opacity: 0;
    transition: opacity 1.8s ease-out;
    display: flex; 
    justify-content: center;
    align-items: center;
    order: 0;
}

.container.visible {
    opacity: 1;
}

.verse-container {
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 15px;
    padding: var(--container-padding);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    max-height: 95vh;
}

.verse-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--highlight-color), transparent);
}

.verse {
    font-size: var(--font-size-verse);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-weight: 500;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.9);
    position: relative;
    letter-spacing: 0.3px;
}

.reference {
    font-size: var(--font-size-reference);
    font-style: italic;
    color: var(--highlight-color);
    margin-bottom: 1.5rem;
    display: block;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.date-display {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    background: rgba(0, 0, 0, 0.6);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Arial', sans-serif;
}

.menu-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    border-color: var(--highlight-color);
}

.menu-btn .fa-bars { display: block; transition: opacity 0.3s; }
.menu-btn .fa-times { display: none; transition: opacity 0.3s; }
.menu-btn.active .fa-bars { display: none; }
.menu-btn.active .fa-times { display: block; }

.menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    max-width: 90vw;
    height: 100%;
    background: var(--menu-bg);
    backdrop-filter: blur(12px);
    padding: 3rem 2rem;
    z-index: 99;
    transition: right 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.menu.active {
    right: 0;
}

.menu h2, .menu h3, .menu p, .menu a {
    text-align: left;
}

.menu h2 {
    color: var(--highlight-color);
    margin-bottom: 1.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.8rem;
    font-weight: normal;
}

.menu h3 {
    color: #ffffff;
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
    font-weight: normal;
}

.menu p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: #e0e0e0;
}

.menu a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: all 0.3s;
}

.menu a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.share-btns {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.share-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
}

.share-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--highlight-color);
    transform: translateY(-3px);
}

.footer {
    position: fixed;
    bottom: 15px;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.bible-icon {
    position: fixed;
    bottom: 70px;
    left: 30px;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.3);
    animation: float 4s ease-in-out infinite;
    cursor: pointer;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s, visibility 1s;
    visibility: visible;
    opacity: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--highlight-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-center { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

@media (max-width: 768px) {
    /* --- INICIO DE LA MODIFICACIÓN --- */
    body {
        justify-content: flex-start; /* Alinea el contenido hacia arriba */
        padding-top: 7.5rem;          /* Aumentado para bajar la cita bíblica */
        padding-bottom: 8rem;       /* Espacio inferior para proteger footer e icono */
    }
    /* --- FIN DE LA MODIFICACIÓN --- */

    .menu {
        width: 85%;
        right: -85%;
    }

    .date-display {
        top: 20px;
        left: 20px;
        padding: 0.5rem 1rem;
    }

    .menu-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        top: 20px;
        right: 20px;
    }
    
    .bible-icon {
        display: block;
        left: 50%; 
        bottom: 80px; 
        animation: float-center 4s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    .bible-icon {
        bottom: 60px;
    }
}

@media (max-height: 450px) {
    .bible-icon, .footer {
        display: none;
    }
    .date-display {
        top: 15px;
        left: 15px;
    }
    .menu-btn {
        top: 15px;
        right: 15px;
    }
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: float-up linear infinite;
}

@keyframes float-up { to { transform: translateY(-100vh); } }

.bible-icon a,
.bible-icon a:visited {
    color: inherit;
}