/* ============================================================
   量表频道通用标准样式表 (Evaluation Standard UI)
   提取自 t01.html，用于全站量表的统一视觉风格
   包含：资源卡片、维度卡片、计时器、交互动画及打印报告优化
   ============================================================ */

/* 针对 t01/t02 的个性化柔和调整 (可根据需求扩展至其他量表) */
/* 1. 所有的橙色标题与图标统一：温暖深橙 (#c2410c) */
body.quiz-t01 .score-legend li b,
body.quiz-t02 .score-legend li b,
body.quiz-t01 .text-orange,
body.quiz-t02 .text-orange,
body.quiz-t01 .text-orange *,
body.quiz-t02 .text-orange *,
body.quiz-t01 .quiz-card .text-dark,
body.quiz-t02 .quiz-card .text-dark,
body.quiz-t01 .info-section h4,
body.quiz-t02 .info-section h4,
body.quiz-t01 .small-title,
body.quiz-t02 .small-title,
body.quiz-t01 .small-title *,
body.quiz-t02 .small-title *,
body.quiz-t01 .quiz-card strong.text-orange,
body.quiz-t02 .quiz-card strong.text-orange,
body.quiz-t01 .quiz-card strong.text-orange *,
body.quiz-t02 .quiz-card strong.text-orange * {
    color: #c2410c !important;
}

/* 2. 纸袋先生的话 (外层框)：温暖浅橙 */
body.quiz-t01 .rule-box,
body.quiz-t02 .rule-box { 
    background-color: #fff7ed !important; 
    border: 1px solid #fed7aa !important; 
}

/* 3. 评分方式 (内层框)：纯白色 (实现明显的层次区分) */
body.quiz-t01 .rule-box .rule-box.bg-orange-light,
body.quiz-t02 .rule-box .rule-box.bg-orange-light { 
    background-color: #ffffff !important; 
    border: 1px solid #fff7ed !important;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.02) !important;
}

/* 4. 版本建议框 */
body.quiz-t01 .version-advice.bg-orange-light,
body.quiz-t02 .version-advice.bg-orange-light { 
    background-color: #fffbf0 !important; 
    border: 1px solid #fde68a !important; 
}

/* 5. 分析列表增强：维度标题根据维度类型显示不同颜色 */
.analysis-content strong:not([class*="text-"]) {
    color: #c2410c !important;
}

/* 维度药丸主题色 */
.dim-pill.pill-blue {
    color: #0369a1 !important;
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
}
.dim-pill.pill-orange {
    color: #c2410c !important;
    background: #fff7ed !important;
    border-color: #fed7aa !important;
}
.dim-pill.pill-purple {
    color: #6d28d9 !important;
    background: #f5f3ff !important;
    border-color: #ddd6fe !important;
}

/* 图表加载动画与容器 */
.chart-container {
    transition: all 0.5s ease;
}
.chart-wrapper-inner {
    position: relative;
    height: 400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chart-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    transition: opacity 0.4s ease;
}
.spinner-lg {
    width: 3rem;
    height: 3rem;
}
.img-interpret {
    max-width: 180px;
    position: sticky;
    top: 100px;
}
.share-watermark {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px dashed #e2e8f0;
    background-color: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 0.85rem;
}
.watermark-blue { color: #2563eb; font-weight: bold; }
.watermark-red { color: #ef4444; font-weight: bold; }
.watermark-url { color: #c2410c; font-family: monospace; }
.watermark-qr {
    width: 64px;
    height: 64px;
    background-color: #fff;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.watermark-qr img {
    width: 100%;
    height: 100%;
    display: block;
}

.print-footer-code {
    font-size: 10px;
    color: #ccc;
}

/* 辅助样式 */
.smaller { font-size: 0.85em !important; }
.extra-small { font-size: 0.75rem !important; }
.bg-orange-light { background-color: #fff7ed !important; }
.text-orange { color: #c2410c !important; }
.text-blue-dim { color: #0369a1 !important; }
.stat-card.dim-blue h5, .stat-card.dim-blue .stat-values b { color: #0369a1 !important; }
.text-purple-dim { color: #6d28d9 !important; }
.d-none-important { display: none !important; }

/* 答题复盘过滤样式 */
.review-item-normal.hidden-item {
    display: none !important;
}
.answer-review-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Toast 提示样式 */
.quiz-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
}
.quiz-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 测评说明在结果页的按需显示控制 */
.result-card + .info-section .intro-disclaimer-section {
    display: none !important;
}

/* 答题卡片深度优化 */
.quiz-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.quiz-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
}
.question-text {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
    transition: color 0.3s ease;
}
.quiz-card:hover .question-text {
    color: #c2410c !important;
}

/* 快捷键与小文字提示 */
.shortcut-tip-text {
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
    line-height: 1.2 !important;
}

/* 辅助功能小按钮 */
.btn-reset-sm {
    font-size: 0.8rem !important;
    opacity: 0.8 !important;
}

/* 答题复盘项文字 */
.review-ans-text {
    font-size: 0.85rem !important;
}

/* 进度条动态填充 */
.progress-fill-dynamic {
    transition: width 0.3s ease;
    width: var(--percent, 0%);
}

/* 默认图表容器 (fallback) */
.chart-container-fallback {
    position: relative;
    height: 380px;
    width: 100%;
}

/* 侧边解读图 (fallback) */
.img-interpret-fallback {
    top: 100px;
    max-width: 280px;
}

/* 测评中心变量 */
.channel-evaluation {
    --parents-primary: #f97316;
    --parents-primary-dark: #ea580c;
    --parents-primary-light: #fff7ed;
}

/* 已完成卡片 CTA 按钮文字 */
.portfolio-card.compact-card.is-completed .card-cta-btn::before {
    content: '查看结果';
}

/* 卡片分类色点 */
[data-category="adhd-p"] .card-accent-dot { background: #c2410c; }
[data-category="adhd-t"] .card-accent-dot { background: #ea580c; }
[data-category="emotion"] .card-accent-dot { background: #f97316; }
[data-category="adult"] .card-accent-dot { background: #fb923c; }
[data-category="parent-ref"] .card-accent-dot { background: #fdba74; }
[data-category="teacher-emp"] .card-accent-dot { background: #fed7aa; }

/* 按钮通用色值强制 (用于 t00 等页面) */
.btn-primary.btn-scale {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
    color: white !important;
}
.btn-outline-primary.btn-scale {
    color: #f97316 !important;
    border-color: #f97316 !important;
}
.btn-outline-primary.btn-scale:hover {
    background-color: #f97316 !important;
    color: white !important;
}

/* 点标记 (用于 t00 等列表页) */
.scale-section-title .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    background-color: var(--dot-bg, #f97316);
}

/* 侧边栏吸顶偏移 */
.sticky-sidebar-offset {
    top: 80px;
}

.chart-loader.fade-out {
    opacity: 0;
}
#resultChart {
    transition: opacity 0.8s ease;
    opacity: 0;
}
#resultChart.show {
    opacity: 1;
}

/* 答题复盘打印控制 */
@media print {
    .answer-review {
        display: none !important;
    }
    .answer-review.print-enabled {
        display: block !important;
        page-break-before: auto;
    }
    .answer-review-header .review-toggle-icon,
    .answer-review-header .print-option-wrap {
        display: none !important;
    }
    .answer-review .collapse {
        display: block !important;
        height: auto !important;
    }
}

/* 评分说明数字优化 (柔和化) */
.score-legend li b {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: var(--wb-green-dark, #17876a) !important; /* 恢复原色 */
    margin-bottom: 2px;
}

/* 图标按钮样式 */
.chart-save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    transition: all 0.2s;
    opacity: 0.6;
}
.chart-save-btn:hover {
    opacity: 1;
    background: #ffffff !important;
    color: #f97316 !important;
    border-color: #f97316 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 结果页横幅增强 */
.result-banner {
    text-align: center !important;
    padding: 1.5rem 1rem;
    background: rgba(255, 250, 240, 0.8); /* 温暖的杏仁色底色，比纯白更温和 */
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.15); /* 极细的琥珀色边框，增加精致感 */
}
.result-banner h2 {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Sans Pro", sans-serif;
    letter-spacing: 0.02em;
    color: #d97706 !important; /* 使用琥珀橙 (Amber 600)，比普通橙色更沉稳温暖 */
    opacity: 0.9;
    font-weight: 400 !important;
}
.result-banner p {
    color: #92400e !important; /* 棕褐色文字，与温暖橙色配套，避免深灰色带来的压迫感 */
    opacity: 0.7;
    letter-spacing: 0.01em;
}

/* 推荐卡片基础样式 */
.resource-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: rgba(249, 115, 22, 0.2) !important;
}
.resource-card.parent-card { border-top: 4px solid #f97316 !important; }
.resource-card.kid-card { border-top: 4px solid #10b981 !important; }
.resource-card.resource-accent-card { border-top: 4px solid #3b82f6 !important; }
.resource-card.help-card { border-top: 4px solid #6366f1 !important; }

/* 结果页维度卡片分色 */
.stat-card.dim-orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa !important;
}
.stat-card.dim-orange h5 { color: #c2410c !important; }
.stat-card.dim-orange .tag-sev { background: #f97316; color: #ffffff !important; }
.stat-card.dim-orange .tag-ok { background: #fdba74; color: #c2410c; }
.stat-card.dim-orange .stat-values b { color: #ea580c; }

.stat-card.dim-blue {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd !important;
}
.stat-card.dim-blue h5 { color: #0369a1 !important; }
.stat-card.dim-blue .tag-sev { background: #0ea5e9; color: #ffffff !important; }
.stat-card.dim-blue .tag-ok { background: #7dd3fc; color: #0369a1; }
.stat-card.dim-blue .stat-values b { color: #0ea5e9; }

.stat-card.dim-purple {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe !important;
}
.stat-card.dim-purple h5 { color: #6d28d9 !important; }
.stat-card.dim-purple .tag-sev { background: #8b5cf6; color: #ffffff !important; }
.stat-card.dim-purple .tag-ok { background: #c4b5fd; color: #6d28d9; }
.stat-card.dim-purple .stat-values b { color: #8b5cf6; }

.resource-card .btn-blue {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}
.resource-card .btn-blue:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.resource-card .btn-indigo {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}
.resource-card .btn-indigo:hover {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.resource-card .badge-public {
    font-size: 0.75rem;
    padding: 0.3em 0.8em;
    font-weight: normal;
    border-radius: 50px;
    letter-spacing: 0.5px;
}
.resource-card.parent-card .badge-public { background: #f97316 !important; color: #ffffff !important; }
.resource-card.kid-card .badge-public { background: #10b981 !important; color: #ffffff !important; }

.resource-card .card-img-circle {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 维度卡片评分项间距优化 (PC & 移动端通用) */
.stat-card .stat-values {
    display: flex;
    flex-direction: row; /* 恢复为单行显示 */
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
}
.stat-card .stat-values .v {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    padding: 10px 4px;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.stat-card .stat-values .v:hover {
    background: rgba(255, 255, 255, 0.7);
}
.stat-card .stat-values .v b {
    display: block;
    line-height: 1.1;
    font-size: 1.2rem; /* 从 1.25rem 进一步缩小 */
    font-weight: 500; /* 进一步降低粗度，从 600 降为 500 */
}
.stat-card .stat-values .v b small {
    font-size: 0.8rem !important;
    opacity: 0.6;
}
.stat-card .stat-values .v span {
    margin-left: 0 !important;
    margin-top: 4px;
    font-weight: 600;
    opacity: 0.8;
    font-size: 0.75rem; /* 稍稍缩小标签字号以适应一行 */
}

/* -------------------------------------------------------------------------
   移动端 Logo 视觉稳定性增强
   目的：彻底解决在测评页面做题切换时，Logo 随高度跳动而产生的“滑入滑出”跳动感。
   实现：在测评频道强制 Logo 静态化，禁用所有过渡动画和位移。
   ------------------------------------------------------------------------- */
.channel-evaluation .compact-logo-wrapper {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}
.channel-evaluation .compact-logo-flip-inner {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}
/* 确保松鼠图标在滚动后始终可见，且不执行任何旋转 */
.channel-evaluation.navbar-scrolled .navbar-toggler.start-flip .compact-logo-flip-inner {
    animation: none !important;
    transform: rotateY(180deg) !important;
}

/* 仅在移动端缩小版本建议和底部提示的字号，确保与 PC 端隔离 */
@media (max-width: 576px) {
    .version-advice p,
    .quiz-section .mt-5.pt-4.border-top p {
        font-size: 0.75rem !important;
    }
    .resource-card { padding: 1rem !important; }
    .resource-card h6 { font-size: 0.9rem !important; }
    .resource-card p { font-size: 0.7rem !important; }

    /* 核心症状分析文字精简与统一 */
    .rule-box h6 { 
        font-size: 1.1rem !important; /* 标题显著加大 */
        font-weight: 800 !important;
        margin-bottom: 15px !important;
        display: flex;
        align-items: center;
    }
    .rule-box .text-muted, 
    .rule-box .text-muted p, 
    .rule-box .text-muted strong, 
    .rule-box .text-muted span, 
    .rule-box .text-muted li,
    .analysis-item p { 
        font-size: 0.88rem !important; /* 正文统一调大至 14px 左右，确保清晰且一致 */
        line-height: 1.7 !important;
        color: #666 !important;
    }
    .rule-box .text-muted strong {
        color: #333 !important; /* 加粗部分仅改变颜色，不改变字号 */
    }
    .rule-box { padding: 15px !important; }

    /* 维度卡片移动端一行显示适配 */
    .stat-card {
        padding: 10px 4px !important; /* 移动端更紧凑的内边距 */
        min-height: 140px; /* 降低最小高度 */
    }
    .stat-card .stat-values {
        gap: 5px !important; /* 移动端单行显示的水平间距更小 */
        margin: 10px 0 !important;
        flex-wrap: nowrap !important; /* 强制单行显示，解决用户反馈的换行问题 */
    }
    .stat-card .stat-values .v {
        min-width: 0 !important; /* 允许压缩以在一行内显示 */
        flex: 1 1 50% !important;
    }
    .stat-card .stat-values .v {
        padding: 8px 2px !important;
        border-radius: 8px !important;
    }
    .stat-card h5 {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
        line-height: 1.2;
        font-weight: 800 !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* 答题复盘移动端优化 */
    .print-option-wrap {
        padding: 2px 8px !important;
        margin-right: 5px !important;
        font-size: 0.7rem !important;
    }
    .print-option-wrap input {
        margin-right: 4px !important;
        transform: scale(0.9);
    }
    .answer-review-header {
        padding: 10px 12px !important;
    }
    .answer-review-header h6 {
        font-size: 0.95rem !important;
    }

    /* 过滤器按钮移动端优化 */
    .filter-btn-group {
        width: 100%;
        margin-top: 5px;
    }
    .filter-btn-group .btn {
        flex: 1;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        font-size: 0.85rem !important;
    }

    .stat-card .stat-values .v b {
        font-size: 1rem !important; /* 移动端进一步缩小 */
        font-weight: 500 !important;
    }
    .stat-card .stat-values .v b small {
        font-size: 0.6rem !important;
        display: block;
        margin-top: -2px;
    }
    .stat-card .stat-values .v span {
        font-size: 0.65rem !important;
    }
    .stat-card .tag {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
    }
    .stat-card p.text-muted.extra-small {
        font-size: 0.6rem !important;
        transform: scale(0.85);
        transform-origin: center;
        white-space: nowrap;
        margin-top: 8px !important;
    }

    /* 缩小移动端操作按钮字号 */
    .actions .btn {
        font-size: 0.8rem !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    .actions .btn i {
        font-size: 0.9rem !important;
    }

    /* 缩小移动端雷达图上方的间距 */
    .rule-box.mb-4 { margin-bottom: 0.25rem !important; }
    .row.g-4.mb-4.align-items-center { 
        margin-top: -25px !important; 
        margin-bottom: 0.5rem !important;
    }
    .chart-container { 
        height: 280px !important; 
        margin-top: -10px !important;
    }

    .timer-tag {
        position: absolute !important;
        top: -36px !important;
        right: -8px !important;
        left: auto !important;
        margin: 0 !important;
        padding: 6px 15px 6px 12px !important;
        font-size: 0.85rem !important;
        border-radius: 50px 0 0 50px !important;
        z-index: 1000 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        color: #475569 !important;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.08) !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        transform: none;
    }
    .timer-tag.collapsed {
        transform: translateX(calc(100% - 38px)) !important;
    }
    .timer-tag.collapsed .timer-toggle-btn {
        transform: rotate(180deg);
    }
    .timer-tag.collapsed #quiz-timer,
    .timer-tag.collapsed .timer-icon {
        display: none !important;
    }
    /* 移动端结果页计时器样式优化 */
     .timer-tag.finished {
         top: -36px !important; 
         right: -8px !important;
         color: #10b981 !important;
         border: 1px solid rgba(16, 185, 129, 0.2) !important;
         transform: none !important;
     }
     .timer-tag.finished.collapsed {
         transform: translateX(calc(100% - 30px)) !important;
         opacity: 0.7 !important;
         padding-left: 10px !important;
     }
     .timer-tag.finished.collapsed i {
         margin-right: 0 !important;
     }

    /* 深度优化移动端资源卡片：精质灵动风格 */
    .rule-box.mt-4.no-print {
        padding-left: 6px !important; 
        padding-right: 6px !important;
    }
    .resource-card { 
        padding: 1rem 0.5rem 0.8rem !important; /* 减小顶部内边距，让内容向上移 */
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 240px; 
        border-radius: 16px !important;
        border: 1px solid #edf2f7 !important;
        background: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
        position: relative;
        overflow: hidden;
    }
    .resource-card.parent-card, 
    .resource-card.kid-card, 
    .resource-card.resource-accent-card, 
    .resource-card.help-card { border-top: 1px solid #edf2f7 !important; }

    .resource-card .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0px !important; /* 彻底消除 Flex 项目间的间距 */
    }
    /* 强化图标：显著变大并向上偏移 */
    .resource-card .flex-shrink-0 {
        display: block !important;
        order: -1 !important;
        margin-top: -8px; /* 向上平移更多 */
        margin-bottom: 12px; /* 继续增加与标题的间距 */
    }
    .resource-card .card-img-circle {
        display: block !important;
        width: 64px !important; /* 图标进一步加大至 64px */
        height: 64px !important;
        margin-bottom: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: flex !important; /* 确保内部图标居中 */
        align-items: center;
        justify-content: center;
    }
    .resource-card .card-img-circle i {
        font-size: 2rem !important; /* 增大图标字号 */
    }
    /* 解决角标遮挡：绝对定位并匹配卡片圆角 */
    .resource-card .badge-public {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        display: inline-block !important;
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
        margin: 0 !important;
        border-radius: 0 16px 0 12px !important; /* 右上圆角匹配卡片的 16px */
        background: #f97316 !important; /* 改为实色背景，避免顺色 */
        color: #ffffff !important; /* 白色文字增加对比度 */
        border: none !important;
        font-weight: normal !important;
        box-shadow: -1px 1px 6px rgba(0,0,0,0.15);
        z-index: 10;
    }
    /* 不同颜色卡片匹配不同标签色 */
    .resource-card.kid-card .badge-public { background: #10b981 !important; color: #ffffff !important; }

    .resource-card h6 { 
        font-size: 0.88rem !important; 
        font-weight: 800 !important;
        color: #2d3748 !important;
        margin-bottom: 0px !important; 
        line-height: 1.1;
        min-height: 1.2em; 
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .resource-card p {
        display: -webkit-box !important;
        -webkit-line-clamp: 3; 
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.75rem !important; /* 已调大至 12px，确保移动端可读性 */
        line-height: 1.4 !important;
        margin-top: -4px !important; /* 使用负间距让标题与文字进一步贴合 */
        margin-bottom: 8px !important;
        color: #718096 !important;
        min-height: 4.2em; 
    }
    .resource-card .btn-sm {
        font-size: 0.75rem !important;
        padding: 6px 0 !important;
        border-radius: 50px !important;
        width: 92% !important;
        margin-top: auto;
        font-weight: 700;
    }
}

/* ============================================================
 /* 测评结果分析项样式 - 极简单行版 */
.analysis-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    border: 1px solid #f1f5f9;
    margin-bottom: 6px !important;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.analysis-item:last-child {
    margin-bottom: 0 !important;
}
.analysis-item .bi {
    font-size: 0.9rem;
    margin-top: 3px;
    flex-shrink: 0;
}
.analysis-content {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    color: #64748b !important;
}
.analysis-content strong {
    font-weight: 700;
}

/* 测评说明与引导卡片 (Evaluation Instructions & Guide) */
   ============================================================ */
.info-section {
    padding-top: 3rem;
    margin-top: 3rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item h5.small-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.info-item ul li {
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
}

/* 测评记录入口卡片 - 完美边框与渐变方案 */
.record-link-card {
    background: linear-gradient(135deg, #fffaf5 0%, #ffffff 100%);
    border: 1.5px dashed #f97316 !important;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.05);
}

.record-link-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.record-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.12);
    border-style: solid !important;
    background: #fff7ed;
    border-color: #f97316 !important;
}

.record-link-icon {
    width: 52px;
    height: 52px;
    background: #f97316;
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.25);
}

.record-link-content {
    flex-grow: 1;
}

.record-link-content h6 {
    margin-bottom: 4px !important;
    color: #c2410c !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    border: none !important; /* 移除可能的标题下划线 */
}

.record-link-content p {
    margin-bottom: 0 !important;
    font-size: 0.88rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* 答题选项交互增强：轻微缩放与呼吸灯效果 */
.opt-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.opt-btn:hover {
    transform: scale(1.02);
    background-color: #fffaf5 !important;
    border-color: #f97316 !important;
}

.opt-btn:active {
    transform: scale(0.98);
}

.opt-btn.selected {
    animation: breathing 2.5s infinite ease-in-out;
    background-color: #f97316 !important;
    color: #ffffff !important;
    transform: scale(1.01);
}

@keyframes breathing {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50% { box-shadow: 0 0 15px 4px rgba(249, 115, 22, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
}

/* 选项数字微调 */
.opt-btn.selected .opt-num {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* 结果页操作按钮统一外观 */
.actions .btn {
    border-radius: 50px !important;
    font-weight: 500 !important; /* 调细字重，从 700 降为 500 */
    font-size: 0.95rem !important; /* 减小字号 */
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-width: 1px !important;
}

.actions .btn-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: none !important;
}

.actions .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
}

.actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05);
}

.actions .btn:active {
    transform: translateY(0);
}

.quiz-shell { 
    position: relative; 
    overflow: visible !important; /* 确保计时器不被裁剪 */
} 

/* 计时器标签样式 - PC端固定在屏幕右侧边缘 */
.timer-tag {
    position: fixed;
    top: 150px;
    right: 0;
    background: #ffffff;
    color: #475569;
    padding: 6px 15px 6px 12px;
    border-radius: 50px 0 0 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    display: none !important; /* 默认隐藏 */
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    min-width: fit-content !important;
}
/* 当显示时强制使用 flex */
.timer-tag[style*="display: flex"],
.timer-tag[style*="display: block"] {
    display: flex !important;
}
.timer-tag span {
    display: inline-flex !important;
    align-items: center;
    line-height: 1;
}
.timer-tag #quiz-timer {
    font-weight: 800;
    margin-left: 2px;
}
.timer-tag .timer-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #94a3b8;
}
.timer-tag:hover .timer-toggle-btn {
    color: #475569;
}
.timer-tag.collapsed {
    transform: translateX(calc(100% - 38px));
    padding-left: 10px;
    opacity: 0.8;
}
.timer-tag.collapsed .timer-toggle-btn {
    transform: rotate(180deg);
    color: #475569;
}
.timer-tag.collapsed #quiz-timer,
.timer-tag.collapsed .timer-icon {
    display: none !important;
}
.timer-tag.finished {
    background: #ffffff;
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: -2px 2px 12px rgba(16, 185, 129, 0.1);
}
.timer-tag.finished .timer-toggle-btn {
    display: none !important; /* 完成后不再需要收缩 */
}
.timer-tag.finished .timer-icon {
    color: #10b981;
}

.btn-toggle-intro {
    animation: playful-hint 5s infinite; /* 每隔5秒调皮一下，吸引家长注意 */
    transition: all 0.3s ease;
}

.btn-toggle-intro:hover {
    animation: gentle-pulse 1.5s infinite ease-in-out !important; /* 鼠标悬停时温和呼吸 */
    background-color: #f97316 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
    cursor: pointer;
}

.btn-toggle-intro i {
    display: inline-block;
    transition: transform 0.3s ease;
}
.btn-toggle-intro.collapsed i {
    transform: rotate(180deg);
}

.ghost-icon {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-toggle-intro:hover .ghost-icon {
    transform: scale(1.2) rotate(10deg);
    animation: ghost-float 2s infinite ease-in-out alternate;
}

/* 平时的调皮提示 */
@keyframes playful-hint {
    0%, 90%, 100% { transform: scale(1) rotate(0deg); }
    92% { transform: scale(1.1) rotate(3deg); }
    94% { transform: scale(0.9) rotate(-3deg); }
    96% { transform: scale(1.05) rotate(2deg); }
    98% { transform: scale(0.95) rotate(-1deg); }
}

/* 悬停时的温和呼吸动画 */
@keyframes gentle-pulse {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1.05); }
}

/* 鬼脸的温和漂浮动画 */
@keyframes ghost-float {
    from { transform: scale(1.2) rotate(10deg) translateY(0); }
    to { transform: scale(1.3) rotate(15deg) translateY(-3px); }
}

/* 调皮的展开收起动画 */
#introContent {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top;
    overflow: hidden;
    max-height: 5000px; /* 足够大的高度 */
    opacity: 1;
}
#introContent.hidden-content {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 答题详情复盘按钮美化 */
.answer-review {
    transition: all 0.3s ease;
}
.answer-review:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
}
.answer-review-header {
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}
.answer-review-header:hover {
    background-color: #fff7ed;
}
.answer-review-header:not(.collapsed):hover {
    background-color: #ffedd5;
}
.answer-review-header:active {
    transform: scale(0.995);
}
.review-toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #94a3b8;
    font-size: 1.2rem;
}
.answer-review-header:not(.collapsed) {
    background-color: #fff7ed;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.08);
    border: 1px solid #fed7aa !important;
}
.answer-review-header:not(.collapsed) .review-toggle-icon {
    transform: rotate(180deg);
    color: #c2410c !important;
}
.answer-review-header:not(.collapsed) h6 {
    color: #c2410c !important;
}
.answer-review-header:not(.collapsed) h6 i,
.answer-review-header:not(.collapsed) .header-icon-main {
    background-color: #ffedd5;
    color: #c2410c !important;
}

/* 答题复盘图标默认反白样式 */
.answer-review-header h6 i,
.answer-review-header .header-icon-main {
    background-color: #f97316;
    color: #ffffff !important;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 8px;
    font-size: 0.9rem;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* 打印开关样式 */
.print-option-wrap {
    display: flex;
    align-items: center;
    background: #fffaf5;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    color: #f97316;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 15px;
    border: 1px solid #fed7aa;
    user-select: none;
    pointer-events: auto; 
}
.print-option-wrap:hover {
    background: #fff7ed;
    border-color: #f97316;
}
.print-option-wrap input {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #f97316;
}

/* ============================================================
   打印/生成 PDF 专属优化样式
   ============================================================ */
@media print {
    /* 1. 隐藏非报告内容 */
    #header-placeholder, 
    #footer-placeholder, 
    .actions, 
    .btn-toggle-intro, 
    .shortcut-tip, 
    .breadcrumb,
    .page-header,
    .col-lg-4[data-include],
    .no-print,
    .warn-box,
    .rule-box:last-of-type,
    .row.g-3.mt-1,
    .review-toggle-icon,
    .print-option-wrap {
        display: none !important;
    }
    
    /* 默认隐藏复盘，除非勾选 */
    .answer-review:not(.print-enabled) {
        display: none !important;
    }

    /* 勾选后的打印样式 */
    .answer-review.print-enabled {
        display: block !important;
        border: 1px solid #eee !important;
        box-shadow: none !important;
        margin-top: 30px !important;
        page-break-before: auto;
    }
    .answer-review.print-enabled .collapse {
        display: block !important;
        height: auto !important;
    }
    .answer-review.print-enabled .answer-review-header {
        background: #f8f9fa !important;
        color: #000 !important;
        border-bottom: 2px solid #333 !important;
        padding: 10px 15px !important;
        pointer-events: none !important;
    }
    .answer-review.print-enabled .answer-review-header h6 {
        color: #000 !important;
        font-size: 1.1rem !important;
    }
    .answer-review.print-enabled .answer-review-header h6 i {
        background-color: #333 !important;
    }
    .answer-review.print-enabled .review-list {
        display: block !important;
    }
    .answer-review.print-enabled .answer-review-item {
        padding: 8px 0 !important;
        border-bottom: 1px solid #eee !important;
    }
    .answer-review.print-enabled .text-primary {
        color: #333 !important;
    }
    .answer-review.print-enabled .text-orange, 
    .answer-review.print-enabled .text-success {
        color: #000 !important;
        font-weight: bold !important;
    }

    /* 2. 布局重置 */
    body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
    .container { max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
    .quiz-section { padding: 0 !important; }
    .col-lg-8 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
    .quiz-shell { border: none !important; box-shadow: none !important; padding: 0 !important; }
    .quiz-card { border: none !important; box-shadow: none !important; padding: 0 !important; }

    /* 3. 打印专用块显示 */
    .print-only {
        display: block !important;
    }

    /* 4. 强制背景色打印 (Chrome/Safari) */
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* 5. 分页控制 */
    .stat-card, .rule-box, .chart-container { page-break-inside: avoid; }
    .result-banner { margin-top: 20px !important; background: #f8f9fa !important; border-radius: 10px; padding: 20px !important; }

    /* 6. 文字优化 */
    .text-orange { color: #f97316 !important; }
    .text-muted { color: #666 !important; }
    h2, h5, h6 { color: #000 !important; }
}

/* 移动端功能提示弹窗美化 */
.mobile-notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.mobile-notice-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-notice-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 320px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-notice-overlay.show .mobile-notice-card {
    transform: scale(1);
}

.notice-header {
    text-align: center;
    margin-bottom: 20px;
}

.notice-header i {
    font-size: 2.5rem;
    color: #f97316;
    margin-bottom: 12px;
    display: block;
}

.notice-header h5 {
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.notice-body {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.notice-body p {
    margin-bottom: 12px;
}

.notice-options {
    background: #fff7ed;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #fed7aa;
}

.notice-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.notice-opt:last-child {
    margin-bottom: 0;
}

.notice-opt i {
    color: #f97316;
    font-size: 1.1rem;
}

.notice-footer {
    margin-top: 24px;
}

/* 非打印状态隐藏打印专用块 */
.print-only {
    display: none;
}
