
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 0;
    margin: 0;
    background-image: url('../images/bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    background-attachment: fixed;
    font-size: 14px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
}

.sidebar {
    width: 300px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 25px;
    position: sticky;
    top: 20px;
    height: fit-content;
    margin-left: 30px;
    order: 2;
}

.main-content {
    flex: 1;
    min-width: 300px;
    max-width: 1000px;
    order: 1;
}
.header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #D8EBC0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #3a5a40;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 18px;
    color: #4a7c59;
    margin-bottom: 15px;
    font-weight: 500;
}

.welcome-box {
    background-color: #ffffff;
    border-left: 5px solid #A7C686;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* 题目样式 */
.question-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px dashed #e0e0e0;
}

.question-item:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

/* 单选按钮样式 */
.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    border: 2px solid transparent;
}

.option-label:hover {
    background-color: #f0f7e6;
}

.option-label.selected {
    background-color: #f0f7e6;
    border-color: #A7C686;
    color: #3a5a40;
    font-weight: 500;
}

.option-radio {
    margin-right: 10px;
    transform: scale(1.2);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: #A7C686;
    color: #3a5a40;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: #95b572;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.btn-secondary {
    background-color: #8cb369;
    color: white;
}

.btn-secondary:hover {
    background-color: #7a9f59;
}

.btn-line {
    background-color: #00c300;
    color: white;
    margin-top: 15px;
}

.btn-line:hover {
    background-color: #00a800;
}

/* 结果区域样式 */
.results-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: none;
}

.score-display {
    text-align: center;
    padding: 25px;
    background-color: #f0f7e6;
    border-radius: 10px;
    margin-bottom: 25px;
}

.total-score {
    font-size: 48px;
    font-weight: 700;
    color: #d84315;
    margin-bottom: 10px;
}

.cluster-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.cluster-item {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.cluster-title {
    font-weight: 600;
    color: #3a5a40;
    margin-bottom: 8px;
}

.cluster-score {
    font-size: 24px;
    font-weight: 700;
    color: #4a7c59;
}

.result-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.therapist-signature {
    text-align: center;
    font-style: italic;
    color: #555;
    margin: 25px 0;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* 侧边栏内容 */
.contact-info {
    margin-bottom: 15px;
}

.contact-info h3 {
    color: #3a5a40;
    /*! margin-bottom: 15px; */
    font-size: 18px;
}

.contact-details {
    font-size: 14px;
    line-height: 1.6;
}

.contact-details a {
    color: #8cb369;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.qrcode-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.qrcode-img {
    max-width: 180px;
    margin: 0 auto 10px;
}

.qrcode-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.disclaimer {
    font-size: 12px;
    color: #777;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-left: 0;
        margin-top: 30px;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .options-container {
        flex-direction: column;
    }
    
    .option-label {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .header, .question-container, .results-container {
        padding: 20px;
    }
    
    .total-score {
        font-size: 36px;
    }
    
    .cluster-scores {
        grid-template-columns: 1fr;
    }
}

/* 图片生成区域 */
.share-image-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#shareCanvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: none;
}

.loading {
    display: none;
    color: #A7C686;
    font-size: 16px;
    margin: 20px 0;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h2 {
    color: #3a5a40;
    font-size: 20px;
    margin-bottom: 10px;
}
.link{width: 150px;margin: 10px 0 0;}
.qrcode-container h4{margin-bottom: 10px;}
.tTitle{width: 100%;}
.score-card {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f0f7e6 0%, #e3f2e1 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(167, 198, 134, 0.2);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #A7C686, #8cb369);
}

.score-value {
    font-size: 56px;
    font-weight: 800;
    color: #d84315;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 18px;
    color: #3a5a40;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-message {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #A7C686;
}

.result-message p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.result-icon {
    font-size: 24px;
    color: #A7C686;
    margin-right: 10px;
    vertical-align: middle;
}

/* 隐藏问题板块的过渡动画 */
.question-container.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.back-to-assessment {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.score-display {
    display: none;
}

.total-score {
    display: none;
}

.result-text {
    display: none;
}
.cluster-analysis {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
}

.cluster-analysis h3 {
    color: #3a5a40;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.cluster-item-detail {
    margin-bottom: 15px;
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    border-left: 4px solid #A7C686;
    width: 47%;
    margin: 10px;
}

.cluster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cluster-name {
    font-weight: 600;
    color: #3a5a40;
    font-size: 16px;
}

.cluster-score {
    font-weight: 700;
    color: #d84315;
    font-size: 18px;
}

.cluster-questions {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.cluster-description {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
}

/* 新增：结果评分卡片样式 */
.score-card {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f0f7e6 0%, #e3f2e1 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(167, 198, 134, 0.2);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #A7C686, #8cb369);
}

.score-value {
    font-size: 56px;
    font-weight: 800;
    color: #d84315;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 18px;
    color: #3a5a40;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-message {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #A7C686;
}

.result-message p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.result-icon {
    font-size: 24px;
    color: #A7C686;
    margin-right: 10px;
    vertical-align: middle;
}

.question-container.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.back-to-assessment {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.error-message {
    background-color: rgb(184 217 199 / 0.2);
    color: #d32f2f;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #f44336;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
}

.error-message i {
    margin-right: 8px;
}

.option-label.error {
    border-color: #2374FF;
    background-color: rgb(184 217 199 / 0.2);
}

.option-label.error:hover {
    background-color: rgb(184 217 199 / 0.2);
}
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.alert-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: alertSlideIn 0.3s ease;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.alert-header i {
    color: #A7C686;
    font-size: 20px;
    margin-right: 10px;
}

.alert-title {
    font-weight: 600;
    color: #3a5a40;
    font-size: 16px;
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    color: #333;
}

.alert-body {
    padding: 25px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    max-height: 60vh;
    overflow-y: auto;
}

.alert-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.alert-btn {
    background-color: #A7C686;
    color: #3a5a40;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alert-btn:hover {
    background-color: #95b572;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* 分享图片样式 - 簇群标题 */
.share-image-cluster-title {
    font-size: 18px;
    font-weight: 600;
    color: #3a5a40;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #A7C686;
    text-align: center;
}

.share-image-cluster-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #A7C686;
    transition: all 0.3s ease;width: 46%;margin: 0 10px 20px;
}
.share-image-M{display: flex;flex-wrap: wrap;justify-content: center;}

.share-image-cluster-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(167, 198, 134, 0.15);
}

.share-image-cluster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.share-image-cluster-name {
    font-weight: 600;
    color: #3a5a40;
    font-size: 14px;
    flex: 1;
}

.share-image-cluster-score {
    font-weight: 700;
    color: #d84315;
    font-size: 14px;
    background-color: #f0f7e6;
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
}

.share-image-cluster-range {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.share-image-cluster-desc {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    background-color: #f8f9fa;
    padding: 8px 10px;
    border-radius: 6px;
}

/* 分享图片整体样式补充 */
.share-image-template {
    width: 800px;
    background-color: #f8f9fa;
    padding: 30px;
    font-family: 'Noto Sans SC', sans-serif;
    color: #333;
    line-height: 1.6;
}

.share-image-title {
    font-size: 24px;
    font-weight: 700;
    color: #3a5a40;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #A7C686;
}

.share-image-score {
    font-size: 72px;
    font-weight: 800;
    color: #d84315;
    text-align: center;
    margin: 20px 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.share-image-score-label {
    font-size: 18px;
    color: #3a5a40;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 500;
}

.share-image-result {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #A7C686;
}

.share-image-result p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.share-image-therapist {
    text-align: center;
    font-style: italic;
    color: #555;
    margin: 25px 0;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 16px;
}

.share-image-contact {
    text-align: center;
    color: #3a5a40;
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 500;
}

.share-image-qrcode {
    text-align: center;
    margin: 25px 0;
    padding: 15px;
}

.share-image-qrcode-text {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.share-image-disclaimer {
    font-size: 12px;
    color: #777;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #e0e0e0;
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 1220px) {
    .cluster-item-detail{width: 100%;}
}
    
@media (max-width: 768px) {
.cluster-item-detail{width: 100%;}
.alert-content {
    width: 95%;
}

.alert-body {
    padding: 20px 15px;
    font-size: 14px;
}
}
