/* 知识问答网站样式 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 主容器 */
.container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 650px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header .subtitle {
    color: #888;
    font-size: 14px;
}

/* 进度条区域 */
.progress-section {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-info .current-question {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.progress-info .score-display {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* 题目区域 */
.question-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.question-text {
    font-size: 20px;
    color: #333;
    line-height: 1.8;
    font-weight: 600;
}

/* 选项区域 */
.options-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option-btn {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #333;
    position: relative;
}

.option-btn:hover:not(.disabled) {
    border-color: #667eea;
    background: #f0edff;
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: #667eea;
    background: #f0edff;
}

.option-btn.correct {
    border-color: #28a745;
    background: #d4edda;
}

.option-btn.wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.option-btn.wrong .option-letter {
    background: #dc3545;
}

.option-btn.correct .option-letter {
    background: #28a745;
}

.option-text {
    flex: 1;
}

.option-result {
    font-size: 24px;
    margin-left: 10px;
}

/* 结果页面 */
.result-section {
    text-align: center;
    padding: 40px 20px;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.result-score {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.result-item {
    text-align: center;
}

.result-item .number {
    font-size: 36px;
    font-weight: 700;
}

.result-item .label {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

.result-item.correct .number {
    color: #28a745;
}

.result-item.wrong .number {
    color: #dc3545;
}

.restart-btn {
    padding: 16px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 25px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .question-text {
        font-size: 17px;
    }
    
    .option-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .option-letter {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .result-score {
        font-size: 40px;
    }
    
    .result-details {
        gap: 25px;
    }
}
