/* --- Estilos Generales (Inspirado en el Juego de Parejas) --- */
body, html {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    user-select: none;
    -webkit-user-select: none;
}

#app-container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    box-sizing: border-box;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* --- Pantalla de Selección de Nivel --- */
#level-selection-screen h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    color: #007bff;
    margin-bottom: 2rem;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.level-btn {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.level-btn:hover, .level-btn:active {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* --- Pantalla de Juego --- */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #495057;
}

#status-message {
    font-size: 1.5rem;
    color: #007bff;
}

#simon-container {
    display: grid;
    gap: 15px;
    margin: 20px auto;
    width: clamp(300px, 90vw, 450px);
    height: clamp(300px, 90vw, 450px);
}

.simon-button {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease-in-out;
    /* Colores base ligeramente desaturados para el tema claro */
    filter: saturate(0.8) brightness(1.1);
}

.simon-button:hover {
    transform: scale(1.02);
    filter: saturate(1) brightness(1.1);
}

/* Estado activo (cuando la luz se enciende) */
.simon-button.active {
    filter: saturate(1.2) brightness(1.2);
    transform: scale(1.05);
    box-shadow: 0 0 25px 8px currentColor; /* Mantenemos el resplandor */
}

/* Paleta de colores */
.color-0 { background-color: #e74c3c; color: #e74c3c; }
.color-1 { background-color: #3498db; color: #3498db; }
.color-2 { background-color: #2ecc71; color: #2ecc71; }
.color-3 { background-color: #f1c40f; color: #f1c40f; }
.color-4 { background-color: #9b59b6; color: #9b59b6; }
.color-5 { background-color: #e67e22; color: #e67e22; }
.color-6 { background-color: #1abc9c; color: #1abc9c; }
.color-7 { background-color: #ecf0f1; color: #ecf0f1; }

/* --- Botones de Navegación y Modal --- */
#back-to-menu-btn {
    margin-top: 2rem;
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s;
}

#back-to-menu-btn:hover {
    background-color: #5a6268;
}

#modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}

.modal-content {
    background: white; padding: 30px 40px; border-radius: 12px;
    text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 { font-size: 2.5rem; margin-top: 0; margin-bottom: 20px; }
.modal-content button {
    display: block; width: 100%; padding: 15px; font-size: 1.2rem;
    margin-top: 15px; border-radius: 8px; border: none; cursor: pointer;
    font-weight: bold; transition: background-color 0.2s;
}

#modal-action-btn { background-color: #28a745; color: white; }
#modal-action-btn:hover { background-color: #218838; }
#modal-menu-btn { background-color: #6c757d; color: white; }
#modal-menu-btn:hover { background-color: #5a6268; }

/* --- Estilos para la Secuencia en el Modal --- */
#modal-correct-sequence {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.sequence-block {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}
