/* ==================================================
   CONFIGURACIÓN GENERAL
================================================== */

* {

    box-sizing: border-box;

}


body {

    margin: 0;

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: white;

    background:

        radial-gradient(
            circle at 10% 10%,
            #20295a 0%,
            transparent 30%
        ),

        radial-gradient(
            circle at 90% 90%,
            #35145c 0%,
            transparent 30%
        ),

        #080c16;

}


/* ==================================================
   CONTENEDOR
================================================== */

.contenedor {

    width: 94%;

    max-width: 1250px;

    margin: 30px auto 50px auto;

    text-align: center;

}


/* ==================================================
   TÍTULO
================================================== */

h1 {

    margin: 0;

    font-size: 46px;

    font-weight: bold;

    background:

        linear-gradient(
            90deg,
            #ff8a00,
            #ff4d6d,
            #a855f7,
            #38bdf8
        );

    -webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;

}


.subtitulo {

    margin-top: 8px;

    margin-bottom: 25px;

    font-size: 21px;

    color: #b9c7e6;

}


/* ==================================================
   INSTRUCCIONES
================================================== */

.instrucciones {

    width: 90%;

    max-width: 850px;

    margin: 0 auto 25px auto;

    padding: 20px 30px;

    text-align: left;

    border-radius: 16px;

    background:

        linear-gradient(
            135deg,
            #172554,
            #312e81,
            #4c1d95
        );

    border: 1px solid #6366f1;

    box-shadow:

        0 0 25px
        rgba(99, 102, 241, 0.25);

}


.instrucciones h2 {

    margin-top: 0;

    margin-bottom: 15px;

    text-align: center;

    color: #fbbf24;

}


.instrucciones p {

    margin: 8px 0;

    color: #e5e7eb;

    line-height: 1.5;

}


.instrucciones strong {

    color: #fbbf24;

}


/* ==================================================
   CONTADOR
================================================== */

.contador {

    display: inline-block;

    margin-bottom: 22px;

    padding: 10px 20px;

    border-radius: 30px;

    background: #172033;

    border: 1px solid #38bdf8;

    color: #bae6fd;

    font-size: 18px;

    font-weight: bold;

}


#contador {

    color: #fbbf24;

    font-size: 21px;

}


/* ==================================================
   ÁREA DEL JUEGO
================================================== */

.juego {

    display: flex;

    justify-content: center;

    align-items: flex-start;

    gap: 35px;

}


/* ==================================================
   TABLERO
================================================== */

.tablero {

    display: grid;

    grid-template-columns:
        repeat(15, 38px);

    grid-template-rows:
        repeat(15, 38px);

    gap: 4px;

    padding: 15px;

    border-radius: 18px;

    background:

        linear-gradient(
            145deg,
            #111a2b,
            #17112c
        );

    border: 2px solid #33466f;

    box-shadow:

        0 0 25px
        rgba(56, 189, 248, 0.18),

        0 0 35px
        rgba(168, 85, 247, 0.12);

    user-select: none;

}


/* ==================================================
   LETRAS
================================================== */

.letra {

    width: 38px;

    height: 38px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 7px;

    background: #1b2942;

    border: 1px solid #344b75;

    color: #f8fafc;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition:
        transform 0.12s,
        background 0.12s,
        box-shadow 0.12s;

}


.letra:hover {

    background: #31517d;

    transform: scale(1.08);

    box-shadow:
        0 0 12px #38bdf8;

}


/* ==================================================
   LETRAS SELECCIONADAS
================================================== */

.letra.seleccionada {

    background: #8b5cf6;

    border-color: #c4b5fd;

    color: white;

    box-shadow:
        0 0 15px #8b5cf6;

    transform: scale(1.05);

}


/* ==================================================
   LETRAS ENCONTRADAS
================================================== */

.letra.encontrada {

    background: #16a34a;

    border-color: #4ade80;

    color: white;

    box-shadow:
        0 0 13px #22c55e;

}


/* ==================================================
   PANEL DE PALABRAS
================================================== */

.lateral {

    width: 310px;

    text-align: left;

}


.lista-container {

    padding: 20px;

    border-radius: 16px;

    background:

        linear-gradient(
            145deg,
            #151e31,
            #201936
        );

    border: 1px solid #3d527d;

    box-shadow:

        0 0 20px
        rgba(139, 92, 246, 0.12);

}


.lista-container h2 {

    margin-top: 0;

    text-align: center;

    color: #38bdf8;

}


/* ==================================================
   LISTA
================================================== */

#lista-palabras {

    list-style: none;

    padding: 0;

    margin: 15px 0 0 0;

}


#lista-palabras li {

    margin: 7px 0;

    padding: 10px 13px;

    border-radius: 8px;

    background:

        linear-gradient(
            90deg,
            #1b2942,
            #222c48
        );

    border: 1px solid #344b75;

    color: #e5e7eb;

    font-weight: bold;

    transition: 0.2s;

}


#lista-palabras li:hover {

    transform: translateX(4px);

    border-color: #38bdf8;

}


#lista-palabras li.encontrada {

    text-decoration: line-through;

    background:

        linear-gradient(
            90deg,
            #14532d,
            #166534
        );

    border-color: #22c55e;

    color: #bbf7d0;

}


/* ==================================================
   MENSAJE FINAL
================================================== */

.mensaje-final {

    margin: 30px auto 0 auto;

    max-width: 600px;

    padding: 20px;

    border-radius: 15px;

    background:

        linear-gradient(
            135deg,
            #14532d,
            #166534,
            #15803d
        );

    border: 2px solid #4ade80;

    box-shadow:

        0 0 25px
        rgba(34, 197, 94, 0.25);

    font-size: 25px;

    font-weight: bold;

}


.mensaje-final p {

    margin-bottom: 0;

    font-size: 17px;

    font-weight: normal;

}


/* ==================================================
   ==================================================
   VENTANA EMERGENTE
   ==================================================
================================================== */

#popup {

    position: fixed !important;

    top: 0 !important;

    left: 0 !important;

    right: 0 !important;

    bottom: 0 !important;

    width: 100vw !important;

    height: 100vh !important;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    background:
        rgba(3, 7, 18, 0.85);

    backdrop-filter: blur(7px);

    z-index: 999999 !important;

}


/* ==================================================
   POPUP OCULTO
================================================== */

#popup.oculto {

    display: none !important;

}


/* ==================================================
   CAJA DEL POPUP
================================================== */

#popup .popup-contenido {

    position: relative;

    width: 90%;

    max-width: 600px;

    max-height: 85vh;

    overflow-y: auto;

    padding: 30px;

    border-radius: 22px;

    text-align: center;

    background:

        linear-gradient(
            145deg,
            #151c2e,
            #29183d
        );

    border: 2px solid #8b5cf6;

    box-shadow:

        0 0 35px
        rgba(139, 92, 246, 0.6),

        0 0 80px
        rgba(56, 189, 248, 0.25);

    animation:
        aparecerPopup 0.3s ease;

}


/* ==================================================
   ANIMACIÓN DEL POPUP
================================================== */

@keyframes aparecerPopup {

    from {

        opacity: 0;

        transform: scale(0.8);

    }

    to {

        opacity: 1;

        transform: scale(1);

    }

}


/* ==================================================
   BOTÓN X
================================================== */

#popup .cerrar-popup {

    position: absolute;

    top: 12px;

    right: 15px;

    width: 36px;

    height: 36px;

    border: none;

    border-radius: 50%;

    background: #334155;

    color: white;

    font-size: 19px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;

}


#popup .cerrar-popup:hover {

    background: #ef4444;

    transform: scale(1.1);

}


/* ==================================================
   TÍTULO DEL POPUP
================================================== */

#popup h2 {

    margin: 5px 40px 18px 40px;

    color: #c084fc;

    font-size: 30px;

}


/* ==================================================
   IMAGEN DEL VOLCÁN
================================================== */

#popup img {

    display: block;

    width: 100%;

    max-width: 430px;

    height: 230px;

    object-fit: cover;

    margin: 0 auto 20px auto;

    border-radius: 15px;

    border: 3px solid #a855f7;

    box-shadow:

        0 0 25px
        rgba(168, 85, 247, 0.45);

}


/* ==================================================
   DATO CURIOSO
================================================== */

#popup h3 {

    margin-top: 10px;

    color: #fbbf24;

    font-size: 21px;

}


#popup p {

    color: #e2e8f0;

    font-size: 17px;

    line-height: 1.6;

    text-align: left;

}


/* ==================================================
   BOTÓN CONTINUAR
================================================== */

#popup .boton-continuar {

    margin-top: 20px;

    padding: 13px 38px;

    border: none;

    border-radius: 30px;

    background:

        linear-gradient(
            90deg,
            #8b5cf6,
            #6366f1,
            #3b82f6
        );

    color: white;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    box-shadow:

        0 0 20px
        rgba(99, 102, 241, 0.5);

    transition: 0.2s;

}


#popup .boton-continuar:hover {

    transform: scale(1.06);

    box-shadow:

        0 0 30px
        rgba(139, 92, 246, 0.8);

}


/* ==================================================
   OCULTAR
================================================== */

.oculto {

    display: none !important;

}


/* ==================================================
   PANTALLAS PEQUEÑAS
================================================== */

@media (max-width: 1000px) {

    .juego {

        flex-direction: column;

        align-items: center;

    }


    .lateral {

        width: 90%;

        max-width: 500px;

    }

}


@media (max-width: 700px) {

    h1 {

        font-size: 35px;

    }


    .tablero {

        transform: scale(0.75);

        transform-origin: top center;

        margin-bottom: -100px;

    }

}
.ovsi-return { position:fixed; z-index:9999; top:12px; left:12px; padding:10px 14px; color:#fff; background:#071d2d; border:1px solid rgba(255,255,255,.35); border-radius:4px; font:700 13px/1.2 Arial,sans-serif; text-decoration:none; box-shadow:0 4px 18px rgba(0,0,0,.22); }
