/* Estilos Generales y Reseteo */
:root {
    --primary-color: #87CEEB; /* Azul cielo */
    --accent-color: #FF7F50; /* Naranja coral */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif; /* Puedes usar Montserrat, Open Sans */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    height: 40px; /* Ajusta según el tamaño de tu logo */
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--accent-color);
}

.hamburger-menu {
    display: none; /* Oculto por defecto en desktop */
    font-size: 30px;
    cursor: pointer;
}

/* Botones */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #ff6347; /* Un tono más oscuro */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #fff;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Secciones generales */
section {
    padding: 60px 0;
    text-align: center;
}

h1, h2 {
    margin-bottom: 25px;
    color: var(--text-color);
    font-weight: 700;
}

p {
    margin-bottom: 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #98FB98); /* Degradado alegre */
    color: #fff;
    padding: 100px 0;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #fff;
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
}

/* How It Works Section */
.how-it-works {
    background-color: #fff;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-item {
    padding: 30px;
    border-radius: var(--border-radius);
    background-color: #fcfcfc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateY(-5px);
}

.step-item img {
    height: 80px;
    margin-bottom: 20px;
}

.step-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Featured Exercises Section */
.featured-exercises {
    background-color: var(--light-gray);
}

.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.exercise-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease;
}

.exercise-card:hover {
    transform: translateY(-5px);
}

.exercise-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.exercise-card h3 {
    padding: 15px 20px 0;
    margin-bottom: 5px;
}

.exercise-card p {
    padding: 0 20px 15px;
    font-size: 0.95em;
    color: #666;
}

.exercise-card .btn-secondary {
    margin: 0 20px 20px;
    width: calc(100% - 40px); /* Ajuste para el padding */
}

/* Exercise Detail Page */
.exercise-detail {
    padding: 80px 0;
    text-align: center;
}

#game-area {
    background-color: #fff;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 40px auto;
}

#numbers-display {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--accent-color);
    min-height: 100px; /* Para evitar saltos de diseño */
    display: flex;
    justify-content: center;
    align-items: center;
}

#user-input {
    width: 80%;
    padding: 15px;
    font-size: 1.5em;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s ease;
}

#user-input:focus {
    border-color: var(--accent-color);
}

#game-area button {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#start-button {
    background-color: var(--primary-color);
    color: #fff;
}
#start-button:hover:not(:disabled) {
    background-color: #6495ED; /* Un tono más oscuro */
    transform: translateY(-2px);
}

#check-button {
    background-color: var(--accent-color);
    color: #fff;
}
#check-button:hover:not(:disabled) {
    background-color: #ff6347;
    transform: translateY(-2px);
}

#game-area button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#feedback-message {
    margin-top: 20px;
    font-size: 1.2em;
    font-weight: 600;
    min-height: 30px; /* Para evitar saltos */
}

#level {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 15px;
}


/* Footer */
footer {
    background-color: var(--text-color);
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: auto; /* Para que el footer se quede abajo */
}

/* Media Queries para Responsiveness */
@media (max-width: 768px) {
    header nav {
        display: none; /* Oculta el menú normal */
    }

    .hamburger-menu {
        display: block; /* Muestra el menú hamburguesa */
    }

    /* Puedes añadir aquí JavaScript para la funcionalidad del menú hamburguesa */

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    .steps-grid, .exercises-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }

    .step-item, .exercise-card {
        margin-bottom: 20px;
    }

    #game-area {
        padding: 20px;
    }

    #numbers-display {
        font-size: 3em;
    }

    #user-input {
        width: 95%;
        font-size: 1.2em;
    }

    #game-area button {
        width: 100%;
        margin: 10px 0;
    }
}