/* CSS变量定义 - 方便统一管理颜色和尺寸 */
:root {
    /* 主题颜色 */
    --primary-color: #24eccb;
    --secondary-color: #12e1e8;
    --accent-color: #e74c3c;
    --danger-color: #e91e63;
    --success-color: #8bc34a;
    --warning-color: #edc612;
    --purple-color: #c46ded;
    
    /* 文字颜色 */
    --text-primary: #34495e;
    --text-secondary: rgba(95, 95, 95, 0.9);
    
    /* 背景颜色 */
    --bg-primary: #ffffff;
    --bg-secondary: rgba(255, 255, 255, 0.4);
    --bg-tertiary: #f5f5f5;
    --bg-success: #f1f8e9;
    
    /* 尺寸 */
    --border-radius: 6px;
    --border-radius-large: 15px;
    --spacing-small: 8px;
    --spacing-medium: 15px;
    --spacing-large: 20px;
    --spacing-xl: 70px;
    
    /* 字体 */
    --font-family: 'Arial', sans-serif;
    --font-bold: bold;
    --font-medium: 500;
    
    /* 动画 */
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

/* 标题两边细线装饰样式 */
.transparent-text {
    padding: 0 var(--spacing-medium);
    position: relative;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.transparent-text::before,
.transparent-text::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    background-color: var(--secondary-color);
    transform: translateY(-50%);
}

.transparent-text::before {
    left: 0;
    width: 60px;
}

.transparent-text::after {
    right: 0;
    width: 60px;
}

/* 页面布局 */
.home-page {
    min-height: 100vh;
    position: relative;
}

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: linear-gradient(to bottom, #fbfffe, #84f5ff);
    z-index: -1;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-large);
    background-color: transparent;
    min-height: 100vh;
    border-radius: var(--border-radius-large);
}

/* 头部样式 */
header {
    margin-top: 14px;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-large);
}

/* 进度条样式 */
.progress-container {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-large);
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

#progress-text {
    width: 60px;
    text-align: left;
    font-weight: var(--font-bold);
    color: var(--primary-color);
    margin-right: var(--spacing-medium);
    font-size: 14px;
    flex-shrink: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
    border-radius: var(--border-radius);
    margin: 0;
    padding: 0;
    border: none;
    position: relative;
    z-index: 1;
}

/* 文本样式 */
.question-bold-left {
    font-weight: var(--font-bold);
    text-align: left;
    margin-bottom: var(--spacing-large);
}

.title-center {
    margin-bottom: var(--spacing-medium);
    text-align: center;
    font-size: 24px;
}

.highlight {
    font-size: 20px;
    font-weight: var(--font-bold);
    color: var(--accent-color);
    margin-bottom: var(--spacing-large);
    text-align: center;
}

.urgent {
    font-size: 18px;
    font-weight: var(--font-bold);
    color: var(--danger-color);
    text-align: center;
    margin-top: var(--spacing-large);
}

h3 {
    color: var(--text-primary);
    margin: var(--spacing-medium) 0 var(--spacing-small);
    text-align: center;
}

/* 渐变文本 */
.gradient-text {
    background: linear-gradient(90deg, var(--warning-color), var(--purple-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: var(--font-bold);
}

/* 列表样式 */
.feature-list,
.example-list,
.benefit-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: var(--spacing-large);
}

.feature-list li,
.example-list li,
.benefit-list li {
    margin-bottom: var(--spacing-small);
    padding: var(--spacing-small) var(--spacing-medium);
    border-radius: 5px;
    text-align: center;
}

.feature-list li,
.benefit-list li {
    background-color: var(--bg-secondary);
}

.example-list li {
    background-color: var(--bg-success);
    border-left: 4px solid var(--success-color);
    font-style: italic;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-medium);
    }
    
    .transparent-text::before,
    .transparent-text::after {
        width: 40px;
    }
    
    .title-center {
        font-size: 20px;
    }
    
    .highlight {
        font-size: 18px;
    }
    
    .urgent {
        font-size: 16px;
    }
}

/* 答案字母样式 */
.answer-letter {
    font-weight: bold;
    font-size: 18px;
}

/* 按钮容器样式 */
.response-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

/* 全局按钮样式 */
/* 新增：仅作用于 .special-a */
.btn-a {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid #12e1e8;
    color: #ffffff;
    background-color: #12e1e8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-a:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    scale: 1.05;
}

/* 居中按钮样式 */
.btn-center {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid #b8b8b8;
    color: #ffffff;
    background-color: hsl(0, 0%, 73%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-center:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    scale: 1.05;
}

/* 偏B按钮样式 */
.btn-b {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 0;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid #c46ded;
    color: #ffffff;
    background-color: #c790ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-b:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    scale: 1.05;
}

/* 移除不再需要的全局响应按钮样式 */
.response-btn {
    display: none;
}

/* 主要内容样式 */
main {
    margin-top: -40px;
    margin-bottom: 30px;
    background-image: none;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
    text-align: center;
}

p {
    margin-bottom: 15px;
    text-align: center;
}

/* 按钮样式 */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    padding: 12px 20px;
    background: linear-gradient(0deg, #6cfff5, #15eff3);
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 80px;
    cursor: pointer;
    font-size: 60px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(36, 236, 203, 0.3);
    height: 80px;
    width: 300px;
}

/* 开始测试按钮字体增大 */
.breathing-btn {
    font-size: 26px !important;
    background: linear-gradient(0deg, #ff7878, #ff697e);
    box-shadow: 0 4px 8px rgba(175, 23, 80, 0.3);
    height: 72px !important;
    width: 280px !important;
}

.btn:hover {
    background: linear-gradient(0deg, #1fede0, #0ad8db);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(36, 236, 203, 0.4);
}

/* 开始测试按钮悬停效果 */
.breathing-btn:hover {
    background: linear-gradient(0deg, #ff697e, #ff7878);
    box-shadow: 0 6px 12px rgba(175, 23, 80, 0.5);
}

.wide-btn {
    width: 330px;
    padding: 18px 20px;
    font-size: 30px;
    margin-top: 40px;
}

/* 宽按钮样式 */
.wide-btn {
    width: 330px; /* 与性别卡片等宽 (150*2 + 30间距) */
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 开始测试按钮呼吸效果 */
.breathing-btn {
    animation: breathe 2s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(175, 23, 80, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(175, 23, 80, 0.5);
    }
}

.wide-btn:hover {
    background-color: #24eccb;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    background-color: #24eccb;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 无背景按钮样式 */
.no-bg-btn {
    background-color: transparent;
    color: #24eccb;
    border: none;
    box-shadow: none;
    font-weight: bold;
}

/* 性别选择样式 */
.gender-cards {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 20px 0 40px;
}

.card-styled {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

.custom-card {
    width: 156px;
    height: 245px;
    padding: 0;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    box-shadow: none;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.male-card {
    background-image: url('../img/card-male.png');
}

.female-card {
    background-image: url('../img/card-female.png');
}

.custom-card:hover {
    border-color: #24eccb;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.intro-spacing {
    margin-top: 40px;
    padding: 20px;
    border-radius: 10px;
    background-color: transparent;
}

.card {
    color: white;
    text-shadow: none;
    width: 156px;
    height: 245px;
    padding: 0;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: transparent;
    position: relative;
}

.card p {
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    margin: 0;
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
}

.card:hover {
    border-color: #24eccb;
}

.card.selected {
    border: none;
    background-color: transparent;
    position: relative;
    box-shadow: none !important;
}

.card.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/selected-overlay.png');
    background-size: calc(100% - 6px);
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 1;
}

/* 全局图片圆角样式 */
img {
    border-radius: 10px;
    transition: border-radius 0.3s ease;
}

/* 特定图片类的圆角样式 */
.card img {
    width: 80px;
    height: 80px;
    margin: 20px auto 15px;
    display: block;
    border-radius: 15px;
}

.continuation-image img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 15px;
}

.result-image img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 15px;
}

.type-image img {
    max-width: 200px;
    height: auto;
    margin: 20px 0;
    border-radius: 20px;
}

/* 轮播图图片圆角 */
.carousel-item img {
    border-radius: 15px;
}

/* ID为type-img的图片圆角 */
#type-img {
    border-radius: 20px !important;
}

#question-number {
    color: #24eccb;
}

#question-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.answers-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.answer-side {
    width: 45%;
    padding: 15px;
    background-color: transparent;
    border-radius: 5px;
}

.divider {
    width: 2px;
    background-color: #ccc;
    margin: 0 10px;
}

/* 响应按钮样式 */
.response-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.response-btn {
    width: 120px;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.progress {
    height: 100%;
    background-color: #24eccb;
    width: 1%; /* 初始进度 */
    transition: width 0.5s;
    flex-grow: 1;
    margin-left: 10px;
}

#progress-text {
    font-weight: bold;
    white-space: nowrap;
    width: 60px;
    text-align: left;
}

/* 返回按钮样式 */
.back-btn {
    background-color: transparent;
    color: #24eccb;
    margin-top: 10px;
    box-shadow: none;
}

.back-btn:hover {
    background-color: #7f8c8d;
}

/* 继续测试页面样式 */
.continuation-section {
    text-align: center;
}

.continuation-image img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* 结果页面样式 */
.result-section {
    text-align: center;
}

.result-image img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* 报告页面样式 */
.report-header {
    text-align: center;
    margin-bottom: 30px;
}

.type-image img {
    max-width: 200px;
    height: auto;
    margin: 20px 0;
}

.report-tab {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: #eee;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: #24eccb;
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

#career-list {
    list-style-type: none;
    padding-left: 0;
}

#career-list li {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #eee;
    border-radius: 5px;
}

.report-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* 进度条脉动动画 */
@keyframes pulse {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); }
    100% { transform: scaleX(1); }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .gender-cards {
        flex-direction: row;
        justify-content: center;
        gap: 20px; /* 手机屏幕较小，减少间距 */
    }

    .custom-card {
        width: 120px; /* 手机屏幕较小，缩小卡片宽度 */
        height: 189px; /* 按比例缩小高度 */
    }

    /* 手机屏幕上AB答案并排显示 */
    .answers-container {
        flex-direction: row; /* 保持水平排列 */
        flex-wrap: nowrap;
        justify-content: space-between;
        /* 移除左右两边安全区，让答案区域最大化利用屏幕宽度 */
        padding: 0;
        box-sizing: border-box;
        width: 100%;
    }

    /* 调整每个答案区域宽度，让文字能够左右排满 */
    .answer-side {
        flex: 1;
        margin-bottom: 0;
        padding: 15px 0;
        /* 确保内容居中显示 */
        display: flex;
        justify-content: center;
        align-items: center;
        /* 确保内容占满整个区域 */
        min-height: 120px;
        box-sizing: border-box;
    }

    /* 分隔线保持垂直方向 */
    .divider {
        width: 1px;
        height: auto;
        background-color: #ccc;
        /* 大幅减小中间间隔，让AB答案更靠近 */
        margin: 0 -15px;
    }

    /* 设置答案文本样式，用字体排满而非拉开排满 */
    #answer-a {
        /* 移除字符宽度限制，让文字能够充分利用可用宽度 */
        max-width: 100%;
        width: 100%;
        /* 略微减小字体大小，让更多文字能够排在一行 */
        font-size: 14px;
        /* 移除多余的上下边距 */
        margin-bottom: 0;
        margin-top: 0;
        /* 文字居中对齐 */
        text-align: center;
        /* 确保内容换行不破坏单词 */
        word-wrap: break-word;
        /* 行高适中确保可读性 */
        line-height: 1.5;
        /* 确保这个样式优先于全局样式 */
        display: block;
        /* 允许文字正常换行 */
        white-space: normal;
        /* 调整字间距为更小的负值，让文字更加紧凑排满 */
        letter-spacing: -0.5px;
        /* 允许更多的文字排到一行 */
        overflow-wrap: break-word;
        word-break: break-word;
        /* 确保没有额外的空白 */
        padding: 0;
    }
    
    /* 设置B答案文本样式，用字体排满而非拉开排满 */
    #answer-b {
        /* 移除字符宽度限制，让文字能够充分利用可用宽度 */
        max-width: 100%;
        width: 100%;
        /* 略微减小字体大小，让更多文字能够排在一行 */
        font-size: 14px;
        /* 移除多余的上下边距 */
        margin-bottom: 0;
        margin-top: 0;
        /* 文字居中对齐 */
        text-align: center;
        /* 确保内容换行不破坏单词 */
        word-wrap: break-word;
        /* 行高适中确保可读性 */
        line-height: 1.5;
        /* 确保这个样式优先于全局样式 */
        display: block;
        /* 允许文字正常换行 */
        white-space: normal;
        /* 调整字间距为更小的负值，让文字更加紧凑排满 */
        letter-spacing: -0.5px;
        /* 允许更多的文字排到一行 */
        overflow-wrap: break-word;
        word-break: break-word;
        /* 确保没有额外的空白 */
        padding: 0;
    }

    .response-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 10px; /* 在手机屏幕上减小按钮间距 */
    }

    .report-tab {
        flex-direction: column;
        align-items: center;
    }

    .tab-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .report-actions {
        flex-direction: column;
        align-items: center;
    }
}