/* 수리 능력 향상 스타일 */
.math-problem-container {
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.problem-display {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 25px;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
}

.answer-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#answer-input {
    font-size: 1.5rem;
    padding: 12px 15px;
    width: 150px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    text-align: center;
}

#answer-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.progress-container {
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.progress-bar {
    height: 15px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.timer-container {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.timer-container.warning {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 결과 화면 */
#modalDetails {
    margin: 15px 0;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.math-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.math-result-item:last-child {
    border-bottom: none;
}

.math-result-item.correct {
    color: #27ae60;
}

.math-result-item.incorrect {
    color: #e74c3c;
}

.math-result-item span {
    display: inline-block;
}

.math-result-item .problem {
    font-weight: bold;
    flex: 1;
}

.math-result-item .user-answer {
    margin: 0 15px;
}

.math-result-item .correct-answer {
    font-weight: bold;
}

/* 숫자 선택 패드 스타일 */
.number-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
}

.number-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
}

.number-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background-color: #3367d6;
    transform: scale(1.05);
}

.number-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px 15px;
    position: relative;
}

#selected-answer {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: var(--error-color);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .problem-display {
        font-size: 2rem;
    }
    
    #answer-input {
        font-size: 1.2rem;
        width: 120px;
    }
    
    .exercise-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .number-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    #selected-answer {
        font-size: 1.8rem;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .problem-display {
        font-size: 1.8rem;
    }
    
    .math-problem-container {
        padding: 20px 15px;
    }
    
    .answer-input-container {
        flex-direction: column;
    }
    
    #answer-input {
        width: 100%;
        max-width: 200px;
    }
    
    .number-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .number-buttons {
        gap: 8px;
    }
}

/* 난이도 선택기 스타일 개선 */
.level-selector {
    margin-bottom: 15px;
}

.level-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.level-selector select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: white;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234285f4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.level-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3);
    border-color: #3367d6;
}

.level-selector select:hover {
    border-color: #3367d6;
}

.level-selector select option {
    padding: 10px;
    font-size: 1rem;
} 