/* 统一课程样式文件 - 基于第1课样式优化 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    line-height: 1.6;
    color: #333;
}

/* 课程头部 */
.lesson-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.lesson-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.lesson-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航按钮 */
.nav-back {
    color: white;
    text-decoration: none;
}

.nav-back:hover {
    color: #f8f9fa;
}

.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 学习目标提醒 */
.learning-objective {
    background: linear-gradient(135deg, var(--info-color), #5bc0de);
    color: white;
    border: none;
    border-radius: 10px;
}

.learning-objective h5 {
    font-weight: 600;
}

/* 练习内容区域 */
.exercise-content {
    margin-bottom: 2rem;
}

/* 练习项目 */
.exercise-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.exercise-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.exercise-item.correct {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #d4edda, #f8fff9);
}

.exercise-item.incorrect {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, #f8d7da, #fff5f5);
}

/* 题目样式 */
.exercise-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* 输入框样式 */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 选择题选项 */
.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
}

.form-check-label {
    margin-left: 0.5rem;
    font-size: 1rem;
}

/* 问答题文本区域 */
.essay-textarea {
    min-height: 120px;
    resize: vertical;
}

/* 控制按钮区域 */
.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

/* 状态显示 */
.completion-status {
    font-size: 1.1rem;
    font-weight: 500;
}

.badge {
    font-weight: 500;
}

/* 结果显示 */
.result-display {
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.result-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.result-error {
    background: linear-gradient(135deg, var(--danger-color), #e83e8c);
    color: white;
}

/* 分数显示 */
.score-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lesson-header h1 {
        font-size: 2rem;
    }
    
    .lesson-header .lead {
        font-size: 1rem;
    }
    
    .exercise-item {
        padding: 1rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exercise-item {
    animation: fadeIn 0.6s ease-out;
}

/* 键盘快捷键提示 */
.shortcut-hint {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.shortcut {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 0.2rem;
}

/* 学生卡片样式 */
.student-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.student-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.student-info {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

/* 自定义徽章样式 */
.badge-custom {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-grade {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.badge-class {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.badge-group {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

/* 班级和学生列表样式 */
.class-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #28a745;
}

.class-card.active {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #f8fff9);
}

.class-info h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.class-info p {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* 搜索框样式 */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

/* 导入区域样式 */
.import-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border-left: 4px solid #17a2b8;
}

/* 数据显示表格样式 */
.data-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.data-table th {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: none;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.data-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* 导入结果样式 */
.import-result {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 1.5rem;
}

/* 响应式设计 - 学生卡片 */
@media (max-width: 768px) {
    .student-card {
        padding: 1rem;
    }
    
    .student-name {
        font-size: 1.1rem;
    }
    
    .badge-custom {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        margin-right: 0.25rem;
    }
}