.site-footer {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

body {
    font-family: 'Roboto Mono', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    background-color: #3a3a3a;
    background-image: radial-gradient(rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%), radial-gradient(#222 15%, transparent 16%), radial-gradient(#222 15%, transparent 16%);
    background-size: cover, 8px 8px, 8px 8px;
    background-position: center, 0 0, 4px 4px;
    min-height: 100vh;
    color: #333;
}

.main-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    gap: 2rem;
}

.ranking-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    width: 250px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.contenedor-juego {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    position: relative;
}
.titulo{
    color: #fff;
}
.lista-palabras {
    background-color: #fff;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    width: 250px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

h1 {
    color: #fff;
    text-shadow: 2px 2px 4px #000;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tabs-ranking { display: flex; border-bottom: 2px solid #ccc; margin-bottom: 15px; }
.tab-link { padding: 10px; cursor: pointer; border: none; background: transparent; font-family: 'Roboto Mono'; font-weight: 500; color: #555; border-bottom: 3px solid transparent; flex: 1; }
.tab-link:hover { color: #000; }
.tab-link.active { color: #007bff; border-bottom: 3px solid #007bff; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.ranking-contenido ul { list-style: none; padding: 0; margin: 0; }
.ranking-contenido li { padding: 8px 0; border-bottom: 1px solid #eee; font-size: 0.9rem; }

.dificultad-selector { margin-bottom: 1.5rem; text-align: center; width: 100%; }
.dificultad-selector .subt { color: #ddd; font-size: 1rem; margin-bottom: 10px; font-weight: normal; }
.dificultad-selector button {
    background-color: #6c757d; color: white; cursor: pointer;
    border-bottom: 5px solid #545b62; transform: translateY(0);
    transition: all 0.1s; font-weight: bold; text-transform: uppercase;
    margin: 0.2rem;
}
.dificultad-selector button.active { background-color: #6c757d; border: 2px solid #fff; }
.dificultad-selector button:hover { background-color: #5a6268; }
.dificultad-selector button:active { transform: translateY(3px); border-bottom-width: 2px; }

.patente {
    font-size: 3rem; margin: 1.5rem auto; padding: 0.5rem 2.5rem;
    background-color: #000; color: #fff; border: 5px solid #fff;
    border-radius: 8px; width: fit-content; letter-spacing: 0.3rem;
    font-family: 'Roboto Mono', monospace; box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    font-weight: bold; text-transform: uppercase; position: relative; padding-bottom: 1.5rem;
    display: flex; justify-content: center;
}
.patente::after {
    content: "ARGENTINA"; position: absolute; bottom: 5px; left: 0; right: 0;
    text-align: center; font-size: 0.8rem; color: #fff; font-weight: normal; letter-spacing: 0.1rem;
}

.info-centro { display: flex; justify-content: space-around; width: 100%; margin-top: 1rem; }
.timer, .puntaje { font-size: 1.5rem; font-weight: 700; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.timer { color: #4dabf7; } .puntaje { color: #51cf66; }
.parpadeo { animation: parpadeo 1s infinite; color: #ff6b6b; }

.panel-juego {
    margin-top: 2rem; width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
}
input, button { font-family: 'Roboto Mono'; font-size: 1.2rem; padding: 0.6rem 1rem; border-radius: 10px; border: none; outline: none; box-sizing: border-box; }

#inputPalabra { width: 100%; background: #fff; border-bottom: 5px solid #ccc; color: #333; text-align: center; font-weight: bold; }
#inputPalabra:focus { border-bottom: 5px solid #007bff; transform: translateY(2px); }

#btnConfirmar { width: 100%; background: #28a745; border-bottom: 5px solid #1e7e34; color: white; font-weight: bold; cursor: pointer; order: 2; }
#btnConfirmar:active { transform: translateY(3px); border-bottom-width: 2px; }

#btnCambiarLetras { flex: 1; background: #fd7e14; border-bottom: 5px solid #c65f0a; color: white; font-weight: bold; cursor: pointer; order: 3; }
#btnCambiarLetras:active { transform: translateY(3px); border-bottom-width: 2px; }

#btnReiniciar {flex: 1; background: #dc3545; border-bottom: 5px solid #a71d2a; color: white; font-weight: bold; cursor: pointer; order: 4; }
#btnReiniciar:active { transform: translateY(3px); border-bottom-width: 2px; }

.mensaje-flotante {
    font-size: 1.5rem; font-weight: 700; position: absolute; top: 50%; left: 50%; transform: translateX(-50%);
    padding: .5rem 1rem; border-radius: 8px; z-index: 10; opacity: 0; transition: opacity .5s ease; pointer-events: none;
    background: rgba(255,255,255,0.9); box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.mensaje-verde { color: #155724; border: 2px solid #155724; }
.mensaje-rojo { color: #721c24; border: 2px solid #721c24; }

.lista-palabras h2 { margin-top: 0; border-bottom: 1px solid #ccc; padding-bottom: 0.5rem; margin-bottom: 1rem; font-size: 1.2rem; text-align: center; }
.palabra-item { font-size: 1.1rem; color: #333; margin-bottom: .5rem; }

.sugerencias-palabras {
    position: fixed; bottom: 2rem; right: 2rem; width: 250px; background: #fff; border: 1px solid #add8e6;
    border-radius: 8px; padding: 1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 100;
    opacity: 0; transition: opacity .5s ease-in-out; display: none; font-size: .9rem;
}
.sugerencias-palabras h3 { margin-top: 0; color: #0056b3; border-bottom: 1px solid #add8e6; padding-bottom: .5rem; }
.sugerencias-palabras ul { list-style: none; padding: 0; margin: 0; }
.sugerencias-palabras li { font-weight: normal; }
.sugerencias-palabras li strong { color: #e67e22; font-weight: 700; }
.sugerencias-cerrar { display: none; }
.sugerencias-ok { display: none; }
.sugerencias-overlay { display: none; }

.como-jugar-seccion { width: 100%; max-width: 620px; margin: 2rem auto; text-align: center; }
.btn-toggle-instrucciones { background: #17a2b8; border-bottom: 5px solid #117a8b; color: white; font-weight: bold; cursor: pointer; padding: 0.8rem 2rem; border-radius: 10px; transition: all 0.1s; }
.btn-toggle-instrucciones:active { transform: translateY(3px); border-bottom-width: 2px; }
.instrucciones-ocultas { max-height: 0; overflow: hidden; transition: max-height .5s ease-out; margin-top: 1rem; }
.instrucciones-ocultas.visible { max-height: 3000px; }

.guia-titulo { text-align: center; font-size: 1.4rem; color: #2c3e50; margin-bottom: 1rem; }

.guia-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 5px solid #ccc;
}
.guia-card p { margin: 0.4rem 0; font-size: 0.9rem; }
.guia-card-titulo { font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; color: #2c3e50; }
.guia-nota { font-size: 0.8rem; color: #666; margin-top: 0.6rem !important; }
.guia-lista { margin: 0.3rem 0 0 1rem; padding: 0; font-size: 0.9rem; }
.guia-lista li { margin-bottom: 0.3rem; }

.guia-objetivo  { border-color: #3498db; }
.guia-puntaje   { border-color: #27ae60; }
.guia-racha     { border-color: #e67e22; }
.guia-tiempo    { border-color: #9b59b6; }
.guia-cambiar   { border-color: #e74c3c; }
.guia-dificultad{ border-color: #f39c12; }
.guia-tips      { border-color: #17a2b8; }

.guia-pts-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.guia-pts-fila { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.88rem; }
.guia-pts-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
    min-width: 58px;
    text-align: center;
}
.guia-pts-badge.verde { background: #27ae60; }
.guia-pts-badge.azul  { background: #2980b9; }
.guia-pts-badge.gris  { background: #7f8c8d; }

.racha-tabla { border-radius: 8px; overflow: hidden; margin: 0.6rem 0; font-size: 0.88rem; }
.racha-fila { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 0.35rem 0.6rem; }
.racha-fila.encabezado { background: #e67e22; color: #fff; font-weight: 700; border-radius: 6px 6px 0 0; }
.racha-fila:not(.encabezado) { background: #fef9f4; border-bottom: 1px solid #fde3c4; }
.racha-3 { background: #fff3e0 !important; }
.racha-4 { background: #ffe0b2 !important; }
.racha-5 { background: #ffcc80 !important; font-weight: 700; }
.mult { color: #e67e22; font-weight: 700; }
.bonus-tiempo { color: #c0392b; font-weight: 700; }

.cambio-tabla { border-radius: 8px; overflow: hidden; margin: 0.5rem 0; font-size: 0.88rem; }
.cambio-fila { display: flex; justify-content: space-between; padding: 0.3rem 0.7rem; background: #fff5f5; border-bottom: 1px solid #ffd5d5; }
.cambio-fila:last-child { border-bottom: none; }
.pen { color: #c0392b; font-weight: 700; }

.dif-tabla { border-radius: 8px; overflow: hidden; margin: 0.5rem 0; font-size: 0.88rem; }
.dif-fila { display: flex; gap: 0.7rem; align-items: center; padding: 0.4rem 0.7rem; }
.dif-fila span:first-child { font-weight: 700; min-width: 80px; flex-shrink: 0; }
.dif-facil   { background: #eafaf1; }
.dif-normal  { background: #fef9e7; }
.dif-dificil { background: #fdedec; }

.btn-sonido {
    position: fixed; bottom: 20px; right: 20px; background: rgba(255,255,255,0.8); border: 1px solid #ccc;
    border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 1000; transition: all 0.2s;
}
.btn-sonido:hover { background: #fff; transform: translateY(-2px); }

@keyframes shake { 0%, 100% {transform: translateX(0);} 20% {transform: translateX(-10px);} 40% {transform: translateX(10px);} 60% {transform: translateX(-10px);} 80% {transform: translateX(10px);} }
.error-shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; border-bottom-color: red !important; }
@keyframes pop { 0% {transform: scale(1);} 50% {transform: scale(1.1);} 100% {transform: scale(1);} }
.success-pop { animation: pop 0.3s ease-in-out; color: #28a745 !important; }

.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ranking-header h2 { margin: 0; }
.btn-toggle-ranking { display: none; }
.ranking-colapsable { display: contents; }

@media (max-width: 900px) {
    body { padding: 1rem; }

    .main-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .contenedor-juego { order: 1; width: 100%; }

    .lista-palabras {
        order: 2;
        width: 100%;
        max-width: 500px;
        margin: 0;
        text-align: center;
        max-height: 150px;
        overflow-y: auto;
        padding: 0.6rem 1rem;
    }
    .lista-palabras h2 { font-size: 1rem; margin-bottom: 0.4rem; padding-bottom: 0.3rem; }
    .palabra-item { font-size: 0.95rem; margin-bottom: 0.25rem; }

    .ranking-container {
        order: 3;
        width: 100%;
        max-width: 500px;
        margin: 0;
        padding: 0.8rem 1rem;
    }
    .btn-toggle-ranking {
        display: inline-block;
        background: #0056b3;
        color: #fff;
        border: none;
        border-radius: 6px;
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
        cursor: pointer;
    }
    .ranking-colapsable {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .ranking-colapsable.ranking-abierto {
        max-height: 400px;
    }

    h1 { font-size: 2rem; margin-bottom: 1rem; }
    .dificultad-selector button { padding: 0.6rem 0.8rem; flex: 1; font-size: 0.9rem; }
    .patente { font-size: 2.5rem; padding: 0.5rem 1.5rem; }
    #inputPalabra { margin-bottom: 0.8rem; }

    .sugerencias-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1000;
    }

    .sugerencias-palabras {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        right: auto !important;
        transform: translate(-50%, -50%);
        width: 80% !important;
        max-width: 280px;
        max-height: 55vh;
        overflow-y: auto;
        z-index: 1001;
        padding: 0.8rem 1rem 0.8rem !important;
        font-size: 0.82rem;
    }
    .sugerencias-palabras h3 {
        font-size: 0.85rem;
        margin-right: 1.2rem;
    }
    .sugerencias-cerrar {
        display: block;
        position: absolute;
        top: 0.4rem;
        right: 0.6rem;
        background: none;
        border: none;
        font-size: 1rem;
        color: #888;
        cursor: pointer;
        line-height: 1;
        padding: 0;
    }
    .sugerencias-ok {
        display: block;
        margin: 0.7rem auto 0;
        background: #0056b3;
        color: #fff;
        border: none;
        border-radius: 6px;
        padding: 0.4rem 1.4rem;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .como-jugar-seccion { order: 4; margin-top: 2rem; }

    .btn-sonido { bottom: 10px; right: 10px; width: 45px; height: 45px; font-size: 1.2rem; }
}

@keyframes titilar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.mensaje-dificultad-elevada {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 3px solid #e67e22;
    border-radius: 12px;
    padding: 1.2rem 2rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #c0392b;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    z-index: 2000;
    animation: titilar 0.6s ease-in-out infinite;
    max-width: 320px;
    line-height: 1.5;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 280px;
}
