/* IQ测试页样式 */

.test-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    background: #F8F9FA;
}

/* 顶部导航 */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.back-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-btn:hover {
    text-decoration: underline;
}

.test-logo {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.test-progress {
    font-size: 14px;
    color: #666;
}

.module-indicator {
    background: #F0F0FF;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

/* 模块进度条 */
.modules-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 20px;
    background: white;
    margin-bottom: 15px;
}

.module-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.module-step.active {
    opacity: 1;
}

.module-step.completed .step-icon {
    background: #4CAF50;
    color: white;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.module-step.active .step-icon {
    background: #667eea;
    color: white;
}

.step-name {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

.module-step.active .step-name {
    color: #667eea;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #E0E0E0;
    margin: 0 5px;
    margin-bottom: 20px;
}

/* 题目卡片 */
.question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 0 15px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-id {
    font-size: 14px;
    color: #667eea;
    font-weight: bold;
}

.question-instruction {
    font-size: 13px;
    color: #999;
}

.question-text {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
}

/* 选项 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    background: #F8F9FA;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.option-item:hover {
    background: #F0F4FF;
    border-color: #667eea;
}

.option-item.selected {
    background: #F0F4FF;
    border-color: #667eea;
}

.option-key {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #667eea;
    margin-right: 15px;
    font-size: 14px;
    border: 2px solid #667eea;
}

.option-item.selected .option-key {
    background: #667eea;
    color: white;
}

.option-text {
    font-size: 15px;
    color: #333;
    flex: 1;
}

/* 底部导航 */
.test-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background: white;
    margin: 0 15px;
    border-radius: 15px;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.05);
}

.btn-nav {
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: #F0F0FF;
    color: #667eea;
}

.btn-nav:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.question-counter {
    font-size: 14px;
    color: #999;
}

.question-counter span:first-child {
    color: #667eea;
    font-weight: bold;
}

/* 模块完成 */
.module-complete-section {
    display: flex;
    justify-content: center;
    padding: 20px 15px;
}

.btn-complete-module {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-complete-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.module-done {
    text-align: center;
    padding: 30px;
    color: #4CAF50;
    font-size: 16px;
}

/* 完成弹窗 */
.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;
}

.modal-content {
    background: white;
    padding: 50px 40px;
    border-radius: 25px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    font-size: 15px;
    margin-bottom: 20px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.btn-view-result {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .question-card {
        padding: 20px;
        margin: 0 10px 10px;
        border-radius: 15px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .option-item {
        padding: 12px 15px;
    }
    
    .option-key {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .test-footer {
        margin: 0 10px;
        padding: 15px 10px;
    }
    
    .btn-nav {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .modules-progress {
        padding: 20px 15px;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .step-line {
        width: 25px;
    }
    
    .module-indicator {
        font-size: 12px;
        padding: 4px 10px;
    }
}

@media screen and (max-width: 480px) {
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .btn-complete-module {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 40px 25px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
}
