/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 导航样式 */
.navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* 主内容样式 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.page {
    display: block;
}

.page.hidden {
    display: none;
}

/* 首页样式 */
.welcome-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.welcome-section > p {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: #666;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-card {
    background: linear-gradient(145deg, #f0f2f5, #ffffff);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
}

.feature-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 页面头部样式 */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 案例网格样式 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.case-card {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.case-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.case-card p {
    color: #666;
    margin-bottom: 15px;
}

.case-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.difficulty {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty.hard {
    background: #f8d7da;
    color: #721c24;
}

.case-progress {
    font-size: 0.9rem;
    color: #666;
}

/* 进度页面样式 */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 案例内容样式 */
.scenario-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.scenario-section h4 {
    color: #333;
    margin-bottom: 10px;
}

.step-section {
    margin-bottom: 25px;
}

.step-section h4 {
    color: #333;
    margin-bottom: 15px;
}

.step-content {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
}

.choice-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.choice-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.choice-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.choice-feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.choice-feedback.show {
    display: block;
}

.choice-feedback.correct {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.choice-feedback.incorrect {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 进度条样式 */
.progress-bar {
    position: relative;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 15px;
    right: 0;
    font-size: 0.9rem;
    color: #666;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn.hidden {
    display: none;
}

/* 结果模态框样式 */
.result-content {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-icon.success::after {
    content: "🎉";
}

.result-icon.failure::after {
    content: "💡";
}

.score-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.score-label {
    font-size: 1.1rem;
    color: #666;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.lessons-section {
    text-align: left;
    margin-top: 20px;
}

.lessons-section h5 {
    color: #333;
    margin-bottom: 10px;
}

.lessons-section ul {
    list-style-position: inside;
    color: #666;
}

.lessons-section li {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .navigation {
        gap: 5px;
    }
    
    .nav-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
} 