:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cae;
    --accent-color: #ff7e5f;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #e1f599;
    color: var(--dark-color);
    line-height: 1.6;
}

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.welcome-container {
    background-color: rgb(194, 233, 149);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
}

.welcome-container h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-container p {
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.input-group button {
    padding: 0.8rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.input-group button:hover {
    background-color: #ff6a45;
}

.app-container {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

header h1 {
    color: var(--primary-color);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.student-info span {
    font-weight: 600;
}

.score {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.exercise-container {
    background-color: rgb(216, 233, 169);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.fractions-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.fraction {
    background-color: var(--light-color);
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.fraction.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.drop-area {
    text-align: center;
    margin-top: 2rem;
}

.drop-area p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.drop-slots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    min-height: 70px;
}

.drop-slot {
    width: 80px;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.drop-slot.highlight {
    background-color: rgba(74, 111, 165, 0.1);
    border-color: var(--primary-color);
}

.drop-slot.filled {
    border-style: solid;
    border-color: var(--secondary-color);
    background-color: rgba(107, 140, 174, 0.1);
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5a8f;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f4f8;
}

.feedback-message {
    text-align: center;
    min-height: 30px;
    margin-top: 1rem;
    font-weight: 600;
}

.success {
    color: var(--success-color);
}

.error {
    color: var(--error-color);
}

.warning {
    color: var(--warning-color);
}

.fraction-number {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Animaciones */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.bounce {
    animation: bounce 0.5s;
}

.shake {
    animation: shake 0.5s;
}

/* Responsive */
@media (max-width: 600px) {
    .drop-slots {
        flex-wrap: wrap;
    }
    
    .buttons-container {
        flex-direction: column;
    }
}

/* Agregar estas reglas al final del archivo */

.fraction-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fraction-numerator {
    border-bottom: 1px solid var(--dark-color);
    padding: 0 0.5rem;
}

.fraction-denominator {
    padding: 0 0.5rem;
}

.fraction-slot {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ajustar tamaño de las fracciones en los slots */
.drop-slot .fraction {
    padding: 0.5rem;
    transform: scale(0.9);
}