:root {
    --primary-color: #FF9A76;
    --primary-light: #FFB99A;
    --primary-dark: #E87E5A;
    --secondary-color: #79B7B4;
    --secondary-light: #A6D4D2;
    --secondary-dark: #5A9895;
    --accent-color: #FFC288;
    --accent-light: #FFDBB3;
    --accent-dark: #E8A464;
    --completed-color: #FFB99A;  /* 已完成步骤颜色 */
    --background-color: #f4e4da;
    --card-color: #FFFFFF;
    --text-primary: #3D3B3C;
    --text-secondary: #6A6567;
    --text-tertiary: #968E90;
    --light-gray: #EADFDA;
    --border-radius: 16px;
    --shadow-light: 0 2px 10px rgba(231, 126, 90, 0.05);
    --shadow-medium: 0 5px 20px rgba(231, 126, 90, 0.08);
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 16px;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.domain-section h3 {
    margin: 0;
}

h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.container {
    background: #faf7f5;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.step {
    display: none;
    animation: fadeIn 0.5s;
}

.step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 10px;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-weight: 600;
    position: relative;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    font-size: 15px;
    border: 2px solid var(--light-gray);
}

.step-dot.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-light);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(255, 154, 118, 0.2);
}

.step-dot.completed {
    background-color: var(--completed-color);
    color: white;
    border-color: var(--primary-light);
}

.step-line {
    flex: 1;
    height: 3px;
    background-color: var(--light-gray);
    margin: 18px 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

.step-line.active {
    background-color: var(--completed-color);
    box-shadow: 0 1px 3px rgba(231, 126, 90, 0.3);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

button:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background-color: var(--light-gray);
    color: var(--text-secondary);
    width: 120px;
}

button.secondary:hover {
    background-color: #E0D5D0;
    color: var(--text-primary);
}

.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    width: 100%;
}

/* 新增 Primary Button 组件样式 */
.primary-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.primary-button {
    width: 200px;
    font-size: 18px;
    padding: 16px 32px;
}

.form-group {
    margin-bottom: 24px;
}

.score-range-group {
    margin-bottom: 20px;
}

.score-info {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 8px;
}

.score-label {
    grid-column: 1;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.score-description {
    grid-column: 2;
    color: var(--text-tertiary);
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
}

.current-score-tag {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: 8px;
    flex: 0 0 auto;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: var(--light-gray);
    outline: none;
    transition: var(--transition);
    position: relative;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(231, 126, 90, 0.3);
    border: 2px solid white;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.custom-slider {
    position: relative;
    width: 100%;
    height: 8px;
}

.slider-ticks {
    position: relative;
    width: 100%;
    height: 10px;
    pointer-events: none;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 理想满意度滑块样式 */
.ideal-slider {
    --current-value: 5; /* 默认当前满意度值 */
    --ideal-value: 5;   /* 默认理想满意度值 */
    position: relative;
}

/* 理想满意度滑块的背景区域 */
.ideal-slider input[type="range"] {
    background: linear-gradient(
        to right,
        rgba(150, 150, 150, 0.3) calc(var(--current-value) * 10%),
        rgba(255, 159, 64, 0.6) calc(var(--current-value) * 10%),
        rgba(255, 159, 64, 0.6) calc(var(--ideal-value) * 10%),
        var(--light-gray) calc(var(--ideal-value) * 10%)
    );
}

/* 滑块刻度点 */
.ideal-slider::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    top: 15px;
    left: calc(var(--current-value) * 10%);
    transform: translateX(-50%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 2;
    pointer-events: none;
}

.slider-tick {
    position: absolute;
    width: 1px;
    height: 8px;
    background-color: rgba(96, 96, 96, 0.2);
    pointer-events: none;
    top: 1px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 0 2px;
}

.details-toggle {
    display: inline-block;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background-color: var(--light-gray);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.details-toggle:hover {
    background-color: var(--primary-light);
    color: white;
}

.details-container {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    margin-top: 8px;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    min-height: 120px;
    resize: vertical;
    font-size: 16px;
    color: var(--text-secondary);
    background-color: white;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(255, 154, 118, 0.1);
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

.wheel-row {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.wheel-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
}

.wheel-legend {
    display: flex;
    justify-content: flex-start;  /* 改为左对齐 */
    flex-wrap: wrap;
    margin-top: 24px;
    gap: 20px;
    background-color: var(--background-color);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    width: fit-content;  /* 使容器宽度适应内容 */
    margin-left: auto;   /* 这两行使整个容器居中 */
    margin-right: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 4px;
}

canvas {
    max-width: 100%;
    filter: drop-shadow(0px 4px 15px rgba(231, 126, 90, 0.15));
}

.ai-recommendation {
    background: white;
    padding: 20px;
    margin-top: 32px;
    border-radius: var(--border-radius);
}

.ai-recommendation h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
}

#recommendationContent {
    text-align: justify;
}

#recommendationContent p {
    text-align: justify;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* 个性化反馈和AI建议的共享样式 */
.content-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
    display: block;
    visibility: visible;
}

.personalized-feedback,
.personalized-feedback-summary,
.ai-recommendation {
    /* 继承卡片容器的样式 */
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
}

.content-card h3,
.personalized-feedback h3,
.personalized-feedback-summary h3,
.ai-recommendation h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 20px;
}

.content-text,
.feedback-content,
.feedback-summary-content,
#recommendationContent {
    text-align: justify;
}

.content-text p,
.feedback-content p,
.feedback-summary-content p,
#recommendationContent p {
    margin-bottom: 12px;
    line-height: 1.6;
    padding: 8px 0;
    color: var(--text-primary);
}

.content-text strong,
.feedback-content p strong,
.feedback-summary-content p strong,
#recommendationContent p strong {
    color: var(--primary-dark);
    font-weight: 600;
}

#recommendationContent h4 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

#recommendationContent ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

#recommendationContent li {
    margin-bottom: 8px;
    text-align: justify;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f4f2f1;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--light-gray);
}

.tag:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}

ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-light);
    border-radius: 50%;
}

.domain-section {
    padding: 16px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 20px;
    transition: var(--transition);
}

.domain-section:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

hr {
    border: none;
    height: 1px;
    background-color: var(--light-gray);
    margin: 32px 0;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .step-indicator {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 20px;
        padding: 0 5px;
        gap: 5px;
    }
    
    .step-dot {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .step-line {
        width: 15px;
        height: 3px;
        margin: 13px 0 0 0;
    }
    
    .button-group {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }
    
    button {
        flex: 1;
        min-width: 0;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    button.secondary {
        width: auto;
        min-width: 0;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .score-info {
        flex-direction: row;
        flex-wrap: nowrap; /* 防止元素换行 */
        align-items: center;
        margin-bottom: 8px;
    }
    
    .score-label {
        margin-bottom: 0;
        margin-right: 4px;
        flex: 0 0 70px; /* 固定宽度 */
        font-size: 13px; /* 稍微减小字体 */
    }
    
    .score-description {
        text-align: center;
        margin-bottom: 0;
        flex: 1 1 auto; /* 可伸缩，占用剩余空间 */
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto; /* 水平居中 */
        font-size: 13px; /* 稍微减小字体 */
    }
    
    .current-score-tag {
        display: flex;
        align-items: center;
        margin-top: 0;
        margin-left: 4px;
        padding: 2px 4px;
        font-size: 11px; /* 减小字体 */
    }
}
