/* ============================================
   心力综合评估 v1.0.4 - Frontend Styles
   Natural Calm Palette: lake blue + grass green + sunset gold
   Report structure (v1.0.4):
    一、心力三维得分 + 总分
    二、九大场景热力图
    三、优劣势分析
    四、整体洞察
    五、发展建议
   ============================================ */

/* Reset & Base */
.xlpe-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e2d35;
    line-height: 1.6;
    box-sizing: border-box;
    background: #f4f1eb;
}

.xlpe-container *, .xlpe-container *::before, .xlpe-container *::after {
    box-sizing: border-box;
}

/* Card */
.xlpe-card {
    background: #fefcf9;
    border-radius: 16px;
    padding: 36px 28px;
    box-shadow: 0 4px 24px rgba(26,47,58,0.08), 0 1px 3px rgba(26,47,58,0.04);
}

.xlpe-card-center {
    text-align: center;
}

/* Typography */
.xlpe-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e2d35;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.xlpe-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px;
}

.xlpe-desc {
    font-size: 15px;
    color: #5a7a8a;
    margin: 0 0 28px;
    line-height: 1.9;
}

.xlpe-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0;
}

/* Form */
.xlpe-form-group {
    margin-bottom: 20px;
}

.xlpe-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.xlpe-form-group .required {
    color: #c8956c;
}

.xlpe-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #fefcf9;
    color: #1e2d35;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.xlpe-input:focus {
    border-color: #4a908a;
    box-shadow: 0 0 0 3px rgba(74,144,168,0.12);
    background: #fff;
}

.xlpe-input::placeholder {
    color: #94a3b8;
}

/* Select */
select.xlpe-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8a9a' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Radio group */
.xlpe-radio-group {
    display: flex;
    gap: 20px;
}

.xlpe-radio-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    font-weight: 400 !important;
}

.xlpe-radio-label input[type="radio"] {
    accent-color: #4a908a;
    width: 16px;
    height: 16px;
}

/* Buttons */
.xlpe-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.xlpe-btn-primary {
    background: #1a2f3a;
    color: #fff;
    border-color: #1a2f3a;
}

.xlpe-btn-primary:hover {
    background: #2d4a5e;
    border-color: #2d4a5e;
}

.xlpe-btn-success {
    background: #5b8c5a;
    color: #fff;
    border-color: #5b8c5a;
}

.xlpe-btn-success:hover {
    background: #4a7a4a;
}

.xlpe-btn-outline {
    background: #fefcf9;
    color: #374151;
    border-color: #d1d5db;
}

.xlpe-btn-outline:hover {
    background: #f4f1eb;
}

.xlpe-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Entry page - full-height centered layout */
#xlpe-phase-entry {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

#xlpe-phase-entry .xlpe-card {
    width: 100%;
    max-width: 560px;
}

.xlpe-entry-header {
    text-align: center;
    margin-bottom: 36px;
}

.xlpe-entry-form {
    margin-bottom: 28px;
}

.xlpe-entry-actions {
    text-align: center;
    margin: 28px 0 16px;
}

.xlpe-entry-actions .xlpe-btn {
    min-width: 200px;
    padding: 14px 36px;
    font-size: 16px;
}

.xlpe-entry-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 20px;
}

.xlpe-entry-message.error {
    background: #fef0eb;
    color: #c8956c;
    border: 1px solid #f0d0c8;
}

.xlpe-entry-message.success {
    background: #e8f0e8;
    color: #5b8c5a;
    border: 1px solid #c8e8c8;
}

.xlpe-entry-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e8e0d8;
}

.xlpe-qrcodes {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.xlpe-qrcode-item {
    text-align: center;
    max-width: 150px;
}

.xlpe-qrcode-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.xlpe-qr-text {
    font-size: 12px;
    color: #7a8a9a;
    margin: 8px 0 0;
    line-height: 1.5;
}

/* User info form */
.xlpe-user-info-form {
    text-align: left;
    padding: 8px 0;
}

.xlpe-user-info-form h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e2d35;
    margin: 0 0 4px;
    text-align: center;
}

.xlpe-submit-message {
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.xlpe-submit-error {
    background: #fef0eb;
    color: #c8956c;
    border-radius: 8px;
}

/* Quiz page */
.xlpe-quiz-header {
    background: #fefcf9;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(26,47,58,0.04);
    position: sticky;
    top: 0;
    z-index: 10;
}

.xlpe-quiz-progress-bar {
    height: 6px;
    background: #e8e0d8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.xlpe-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a908a, #5b8c5a);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.xlpe-quiz-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xlpe-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e2d35;
}

.xlpe-quiz-saving {
    font-size: 12px;
    color: #94a3b8;
}

.xlpe-quiz-body {
    background: #fefcf9;
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(26,47,58,0.04);
    min-height: 300px;
}

/* Question card */
.xlpe-question-card {
    animation: xlpe-fadeIn 0.3s ease;
}

@keyframes xlpe-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.xlpe-question-number {
    display: inline-block;
    background: #e8f0f4;
    color: #4a908a;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.xlpe-question-situation {
    background: #f4f1eb;
    border-left: 3px solid #4a908a;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #5a7a8a;
    border-radius: 0 8px 8px 0;
}

.xlpe-question-statement {
    font-size: 14px;
    font-weight: 600;
    color: #5a7a8a;
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Likert scale options */
.xlpe-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xlpe-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    color: #374151;
}

.xlpe-option:hover {
    border-color: #a0c8b8;
    background: #e8f0f4;
}

.xlpe-option.selected {
    border-color: #4a908a;
    background: #e8f0f4;
}

.xlpe-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}

.xlpe-option.selected .xlpe-option-radio {
    border-color: #4a908a;
    background: #4a908a;
}

.xlpe-option.selected .xlpe-option-radio::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.xlpe-option-label {
    font-weight: 600;
}

/* Quiz navigation */
.xlpe-quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fefcf9;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(26,47,58,0.04);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.xlpe-quiz-nav-center {
    display: none;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #5a7a8a;
    text-align: center;
    flex: 1;
}

.xlpe-quiz-nav-center .xlpe-nav-progress {
    font-weight: 700;
    color: #1e2d35;
    font-size: 14px;
}

.xlpe-question-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.xlpe-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.xlpe-dot.answered {
    background: #a0c8b8;
}

.xlpe-dot.active {
    background: #4a908a;
    transform: scale(1.3);
}

/* Submit area */
.xlpe-quiz-submit {
    background: #fefcf9;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 2px 8px rgba(26,47,58,0.04);
}

.xlpe-submit-hint {
    color: #7a8a9a;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

/* Loading */
.xlpe-loading {
    text-align: center;
    padding: 60px 20px;
}

.xlpe-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8e0d8;
    border-top-color: #4a908a;
    border-radius: 50%;
    animation: xlpe-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes xlpe-spin {
    to { transform: rotate(360deg); }
}

.xlpe-error-state {
    text-align: center;
    padding: 60px 20px;
    color: #c8956c;
}

/* ============================================
   Report Styles
   ============================================ */

.xlpe-report-header {
    text-align: center;
    padding: 40px 20px 24px;
    background: linear-gradient(135deg, #1a2f3a, #2d4a5e);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 24px;
}

.xlpe-report-header h1 {
    font-size: 26px;
    margin: 0 0 8px;
    color: #fff;
}

.xlpe-report-meta {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.xlpe-report-section {
    background: #fefcf9;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(26,47,58,0.04);
}

.xlpe-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e2d35;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e0d8;
}

/* Dimension Layout: Radar + Score side-by-side */
.xlpe-dim-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.xlpe-dim-chart-wrap {
    flex: 1 1 300px;
    max-width: 420px;
}

.xlpe-dim-score-wrap {
    flex: 0 0 auto;
    text-align: center;
    padding: 16px;
}

/* Score Circle */
.xlpe-score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2f3a, #2d4a5e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(26,47,58,0.25);
    margin: 0 auto 12px;
}

.xlpe-score-value {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
}

.xlpe-score-unit {
    font-size: 14px;
    opacity: 0.85;
}

.xlpe-score-level {
    font-size: 16px;
    font-weight: 700;
}

.xlpe-score-level .level-tag {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    margin-right: 8px;
}

.xlpe-score-level .level-desc {
    font-size: 13px;
    color: #5a7a8a;
    font-weight: 400;
}

/* Full level description (from backend level_desc template) */
.xlpe-score-level .level-full-desc {
    margin-top: 10px;
    font-size: 13px;
    color: #3a4a5a;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 16px;
}

/* 等级说明文字（总分下方） */
.xlpe-level-desc {
    margin-top: 12px;
    font-size: 14px;
    color: #3a4a5a;
    font-weight: 400;
    line-height: 1.8;
    text-align: center;
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 18px;
    background: #f4f1eb;
    border-radius: 8px;
    border: 1px solid #e8e0d8;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* Quality chart */

/* Quality descriptions merged (below polar chart) */
.xlpe-quality-desc-merged {
    margin-top: 20px;
    background: #f4f1eb;
    border-radius: 10px;
    padding: 20px 24px;
    border-left: 4px solid #4a908a;
}





.xlpe-quality-merged-item p strong {
    color: #4a908a;
}

/* ============================================
   Heatmap Grid (3x3 color-coded)
   ============================================ */
.xlpe-heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d1d5db;
}

.heatmap-header {
    display: flex;
    background: #e8e0d8;
}

.heatmap-corner {
    width: 80px;
    flex-shrink: 0;
    border-right: 1px solid #d1d5db;
}

.heatmap-col-header {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    border-right: 1px solid #d1d5db;
}

.heatmap-col-header:last-child {
    border-right: none;
}

.heatmap-row {
    display: flex;
    border-top: 1px solid #d1d5db;
}

.heatmap-row-header {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    background: #e8e0d8;
    border-right: 1px solid #d1d5db;
    line-height: 1.3;
}

.heatmap-row-header span {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}

.heatmap-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    text-align: center;
    border-right: 1px solid #d1d5db;
    min-height: 80px;
}

.heatmap-cell:last-child {
    border-right: none;
}

.heatmap-cell .heat-score {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.heatmap-cell .heat-name {
    font-size: 11px;
    margin-top: 4px;
}

.heat-green {
    background: #d4e8c8;
    color: #2d5a2d;
}

.heat-yellow {
    background: #f0e8d0;
    color: #6a5a2a;
}

.heat-red {
    background: #f0d0c8;
    color: #8a3a2a;
}

.heat-empty {
    background: #f4f1eb;
    color: #94a3b8;
}

/* Heatmap Legend */
.xlpe-heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #7a8a9a;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.legend-green { background: #d4e8c8; border: 1px solid #a0c8a0; }
.legend-yellow { background: #f0e8d0; border: 1px solid #d8c8a0; }
.legend-red { background: #f0d0c8; border: 1px solid #e0b0a0; }

/* Analysis sections */
.xlpe-analysis-box {
    margin-bottom: 20px;
}

.xlpe-analysis-box h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px;
}

.strength-box h3 { color: #5b8c5a; }
.weakness-box h3 { color: #c8956c; }

.xlpe-analysis-scenes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.xlpe-scene-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.xlpe-scene-badge.green {
    background: #d4e8c8;
    color: #2d5a2d;
}

.xlpe-scene-badge.yellow {
    background: #f0e8d0;
    color: #6a5a2a;
}

.xlpe-scene-badge.orange {
    background: #f0e0c8;
    color: #7a5a00;
}

/* SWOT description text */
.swot-desc {
    font-size: 13px;
    color: #5a7a8a;
    line-height: 1.8;
    margin-bottom: 8px;
    padding: 10px 14px;
    background: #f4f1eb;
    border-radius: 6px;
}

.strength-desc {
    border-left: 3px solid #5b8c5a;
}

.weakness-desc {
    border-left: 3px solid #c8956c;
}

/* 整体洞察（v1.3.14 重构） */
.xlpe-insight-merged-text {
    background: #e8f0f4;
    border-radius: 10px;
    padding: 20px 24px;
    border-left: 4px solid #4a908a;
    line-height: 1.9;
}

.xlpe-insight-merged-text p {
    font-size: 15px;
    color: #374151;
    line-height: 1.9;
    margin: 0 0 14px;
}

.xlpe-insight-merged-text p:last-child {
    margin-bottom: 0;
}

.xlpe-insight-merged-text strong {
    color: #4a908a;
}

.xlpe-insight-merged-text .metaphor-text {
    color: #6366f1;
    font-style: italic;
}

/* Force Type - FLAT layout (v1.3.13 - no nested card) */
.xlpe-force-type-section {
    margin: 16px 0;
    padding: 16px 20px;
    background: #f4f1eb;
    border-radius: 10px;
    border-left: 4px solid #4a908a;
    line-height: 1.8;
}

.xlpe-force-type-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.xlpe-type-category {
    display: inline-block;
    background: #4a908a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.xlpe-type-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e2d35;
}

.xlpe-force-type-body {
    font-size: 14px;
    color: #5a7a8a;
}

.xlpe-force-type-body > div {
    margin-bottom: 10px;
}

.xlpe-force-type-body > div:last-child {
    margin-bottom: 0;
}

.xlpe-force-type-body strong {
    color: #4a908a;
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}

.xlpe-force-type-body p {
    margin: 0;
    line-height: 1.8;
    color: #374151;
}

.xlpe-force-type-body .metaphor-text {
    color: #6366f1;
    font-style: italic;
}

/* 发展建议（v1.3.14 去除类型标签块） */
.xlpe-suggestion-card {
    background: #f4f1eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
    border-left: 4px solid #4a90a8;
}

.xlpe-suggestion-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #4a90a8;
}

.xlpe-suggestion-card p {
    font-size: 14px;
    color: #5a7a8a;
    line-height: 1.8;
    margin: 0;
}

/* Suggestion type badges */
.sug-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 6px;
}

.sug-scene { background: #f0e8d0; color: #6a5a2a; }
.sug-force-low { background: #f0d0c8; color: #8a3a2a; }
.sug-force-type { background: #e8e0f0; color: #5b21b6; }

/* Report footer */
.xlpe-report-footer {
    text-align: center;
    padding: 24px;
    background: #e8e0d8;
    border-radius: 12px;
    margin-top: 24px;
}

.xlpe-report-footer p {
    font-size: 13px;
    color: #7a8a9a;
    margin: 0 0 16px;
}

.xlpe-footer-qrcodes {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.xlpe-footer-qr {
    text-align: center;
    max-width: 140px;
}

.xlpe-footer-qr img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.xlpe-footer-qr span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.5;
}

.xlpe-report-actions {
    text-align: center;
    margin: 24px 0;
}

/* Invalid state */
.xlpe-invalid-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef0eb;
    color: #c8956c;
    font-size: 32px;
    font-weight: 800;
    line-height: 64px;
    margin: 0 auto 16px;
}

/* Force state sections (kept for backward compat) */
.xlpe-force-state-section {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f4f1eb;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}
.xlpe-force-state-section h4 {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 10px 0;
    font-weight: 600;
}
.xlpe-force-state-box {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    line-height: 1.8;
}
.xlpe-force-state-box:last-child { margin-bottom: 0; }
.force-high-box { background: #e8f0e8; border-left: 4px solid #5b8c5a; }
.force-high-box h5 { color: #5b8c5a; margin: 0 0 4px 0; font-size: 14px; }
.force-low-box { background: #fef0eb; border-left: 4px solid #c8956c; }
.force-low-box h5 { color: #c8956c; margin: 0 0 4px 0; font-size: 14px; }

/* ========== PDF生成遮罩 (v1.3.16) ========== */
.xlpe-pdf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.92);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.xlpe-pdf-overlay p {
    font-size: 16px;
    color: #5a7a8a;
    margin-top: 16px;
}

.xlpe-pdf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e8e0d8;
    border-top-color: #4a908a;
    border-radius: 50%;
    animation: xlpe-pdf-spin .8s linear infinite;
}

@keyframes xlpe-pdf-spin {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    body * { visibility: hidden; }
    .xlpe-report-content, .xlpe-report-content * { visibility: visible; }
    .xlpe-report-content { position: absolute; left: 0; top: 0; width: 100%; }
    .xlpe-container { max-width: 100%; padding: 0; background: #fff; }
    .xlpe-report-section, .xlpe-report-header { box-shadow: none; break-inside: avoid; }
    .xlpe-report-header { background: #1a2f3a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .xlpe-report-actions { display: none; }
    .heat-green { background: #d4e8c8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .heat-yellow { background: #f0e8d0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .heat-red { background: #f0d0c8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Responsive */
@media (max-width: 640px) {
    .xlpe-card { padding: 28px 18px; }
    .xlpe-title { font-size: 22px; }
    .xlpe-desc { font-size: 14px; }
    .xlpe-question-statement { font-size: 15px; }

    #xlpe-phase-entry .xlpe-card { max-width: 100%; }
    .xlpe-entry-actions .xlpe-btn { min-width: 160px; padding: 12px 28px; font-size: 15px; }

    .xlpe-score-circle { width: 120px; height: 120px; }
    .xlpe-score-value { font-size: 36px; }
    .xlpe-report-header h1 { font-size: 22px; }
    .xlpe-dim-chart-wrap { max-width: 100%; }
    .xlpe-level-desc { max-width: 100% !important; }

    .heatmap-row-header { width: 64px; font-size: 12px; }
    .heatmap-cell { padding: 12px 4px; min-height: 64px; }
    .heatmap-cell .heat-score { font-size: 18px; }
    .heatmap-cell .heat-name { font-size: 10px; }

    /* Mobile: show progress in nav center */
    .xlpe-quiz-nav-center { display: flex; }
    .xlpe-question-dots { display: none; }
    .xlpe-quiz-nav { justify-content: space-between; }
}

@media (max-width: 480px) {
    .xlpe-quiz-body { padding: 20px 16px; }
    .xlpe-option { padding: 12px 14px; font-size: 13px; }
    .xlpe-btn { padding: 10px 20px; font-size: 14px; }
}

/* 漏题高亮闪烁动画 */
@keyframes xlpe-flash-highlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 149, 108, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(200, 149, 108, 0); }
}

.xlpe-flash {
    animation: xlpe-flash-highlight 0.5s ease-in-out 3;
    border-radius: 12px;
}

/* ============================================
   报告开篇提示语 (v1.0.19)
   ============================================ */
.xlpe-report-preface {
    margin: 0 0 20px 0;
    padding: 0;
}
.xlpe-preface-inner {
    background: linear-gradient(135deg, #f9f5f0 0%, #f0ece4 100%);
    border-left: 4px solid #c8956c;
    border-radius: 8px;
    padding: 20px 24px;
    position: relative;
}
.xlpe-preface-inner::before {
    content: '✦';
    position: absolute;
    top: -1px;
    left: 16px;
    font-size: 10px;
    color: #c8956c;
    line-height: 1;
}
.xlpe-preface-title {
    font-size: 15px;
    font-weight: 700;
    color: #8b5c2e;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}
.xlpe-preface-body {
    font-size: 14px;
    color: #5a4535;
    line-height: 1.9;
    margin: 0;
}
