/* 答题页样式 */

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

/* 顶部导航 */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #6C63FF;
}

.test-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mode-badge {
    background: linear-gradient(135deg, #6C63FF, #5a52e0);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.mode-badge:empty {
    display: none;
}

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

/* 进度条 */
.progress-bar {
    height: 6px;
    background: #E0E0E0;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6C63FF, #5a52e0);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 题目卡片 */
.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.dimension-tag {
    display: inline-block;
    background: #F0F0FF;
    color: #6C63FF;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 20px;
}

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

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

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

.option-item:hover {
    border-color: #6C63FF;
    background: #FAFAFF;
}

.option-item.selected {
    border-color: #6C63FF;
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(108,99,255,0.05));
}

.option-key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #F5F5F5;
    border-radius: 50%;
    font-weight: bold;
    color: #666;
    margin-right: 15px;
    flex-shrink: 0;
}

.option-item.selected .option-key {
    background: #6C63FF;
    color: white;
}

.option-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* 底部导航 */
.test-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-nav {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-prev {
    background: #F0F0F0;
    color: #666;
}

.btn-prev:hover {
    background: #E0E0E0;
}

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

.btn-next {
    background: linear-gradient(135deg, #6C63FF, #5a52e0);
    color: white;
}

.btn-next:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(108,99,255,0.3);
}

.btn-next.btn-submit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* 题目圆点 */
.question-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot:hover {
    background: #BDBDBD;
}

.dot.answered {
    background: #6C63FF;
}

.dot.current {
    background: #6C63FF;
    transform: scale(1.3);
}

/* 提交确认弹窗 */
.submit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

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

.modal-content p {
    color: #666;
    margin-bottom: 25px;
}

.modal-content #answered-count {
    color: #6C63FF;
    font-weight: bold;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.btn-cancel, .btn-submit {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel {
    background: #F0F0F0;
    color: #666;
}

.btn-submit {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

/* ==================== 响应式设计 ==================== */

/* 手机设备 (宽度 <= 768px) */
@media screen and (max-width: 768px) {
    .test-container {
        padding: 15px;
    }
    
    .test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .test-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .question-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .dimension-tag {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 15px;
    }
    
    .question-text {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .option-item {
        padding: 14px 15px;
    }
    
    .option-key {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-right: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .test-footer {
        gap: 10px;
    }
    
    .btn-nav {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .question-dots {
        gap: 6px;
        padding: 10px 0;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 15px;
    }
    
    .modal-content h3 {
        font-size: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-submit {
        padding: 12px;
    }
}

/* 手机设备 (宽度 <= 480px) */
@media screen and (max-width: 480px) {
    .test-container {
        padding: 10px;
    }
    
    .back-link {
        font-size: 13px;
    }
    
    .progress-text {
        font-size: 13px;
    }
    
    .mode-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .question-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .question-text {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .options-container {
        gap: 10px;
    }
    
    .option-item {
        padding: 12px;
        border-radius: 10px;
    }
    
    .option-key {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 10px;
    }
    
    .option-text {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .btn-nav {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
}

/* 小屏手机 (宽度 <= 360px) */
@media screen and (max-width: 360px) {
    .question-text {
        font-size: 14px;
    }
    
    .option-text {
        font-size: 12px;
    }
}
