body {
    background-color: #0b0c10;
    color: white;
    font-family: 'Nunito', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.interfaz {
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #1f2833;
    display: flex;
    flex-direction: column;
}

.cabecera-juego {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    border-bottom: 2px solid #45a29e;
}

.mision-panel {
    position: absolute;
    top: 55px; 
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8); 
    border: 3px solid #ffeb3b; 
    border-radius: 10px;
    padding: 5px 20px; 
    text-align: center;
    color: white;
    z-index: 5;
    font-size: 1.1rem; 
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 4px 10px rgba(255,235,59,0.2);
}

#problema-actual {
    font-size: 2rem; 
    font-family: 'Fredoka One', cursive;
    color: #ffeb3b;
    display: block;
    margin-top: 2px;
}

.btn-volver {
    text-decoration: none;
    color: #66fcf1;
    background: rgba(11, 12, 16, 0.8);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid #45a29e;
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
}

.btn-volver:hover { background: #45a29e; color: #0b0c10; }

.puntos-contenedor { color: #ffeb3b; font-size: 1.3rem;}
.vidas-contenedor { color: #ff5252; font-size: 1.3rem;}

#escudo {
    margin-left: 15px;
    color: #66fcf1;
}

canvas {
    display: block;
    background: #000;
}

.pantalla-oculta { display: none !important; }

.pantalla-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(11, 12, 16, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
}

.pantalla-overlay h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5rem;
    color: #4ECDC4;
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(78,205,196,0.3);
}

#pantalla-fin h1 {
    color: #ffeb3b;
    text-shadow: 0 0 15px rgba(255,235,59,0.5);
}

.pantalla-overlay p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: white;
}

#pantalla-fin p {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.seleccion-tablas {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 500px;
    margin-bottom: 30px;
}

.seleccion-tablas label {
    font-size: 2rem;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    border: 3px solid #ffeb3b;
    border-radius: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Fredoka One', cursive;
    color: #ffeb3b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seleccion-tablas label:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.seleccion-tablas input[type="checkbox"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.btn-opcion-quiz {
    font-size: 2.5rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    border: 4px solid #4ECDC4;
    border-radius: 15px;
    padding: 15px 40px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Fredoka One', cursive;
    color: #ffffff;
    min-width: 120px;
}

.btn-opcion-quiz:hover {
    background: #4ECDC4;
    color: #0b0c10;
    transform: scale(1.1);
}

.btn-gigante {
    background: #ff5252;
    color: white;
    border: none;
    border-bottom: 6px solid #d32f2f;
    padding: 20px 40px;
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Fredoka One', cursive;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    outline: none;
}

.btn-gigante:hover {
    background: #ff7675;
    transform: translateY(-3px);
}

.btn-gigante:active {
    transform: translateY(3px);
    border-bottom: 2px solid #d32f2f;
}
