/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 免责声明 */
.disclaimer {
    background-color: #fff8e1;
    border-left: 5px solid #ffc107;
    padding: 15px 20px;
    margin: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.disclaimer i {
    color: #ff9800;
    margin-right: 10px;
}

/* 主要内容区域 */
.content-wrapper {
    display: flex;
    padding: 20px;
    gap: 30px;
}

@media (max-width: 900px) {
    .content-wrapper {
        flex-direction: column;
    }
}

/* 问卷区域 */
.questionnaire-section, .result-section {
    flex: 1;
    padding: 25px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.questionnaire-section h2, .result-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 问题区块 */
.section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9fafc;
    border-radius: 12px;
    border-left: 4px solid #4b6cb7;
}

.section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #4b6cb7;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
}

/* 问题样式 */
.question {
    margin-bottom: 25px;
}

.question label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #34495e;
    font-size: 1.05rem;
}

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

.option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option:hover {
    border-color: #a0c1ff;
    background-color: #f0f7ff;
}

.option input:checked + .option-text {
    font-weight: 600;
    color: #2c3e50;
}

.option input:checked ~ .option-text:before {
    content: "✓ ";
    color: #4CAF50;
    font-weight: bold;
}

.option input[type="radio"] {
    margin-right: 15px;
    margin-top: 3px;
}

.option-text {
    flex: 1;
    font-size: 1rem;
}

.option-score {
    font-size: 0.85rem;
    color: #7f8c8d;
    background-color: #f1f2f6;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 10px;
}

/* 失业率滑块 */
.unemployment-input {
    margin-top: 10px;
}

#unemploymentSlider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #4CAF50, #FFC107, #F44336);
    border-radius: 5px;
    outline: none;
    margin: 15px 0;
}

#unemploymentSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background-color: white;
    border: 3px solid #4b6cb7;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

#unemploymentValue {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 提交按钮 */
.submit-section {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(75, 108, 183, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.note {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 结果区域 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.back-btn {
    background-color: #f0f7ff;
    color: #4b6cb7;
    border: 2px solid #4b6cb7;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #4b6cb7;
    color: white;
}

/* 分数展示 */
.score-display {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    border-radius: 15px;
}

@media (max-width: 600px) {
    .score-display {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

.score-circle {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        #4CAF50 0% 35%,
        #FFC107 35% 70%,
        #F44336 70% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 50%;
}

.score-value {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    font-weight: 800;
    color: #2c3e50;
}

.score-label {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 600;
    color: #7f8c8d;
}

.risk-level {
    flex: 1;
}

.risk-level h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.risk-advice {
    font-size: 1.1rem;
    color: #5a6c7d;
    line-height: 1.5;
}

/* 分数详情 */
.score-details {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #f9fafc;
    border-radius: 15px;
}

.details-grid {
    margin: 20px 0;
}

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

.detail-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.detail-bar {
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b6cb7, #6a89cc);
    border-radius: 6px;
    transition: width 1s ease;
}

.detail-score {
    text-align: right;
    font-weight: 600;
    color: #4b6cb7;
}

.macro-adjustment {
    padding: 15px;
    background-color: #e8f4fd;
    border-radius: 10px;
    margin-top: 20px;
    color: #2c3e50;
}

/* AI分析 */
.ai-analysis {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e3eeff 100%);
    border-radius: 15px;
    border-left: 5px solid #4b6cb7;
}

.analysis-content {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    line-height: 1.6;
    margin: 20px 0;
    min-height: 120px;
    border: 1px solid #e0e0e0;
}

.ai-note {
    font-size: 0.9rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 行动建议 */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

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

.action-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #4CAF50;
}

.action-card:nth-child(2) {
    border-top-color: #FFC107;
}

.action-card:nth-child(3) {
    border-top-color: #F44336;
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.low-risk {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.medium-risk {
    background-color: #fff8e1;
    color: #FFC107;
}

.high-risk {
    background-color: #ffebee;
    color: #F44336;
}

.action-card h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.action-card ul {
    list-style: none;
    text-align: left;
    padding-left: 20px;
}

.action-card li {
    margin-bottom: 8px;
    color: #5a6c7d;
    position: relative;
}

.action-card li:before {
    content: "•";
    color: #4b6cb7;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 分享区域 */
.share-section {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin-top: 30px;
    color: #5a6c7d;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f0f0f0;
    border-top: 6px solid #4b6cb7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    margin-top: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.loading-sub {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px !important;
}

/* 风险颜色 */
.low-risk-color { color: #4CAF50; }
.medium-risk-color { color: #FFC107; }
.high-risk-color { color: #F44336; }