/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #7E57C2;
    --primary-blue: #5C6BC0;
    --primary-pink: #EC407A;
    --gradient-start: #E8EAF6;
    --gradient-end: #F3E5F5;
    --orange-red-start: #FF6B6B;
    --orange-red-end: #FF8E53;
    --warning-bg: #FFF9E6;
    --warning-border: #FFC107;
}

body {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin: 16px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
    background: linear-gradient(135deg, var(--orange-red-start) 0%, var(--orange-red-end) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-purple);
    color: white;
}

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

/* ==================== 首页样式 ==================== */
.header {
    text-align: center;
    padding: 40px 20px 20px;
}

.brain-icon {
    margin-bottom: 20px;
}

.gradient-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(126, 87, 194, 0.3);
}

.main-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 18px;
    color: #666;
    font-weight: 400;
}

/* 测试入口卡片 */
.test-entry-card {
    max-width: 500px;
    margin: 32px auto;
    text-align: center;
}

.card-icon {
    margin-bottom: 20px;
}

.gradient-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto;
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.test-info {
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.info-divider {
    color: #999;
}

.report-highlight {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-purple);
}

.features-list {
    text-align: left;
    margin: 24px 0;
}

.feature-item {
    font-size: 15px;
    color: #555;
    line-height: 2;
    padding-left: 8px;
}

/* 警告框 */
.warning-box {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-border);
    border-radius: 8px;
    padding: 20px;
    margin: 24px auto;
    max-width: 600px;
    display: flex;
    gap: 16px;
}

.warning-icon {
    font-size: 24px;
}

.warning-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.warning-content p {
    color: #666;
    line-height: 1.6;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.footer-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.footer-info {
    font-size: 14px;
    color: #aaa;
}

/* 悬浮按钮 */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--orange-red-start) 0%, var(--orange-red-end) 100%);
    color: white;
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ==================== 问卷页面样式 ==================== */
.progress-container {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-info {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.save-indicator {
    text-align: center;
    color: #4CAF50;
    font-size: 14px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 问题卡片 */
.question-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.question-card {
    margin-bottom: 30px;
}

.question-text {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.option-btn:hover {
    border-color: var(--primary-purple);
    background: rgba(126, 87, 194, 0.05);
}

.option-btn.selected {
    border-color: var(--primary-purple);
    background: linear-gradient(135deg, rgba(126, 87, 194, 0.1) 0%, rgba(92, 107, 192, 0.1) 100%);
    font-weight: 600;
}

.option-label {
    font-size: 18px;
    color: #333;
}

.option-score {
    font-size: 14px;
    color: #999;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 30px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--primary-purple);
}

.modal-content p {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ==================== 报告页面样式 ==================== */
.report-header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-header h1 {
    font-size: 32px;
    color: var(--primary-purple);
    margin-bottom: 12px;
}

.report-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.report-date {
    font-size: 14px;
    color: #999;
}

/* 总览区域 */
.overview-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.overview-card {
    text-align: center;
    margin-bottom: 24px;
}

.overview-card h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.total-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-purple);
    margin: 20px 0;
}

.score-number {
    font-size: 64px;
}

.score-max {
    font-size: 24px;
    color: #999;
}

.level-badge {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 20px;
    margin: 16px 0;
}

.level-text {
    font-size: 20px;
    font-weight: 600;
}

.level-desc {
    font-size: 16px;
    color: #666;
    margin-top: 12px;
}

/* 维度进度条 */
.dimensions-overview {
    margin-top: 24px;
}

.dimension-item {
    margin-bottom: 20px;
}

.dimension-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.score-badge {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.score-bar {
    width: 100%;
    height: 10px;
    background: #E0E0E0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
    transition: width 0.8s ease;
    border-radius: 5px;
}

/* 详细解读区域 */
.interpretations-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 24px;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
}

.dimension-card {
    margin-bottom: 24px;
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.dimension-header h3 {
    font-size: 22px;
    color: #333;
}

.interpretation-content {
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 15px;
}

.interpretation-content strong {
    color: #333;
    font-weight: 600;
}

.interpretation-content em {
    color: #666;
    font-style: italic;
}

/* 方案区域 */
.solutions-section {
    max-width: 900px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.solution-card {
    margin-bottom: 32px;
}

.solution-card h3 {
    font-size: 24px;
    color: var(--primary-purple);
    margin-bottom: 20px;
}

.solution-tabs {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    border-bottom: 2px solid #E0E0E0;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.tab-content {
    display: none;
    padding: 20px 0;
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 15px;
}

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

.tab-content strong {
    color: #333;
    font-weight: 600;
}

/* 加载动画 */
.loading-section {
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(126, 87, 194, 0.1);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #999;
}

/* 危机干预卡片 */
.crisis-card {
    background: #FFF5F5;
    border-left: 4px solid #EF4444;
    border-radius: 8px;
    padding: 20px;
    margin: 24px auto;
    max-width: 900px;
}

.crisis-card h3 {
    color: #DC2626;
    font-size: 20px;
    margin-bottom: 12px;
}

.crisis-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* 报告操作按钮 */
.report-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 40px 20px;
    flex-wrap: wrap;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .main-title {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .card {
        margin: 12px;
        padding: 20px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .option-btn {
        padding: 14px 16px;
    }
    
    .option-label {
        font-size: 16px;
    }
    
    .floating-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-buttons button {
        width: 100%;
    }
    
    .report-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .report-actions button {
        width: 100%;
    }
    
    .total-score {
        font-size: 36px;
    }
    
    .score-number {
        font-size: 48px;
    }
    
    .dimension-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 24px;
    }
    
    .card-title {
        font-size: 22px;
    }
    
    .info-row {
        font-size: 14px;
    }
    
    .report-highlight {
        font-size: 16px;
    }
    
    .feature-item {
        font-size: 14px;
    }
    
    .solution-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: left;
    }
    
    #radar-chart {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
}

/* 雷达图样式 */
#radar-chart {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
