/* 智商测试专用样式 - 基于润泽心理咨询统一风格 */
@import url('style-base.css');

/* 智商等级展示 */
.iq-levels {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.iq-levels h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 16px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.level-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* 测试头部（进度+计时器） */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
}

.progress-info {
    flex: 1;
    margin-right: 20px;
}

/* 计时器 */
.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    min-width: 120px;
}

.timer-icon {
    font-size: 20px;
}

#timerDisplay {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* 题目文本（文本题） */
.question-text {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* 题目图片容器 */
.question-image-container {
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.question-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* 选项容器（统一样式） */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* 文本选项 */
.option-text {
    padding: 16px 20px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-number {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    min-width: 24px;
}

.option-text:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.option-text.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    box-shadow: var(--shadow-md);
}

.option-text.selected .option-number {
    color: white;
    background: var(--primary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 选项网格（2x2布局用于图片选项） */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.option-image {
    position: relative;
    padding: 16px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    text-align: center;
}

.option-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.option-label {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    z-index: 1;
}

.option-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.option-image.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(123, 104, 238, 0.05));
}

.option-image.selected .option-label {
    background: var(--primary-color);
    color: white;
}

/* 智商分数圆圈 */
.iq-score {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.iq-score .score-value {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.iq-score .score-label {
    color: white;
}

/* 测试时间显示 */
.test-time {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* 正确率显示 */
.correct-rate {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}

.correct-rate span:nth-child(2) {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .test-header {
        flex-direction: column;
        gap: 16px;
    }

    .progress-info {
        width: 100%;
        margin-right: 0;
    }

    .timer {
        width: 100%;
        justify-content: center;
    }

    .level-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .level-grid {
        grid-template-columns: 1fr;
    }

    #timerDisplay {
        font-size: 20px;
    }
}
