/* --- General --- */
body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    height: 100vh;
    width: 100vw;
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

#app-container {
    width: 100%;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hidden { display: none !important; }

/* --- Pantalla de Selección de Nivel --- */
#level-selection-screen {
    text-align: center;
    margin: auto;
    width: 100%;
    max-width: 800px;
}
#level-selection-screen h1 {
    font-size: 3rem;
    color: #007bff;
}

/* --- CAMBIOS: Ajustes para botones más pequeños --- */
.level-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.level-btn {
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.level-btn:hover, .level-btn:active {
    background-color: #007bff;
    color: white;
}

/* --- Pantalla de Juego --- */
#game-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 600px; /* Ancho máximo para el área de juego */
    justify-content: center;
    align-items: center;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timer, #target-time-display {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    background-color: #e9ecef;
    padding: 10px 20px;
    border-radius: 8px;
}

.timer {
    color: #dc3545;
}

#game-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    width: 100%;
}

#message-display {
    font-size: 6rem;
    font-weight: bold;
    color: #6c757d;
}

#action-btn {
    width: 250px;
    height: 250px;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    background-color: #dc3545;
    border: none;
    border-radius: 50%; /* Botón circular */
    cursor: pointer;
    transition: transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}
#action-btn:active {
    transform: scale(0.95);
}


/* --- Modal --- */
#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: 100;
}

.modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 300px;
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-top: 0;
}

#modal-details {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 20px 0;
}

.modal-content button {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    margin-top: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
#modal-action-btn {
    background-color: #28a745;
    color: white;
}
#back-to-menu-btn {
    background-color: #6c757d;
    color: white;
}
