/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Comic Neue', cursive;
    background-color: #f0f7ff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    font-family: 'Fredoka One', cursive;
    color: #2c3e50;
}

h1 {
    color: #3498db;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.screen {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Pantalla de bienvenida */
.welcome-content {
    text-align: center;
}

.welcome-img {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

#student-name {
    width: 80%;
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 30px;
    font-size: 16px;
    text-align: center;
    margin: 20px auto;
    font-family: 'Comic Neue', cursive;
}

/* Pantalla de juego */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.progress-container {
    width: 100%;
    background-color: #ecf0f1;
    border-radius: 10px;
    margin-top: 10px;
    height: 10px;
}

.progress-bar {
    height: 100%;
    background-color: #2ecc71;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s;
}

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.fractions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.fraction-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 15px;
    background-color: #f8f9fa;
    transition: all 0.3s;
    min-width: 120px;
}

.fraction-option:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.numerator, .denominator {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
}

.fraction-line {
    width: 100%;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
}

.comparison-selector {
    padding: 10px 15px;
    font-size: 24px;
    border: 2px solid #3498db;
    border-radius: 10px;
    background-color: white;
    color: #2c3e50;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.comparison-selector:hover {
    background-color: #f0f7ff;
}

.comparison-selector:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Contenedor de botones horizontal */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Mensaje de feedback */
.feedback-message {
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.5s;
}

#feedback-text {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
}

.correct {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
}

.incorrect {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Pantalla de resultados */
.results-content {
    text-align: center;
}

.results-img {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.final-score {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    color: #2c3e50;
}

#score-message {
    font-size: 18px;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background-color: #f8f9fa;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .fractions-container {
        gap: 10px;
    }
    
    .fraction-option {
        min-width: 80px;
        padding: 15px;
    }
    
    .comparison-selector {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    .buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}