/* 全局样式重置与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Microsoft YaHei", "Heiti SC", sans-serif;
}

/* 背景样式 - 渐变+纹理 */
body {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8f0ff 100%);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(66, 153, 225, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(138, 100, 225, 0.05) 0%, transparent 20%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 30px 20px;
    color: #334155;
    line-height: 1.6;
}

/* 背景装饰元素 */
.bg-decoration {
    position: fixed;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.08) 0%, rgba(138, 100, 225, 0.08) 100%);
    border-radius: 50%;
    z-index: -1;
}

/* 主容器 - 卡片化设计 */
.test-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 800px;
    padding: 45px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    /* 卡片顶部渐变装饰 */
    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: linear-gradient(90deg, #4299e1, #8a64e1);
    }
}

/* 模式选择区域 */
.mode-select-area {
    text-align: center;
    padding: 20px 0;
    animation: fadeIn 0.6s ease-in-out;
}
.mode-select-area h2 {
    color: #1e293b;
    font-size: 26px;
    margin-bottom: 12px;
    font-weight: 700;
}
.mode-select-area > p {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 40px;
}
.mode-btn-group {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 36px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 240px;
    outline: none;
}
.mode-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(66, 153, 225, 0.15);
}
.mode-btn-20:hover {
    border-color: #4299e1;
    background: #f0f7ff;
}
.mode-btn-100:hover {
    border-color: #8a64e1;
    background: #f8f0ff;
}
.mode-btn-num {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}
.mode-btn-20 .mode-btn-num {
    background: linear-gradient(135deg, #4299e1, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mode-btn-100 .mode-btn-num {
    background: linear-gradient(135deg, #8a64e1, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mode-btn-label {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}
.mode-btn-desc {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
}

/* 测试头部 */
.test-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.test-header h1 {
    color: #1e293b;
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #4299e1, #8a64e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.test-header p {
    color: #64748b;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* 进度条容器 */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 进度条 - 渐变+动画 */
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #8a64e1);
    border-radius: 8px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 10px rgba(66, 153, 225, 0.3);
}

/* 题目标题 */
.question-title {
    color: #1e293b;
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.7;
    font-weight: 600;
    padding-left: 12px;
    border-left: 4px solid #4299e1;
}

/* 选项列表 */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

/* 选项按钮 - 美化+动效 */
.option-btn {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    font-size: 17px;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
    position: relative;
    overflow: hidden;
    font-weight: 500;

    /* 按钮hover效果 */
    &:hover {
        background-color: #f0f7ff;
        border-color: #4299e1;
        color: #4299e1;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(66, 153, 225, 0.1);
    }

    /* 按钮点击/选中效果 */
    &:disabled {
        cursor: not-allowed;
        opacity: 1;
    }

    /* 选中按钮的装饰 - 仅当前选中项显示✓ */
    &.selected {
        background-color: #f0f7ff;
        border-color: #4299e1;
        color: #4299e1;
        box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
    }
    &.selected::after {
        content: "✓";
        position: absolute;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        color: #4299e1;
        font-weight: bold;
    }
}

/* 按钮组（返回按钮+进度文本） */
.btn-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* 返回按钮样式 */
.prev-btn {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;

    &:hover {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
        color: #4299e1;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
}

/* 进度文本 */
.progress-text {
    text-align: center;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* 结果区域 */
.result-area {
    text-align: center;
    padding: 20px 0;
    animation: fadeIn 0.8s ease-in-out;
}

/* 结果卡片 */
.result-card {
    background: linear-gradient(135deg, #f8faff 0%, #f0f7ff 100%);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

/* MBTI人物图片 */
.mbti-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px auto;
    border: 4px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-in-out;
    background: #f8fafc;
}

.result-area h2 {
    color: #1e293b;
    font-size: 28px;
    margin-bottom: 20px;
    line-height: 1.5;
    font-weight: 600;
}

/* 人格类型文本 */
.type-text {
    background: linear-gradient(90deg, #4299e1, #8a64e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 2px;
    display: inline-block;
    margin: 0 8px;
    animation: pulse 2s infinite;
}

/* 图表容器样式 */
.chart-container {
    width: 100%;
    margin: 25px 0;
    padding: 25px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 3px solid #4299e1;
}
.chart-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 18px;
    padding-left: 13px;
}
.chart-radar {
    width: 100%;
    height: 420px;
}
.chart-bar {
    width: 100%;
    height: 280px;
}

/* 结果描述 */
.result-desc {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 35px;
    color: #334155;
    font-size: 18px;
    line-height: 2.2;
    text-align: left;
    margin-bottom: 35px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;

    &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 6px;
        background: linear-gradient(180deg, #4299e1, #8a64e1);
        border-radius: 8px 0 0 8px;
    }
}

/* 结果提示 */
.result-tips {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 40px;
    text-align: center;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* 重新测试按钮 */
.restart-btn {
    background: linear-gradient(90deg, #4299e1, #8a64e1);
    border: none;
    border-radius: 16px;
    padding: 18px 48px;
    font-size: 18px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.2);

    &:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(66, 153, 225, 0.3);
        filter: brightness(1.05);
    }

    &:active {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(66, 153, 225, 0.25);
        filter: brightness(0.95);
    }
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式适配 - 重点适配图表 */
@media (max-width: 768px) {
    .test-container {
        max-width: 700px;
        padding: 35px 25px;
    }
    .mode-btn {
        min-width: 200px;
        padding: 32px 24px;
    }
    .mode-btn-num {
        font-size: 46px;
    }
    .mode-btn-label {
        font-size: 20px;
    }
    .chart-radar {
        height: 360px;
    }
    .chart-bar {
        height: 240px;
    }
    .test-header h1 {
        font-size: 28px;
    }
    .question-title {
        font-size: 18px;
    }
    .option-btn {
        padding: 18px 20px;
        font-size: 16px;
    }
    .result-card {
        padding: 30px 20px;
    }
    .type-text {
        font-size: 32px;
    }
    .result-desc {
        padding: 25px 20px;
        font-size: 17px;
        line-height: 2.0;
    }
    .restart-btn {
        padding: 16px 40px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .test-container {
        padding: 25px 15px;
        border-radius: 16px;
    }
    .mode-btn-group {
        flex-direction: column;
        align-items: center;
    }
    .mode-btn {
        min-width: 100%;
        padding: 28px 20px;
    }
    .mode-btn-num {
        font-size: 40px;
    }
    .mode-select-area h2 {
        font-size: 22px;
    }
    .chart-container {
        padding: 15px;
    }
    .chart-radar {
        height: 320px;
    }
    .chart-bar {
        height: 220px;
    }
    .test-header h1 {
        font-size: 24px;
    }
    .question-title {
        font-size: 17px;
        padding-left: 8px;
    }
    .option-btn {
        padding: 16px 18px;
        font-size: 15px;
        border-radius: 12px;
    }
    .prev-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    .type-text {
        font-size: 28px;
    }
    .result-desc {
        padding: 20px 15px;
        font-size: 16px;
    }
    .restart-btn {
        padding: 14px 32px;
        font-size: 16px;
        width: 100%;
