/* 练习测试页面样式 */

/* 主容器样式 */
#quiz-container {
    min-height: calc(100vh - 200px);
}

/* 卡片样式 */
.quiz-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 问题卡片 */
#question-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

#question-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 问题内容 */
#question-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* 选项样式 */
.option-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.option-item:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.option-item.selected {
    background-color: #e7f1ff;
    border-color: #86b7fe;
    color: #084298;
}

.option-item.correct {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
    color: #0a3622;
}

.option-item.incorrect {
    background-color: #f8d7da;
    border-color: #f1aeb5;
    color: #58151c;
}

/* SQL 编辑器容器 */
#sql-editor-container {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    background-color: #f8f9fa;
}

/* 反馈区域 */
#feedback {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 难度标签 */
.difficulty-badge {
    font-size: 0.8rem;
    padding: 0.35em 0.65em;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-easy {
    background-color: #d1e7dd;
    color: #0a3622;
}

.difficulty-medium {
    background-color: #fff3cd;
    color: #664d03;
}

.difficulty-hard {
    background-color: #f8d7da;
    color: #58151c;
}

/* 按钮样式 */
.btn-quiz {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.2s ease;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2rem solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    #question-card {
        min-height: auto;
    }
    
    .quiz-card {
        margin-bottom: 1rem;
    }
    
    #question-content {
        font-size: 1rem;
    }
}

/* 代码高亮 */
pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
    word-wrap: break-word;
}

/* 提示框 */
.hint-box {
    background-color: #e7f5ff;
    border-left: 4px solid #4dabf7;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.hint-box .hint-title {
    font-weight: 600;
    color: #1864ab;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.hint-box .hint-title i {
    margin-right: 0.5rem;
}

/* 进度指示器 */
.progress-indicator {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    position: relative;
}

.progress-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #dee2e6;
    z-index: 0;
}

.progress-step {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: #6c757d;
}

.progress-step.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.progress-step.completed {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 过渡效果 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
