body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Estilos para el registro */
.registration {
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.registration h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

#student-name {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    width: 80%;
    max-width: 300px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#start-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

#start-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Encabezado de la aplicación */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: linear-gradient(to right, #182848, #4b6cb7);
    border-radius: 10px;
    color: white;
}

#welcome-message {
    font-size: 20px;
    font-weight: bold;
}

#score {
    font-size: 20px;
    font-weight: bold;
    background-color: #ff5f02;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Contenedor del ejercicio */
.exercise-container {
    text-align: center;
    margin-bottom: 30px;
}

.exercise-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Gráfico de fracciones */
.graphic {
    display: flex;
    
    margin: 0 auto 30px;
    width: 100%;
    max-width: 500px;
    height: 120px;
    background-color: #fff;
    overflow: hidden;
}

.graphic-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.rectangle {
    display: flex;
    border: 2px solid #34495e;
    height: 80px;
    background-color: #fff;
    overflow: hidden;
}

.part {
    flex-grow: 1;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.part.colored {
    background-color: #3498db;
}

.part:last-child {
    border-right: none;
}

/* Entrada de respuesta */
.answer-input {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.answer-input input {
    width: 80px;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #3498db;
    border-radius: 5px;
}

.fraction-bar {
    width: 50px;
    height: 3px;
    background-color: #34495e;
}

/* Feedback */
.feedback {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Controles */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.controls button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#check-btn {
    background-color: #2ecc71;
    color: white;
}

#check-btn:hover {
    background-color: #27ae60;
}

#new-fraction-btn {
    background-color: #e67e22;
    color: white;
}

#new-fraction-btn:hover {
    background-color: #d35400;
}

button:disabled {
    background-color: #95a5a6 !important;
    cursor: not-allowed;
}

.fraction-input {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.fraction-line {
    width: 80px;
    height: 2px;
    background-color: #34495e;
    margin: 5px 0;
}

.fraction-input input {
    width: 60px;
    padding: 8px;
    font-size: 22px;
    text-align: center;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-weight: bold;
}

.fraction-input input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

#numerator-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

#denominator-input {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}