/**
 * 小栈AI综合助手 V6 — AI 摘要卡片样式
 * 16种风格 × 6种皮肤 × 标签位置变体
 * 统一HTML结构，CSS控制一切
 */

/* ═══════════════════════════════════════════
   1. 基础容器
   ═══════════════════════════════════════════ */
.post-XZDAI {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--body-bg-color, var(--main-bg-color, #fff));
    border-radius: var(--main-radius, 8px);
    border: 1px solid var(--focus-color-opacity1, var(--style-border-always, #e5e7eb));
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════
   2. 标签栏 — 基础 + 位置变体
   ═══════════════════════════════════════════ */
.XZDAI-labels {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 上下位置（CSS order） */
.xzd-labels-v-top .XZDAI-labels    { order: -1; }
.xzd-labels-v-bottom .XZDAI-labels { order: 1; }

/* 左右排列 */
.xzd-labels-h-space-between .XZDAI-labels { justify-content: space-between; gap: 10px; }
.xzd-labels-h-center .XZDAI-labels    { justify-content: center; gap: 10px; }
.xzd-labels-h-flex-end .XZDAI-labels  { justify-content: flex-end; gap: 10px; }
.xzd-labels-h-flex-start .XZDAI-labels { justify-content: flex-start; gap: 10px; }

/* 标签文字 */
.XZDAI-label-text {
    font-size: 13px;
    font-weight: 500;
    color: #60a5fa;
}
.dark-theme .XZDAI-label-text,
body.dark .XZDAI-label-text {
    color: #93c5fd;
}

/* 标签badge */
.XZDAI-label-badge {
    font-size: 12px;
    color: #9ca3af;
    opacity: 0.7;
}
.dark-theme .XZDAI-label-badge,
body.dark .XZDAI-label-badge {
    color: #a1a2b8;
}

/* 分隔符 — 仅居中时显示 */
.XZDAI-label-divider {
    display: none;
    color: #9ca3af;
}
.xzd-labels-h-center .XZDAI-label-divider { display: inline; }
.dark-theme .XZDAI-label-divider {
    color: #6b7280;
}

/* ═══════════════════════════════════════════
   3. 摘要内容区
   ═══════════════════════════════════════════ */
.XZDAI-explanation {
    font-size: 15px;
    line-height: 1.6;
    color: var(--heo-fontcolor, var(--main-color, var(--font-color, #4e5358)));
}

/* ═══════════════════════════════════════════
   4. 打字机光标
   ═══════════════════════════════════════════ */
.blinking-cursor {
    background-color: var(--theme-color, var(--focus-color, #6366f1));
    width: 14px;
    height: 14px;
    border-radius: 16px;
    display: inline-block;
    vertical-align: middle;
    animation: xzd-blink 2s infinite;
    margin-left: 4px;
    margin-bottom: 3px;
    transform: scale(.6);
}
@keyframes xzd-blink {
    0%   { transform: scale(.6); }
    25%  { transform: scale(1);  }
    50%  { transform: scale(.6); }
    75%  { transform: scale(1);  }
    100% { transform: scale(.6); }
}

/* ═══════════════════════════════════════════
   5. 动效偏好
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .blinking-cursor,
    .xzd-style-neon::before,
    .xzd-style-aurora::before,
    .xzd-sa-shimmer,
    .xzd-style-floating.post-XZDAI {
        animation: none !important;
    }
    .blinking-cursor {
        opacity: 1;
        transform: scale(.6);
    }
}

/* ═══════════════════════════════════════════
   6. 移动端
   ═══════════════════════════════════════════ */
@media screen and (max-width: 768px) {
    .post-XZDAI {
        max-width: 100%;
        margin-left: 10px;
        margin-right: 10px;
    }
}

/* ═══════════════════════════════════════════
   7. 16种展示风格
   ═══════════════════════════════════════════ */

/* ---------- 0. 默认风格 ---------- */
.xzd-style-default.post-XZDAI {
    background: var(--body-bg-color, var(--main-bg-color, #fff));
    border-radius: var(--main-radius, 8px);
    border: 1px solid var(--focus-color-opacity1, var(--style-border-always, #e5e7eb));
    padding: 8px;
    gap: 8px;
}
.xzd-style-default .XZDAI-labels {
    padding: 0 12px;
}
.xzd-style-default .XZDAI-label-text {
    font-weight: bold;
    font-size: 15px;
    color: var(--theme-color, var(--focus-color, #6366f1));
}
.xzd-style-default .XZDAI-label-badge {
    font-size: 11px;
    background-color: var(--theme-color, var(--focus-color, #6366f1));
    color: #fff;
    border-radius: var(--main-radius, 8px);
    padding: 6px 8px;
    opacity: 1;
    box-shadow: var(--main-shadow, 0 1px 3px rgba(0,0,0,.08));
    letter-spacing: 1px;
    cursor: pointer;
    transition: .3s;
}
.xzd-style-default .XZDAI-label-badge:hover { opacity: .8; }
.xzd-style-default .XZDAI-explanation {
    padding: 8px 12px;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px);
    border: 1px solid var(--focus-color-opacity1, var(--style-border-always, #e5e7eb));
}
/* 默认暗色 */
body.dark .xzd-style-default.post-XZDAI,
.dark-theme .xzd-style-default.post-XZDAI {
    background: #1a1a22;
    border-color: #333340;
}
body.dark .xzd-style-default .XZDAI-explanation,
.dark-theme .xzd-style-default .XZDAI-explanation {
    background: #22222e;
    border-color: #353545;
    color: #d1d5db;
}

/* ---------- 1. 毛玻璃 ---------- */
.xzd-style-glass.post-XZDAI {
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.4);
    padding: 20px;
    gap: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.xzd-style-glass .XZDAI-explanation {
    background: transparent;
    border: none;
    font-size: 14px;
    line-height: 1.8;
}
.dark-theme .xzd-style-glass.post-XZDAI,
body.dark .xzd-style-glass.post-XZDAI {
    background: rgba(30,30,36,.6);
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
}

/* ---------- 2. 霓虹边框 ---------- */
.xzd-style-neon.post-XZDAI {
    position: relative;
    background: var(--body-bg-color, #fafbff);
    border-radius: 16px;
    padding: 20px;
    gap: 12px;
    border: none;
    overflow: hidden;
}
.dark-theme .xzd-style-neon.post-XZDAI,
body.dark .xzd-style-neon.post-XZDAI {
    background: #0f0f1a;
}
.xzd-style-neon.post-XZDAI::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--theme-color, #6366f1), #ec4899, #f59e0b, var(--theme-color, #6366f1));
    background-size: 300% 300%;
    animation: xzd-neon 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
@keyframes xzd-neon {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}
.xzd-style-neon .XZDAI-labels { position: relative; z-index: 1; }
.xzd-style-neon .XZDAI-label-text { color: var(--theme-color, #4f46e5); }
body.dark .xzd-style-neon .XZDAI-label-text,
.dark-theme .xzd-style-neon .XZDAI-label-text { color: #c4b5fd; }
.xzd-style-neon .XZDAI-explanation {
    background: transparent;
    border: none;
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 1.8;
}

/* ---------- 3. 极简纸片 ---------- */
.xzd-style-minimal.post-XZDAI {
    border: none;
    border-left: 3px solid var(--theme-color, #6366f1);
    padding: 16px 20px;
    gap: 8px;
    background: transparent;
    box-shadow: none;
}
.xzd-style-minimal .XZDAI-label-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted-3-color, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.xzd-style-minimal .XZDAI-explanation {
    padding: 0;
    background: transparent;
    border: none;
    font-size: 15px;
    line-height: 1.9;
}
.xzd-style-minimal .XZDAI-label-badge {
    font-size: 10px;
    padding: 3px 8px;
}
body.dark .xzd-style-minimal.post-XZDAI,
.dark-theme .xzd-style-minimal.post-XZDAI {
    border-left-color: var(--theme-color, #818cf8);
    background: transparent;
}
body.dark .xzd-style-minimal .XZDAI-label-text,
.dark-theme .xzd-style-minimal .XZDAI-label-text { color: #9ca3af; }
body.dark .xzd-style-minimal .XZDAI-explanation,
.dark-theme .xzd-style-minimal .XZDAI-explanation { color: #d1d5db; }

/* ---------- 4. 终端科技 ---------- */
.xzd-style-terminal.post-XZDAI {
    background: #0d1117;
    border-radius: 10px;
    border: 1px solid #21262d;
    padding: 16px;
    gap: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
body:not(.dark-theme):not(.dark) .xzd-style-terminal.post-XZDAI {
    background: #f6f8fa;
    border-color: #d0d7de;
}
.xzd-style-terminal .xzd-st-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid #21262d;
    margin-bottom: 4px;
}
body:not(.dark-theme):not(.dark) .xzd-style-terminal .xzd-st-bar { border-color: #d0d7de; }
.xzd-style-terminal .xzd-st-dot { width: 10px; height: 10px; border-radius: 50%; }
.xzd-style-terminal .xzd-st-dot.r { background: #ff5f57; }
.xzd-style-terminal .xzd-st-dot.y { background: #febc2e; }
.xzd-style-terminal .xzd-st-dot.g { background: #28c840; }
.xzd-style-terminal .xzd-st-title { font-size: 11px; color: #8b949e; margin-left: 8px; }
body:not(.dark-theme):not(.dark) .xzd-style-terminal .xzd-st-title { color: #57606a; }
.xzd-style-terminal .XZDAI-label-text { color: #58a6ff; font-size: 13px; }
body:not(.dark-theme):not(.dark) .xzd-style-terminal .XZDAI-label-text { color: #0969da; }
.xzd-style-terminal .XZDAI-explanation {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #c9d1d9;
}
body:not(.dark-theme):not(.dark) .xzd-style-terminal .XZDAI-explanation { color: #24292f; }
.xzd-style-terminal .XZDAI-label-badge {
    background: #21262d;
    color: #58a6ff;
    border-radius: 4px;
    font-size: 11px;
    opacity: 1;
    padding: 3px 8px;
}
body:not(.dark-theme):not(.dark) .xzd-style-terminal .XZDAI-label-badge {
    background: #ddf4ff;
    color: #0969da;
}

/* ---------- 5. 温暖亲和 ---------- */
.xzd-style-warm.post-XZDAI {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border-radius: 16px;
    padding: 20px;
    gap: 12px;
    border: none;
    box-shadow: none;
}
.dark-theme .xzd-style-warm.post-XZDAI,
body.dark .xzd-style-warm.post-XZDAI {
    background: linear-gradient(135deg, #292524, #1c1917);
}
.xzd-style-warm .XZDAI-label-text { color: #92400e; font-weight: 700; }
.dark-theme .xzd-style-warm .XZDAI-label-text,
body.dark .xzd-style-warm .XZDAI-label-text { color: #fbbf24; }
.xzd-style-warm .XZDAI-explanation {
    background: transparent;
    border: none;
    font-size: 14px;
    line-height: 1.8;
    color: #78350f;
}
.dark-theme .xzd-style-warm .XZDAI-explanation,
body.dark .xzd-style-warm .XZDAI-explanation { color: #d6d3d1; }
.xzd-style-warm .XZDAI-label-badge {
    background: rgba(245,158,11,.15);
    color: #b45309;
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 1;
}
.dark-theme .xzd-style-warm .XZDAI-label-badge,
body.dark .xzd-style-warm .XZDAI-label-badge {
    background: rgba(251,191,36,.1);
    color: #fbbf24;
}

/* ---------- 6. 新拟态 ---------- */
.xzd-style-neumorph.post-XZDAI {
    background: var(--body-bg-color, #e0e5ec);
    border-radius: 20px;
    padding: 24px;
    gap: 14px;
    border: none;
    box-shadow: 8px 8px 16px rgba(0,0,0,.08), -8px -8px 16px rgba(255,255,255,.9);
}
.dark-theme .xzd-style-neumorph.post-XZDAI,
body.dark .xzd-style-neumorph.post-XZDAI {
    background: #1a1a2e;
    box-shadow: 8px 8px 16px #0f0f1a, -8px -8px 16px #252542;
}
.xzd-style-neumorph .XZDAI-explanation {
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--body-bg-color, #e0e5ec);
    border: none;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,.08), inset -3px -3px 6px rgba(255,255,255,.9);
    font-size: 14px;
    line-height: 1.8;
}
.dark-theme .xzd-style-neumorph .XZDAI-explanation,
body.dark .xzd-style-neumorph .XZDAI-explanation {
    background: #1a1a2e;
    box-shadow: inset 3px 3px 6px #0f0f1a, inset -3px -3px 6px #252542;
}

/* ---------- 7. 杂志排版 ---------- */
.xzd-style-editorial.post-XZDAI {
    background: var(--main-bg-color, #fff);
    border: none;
    padding: 0;
    gap: 0;
    box-shadow: none;
}
.dark-theme .xzd-style-editorial.post-XZDAI,
body.dark .xzd-style-editorial.post-XZDAI {
    background: var(--main-bg-color, #111);
}
.xzd-style-editorial .xzd-se-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-bottom: 2px solid var(--main-color, #1d1d1f);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.dark-theme .xzd-style-editorial .xzd-se-header,
body.dark .xzd-style-editorial .xzd-se-header {
    border-color: var(--main-color, #e5e5e7);
}
.xzd-style-editorial .xzd-se-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--theme-color, #e11d48);
    padding: 3px 8px;
}
.xzd-style-editorial .xzd-se-line {
    flex: 1;
    height: 1px;
    background: var(--focus-color-opacity1, #d1d5db);
}
.xzd-style-editorial .XZDAI-labels {
    border-bottom: 2px solid var(--main-color, #1d1d1f);
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.dark-theme .xzd-style-editorial .XZDAI-labels,
body.dark .xzd-style-editorial .XZDAI-labels {
    border-color: var(--main-color, #e5e5e7);
}
.xzd-style-editorial .XZDAI-explanation {
    padding: 0;
    background: transparent;
    border: none;
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 16px;
    column-count: 2;
    column-gap: 28px;
    column-rule: 1px solid var(--focus-color-opacity1, #e5e7eb);
}
.dark-theme .xzd-style-editorial .XZDAI-explanation,
body.dark .xzd-style-editorial .XZDAI-explanation {
    column-rule-color: var(--focus-color-opacity1, #374151);
}
@media (max-width: 600px) {
    .xzd-style-editorial .XZDAI-explanation { column-count: 1; }
}

/* ---------- 8. 聊天气泡 ---------- */
.xzd-style-chat.post-XZDAI {
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 0;
    padding: 0;
}
.xzd-style-chat .XZDAI-explanation {
    max-width: 88%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
    background: var(--main-bg-color, #f3f4f6);
    color: var(--main-color, #1f2937);
    border-radius: 4px 16px 16px 16px;
    border: none;
}
.dark-theme .xzd-style-chat .XZDAI-explanation,
body.dark .xzd-style-chat .XZDAI-explanation {
    background: #1e1e2e;
    color: #c7c7cc;
}

/* ---------- 9. 像素复古 ---------- */
.xzd-style-pixel.post-XZDAI {
    background: #1a1c2c;
    border-radius: 0;
    border: 4px solid #566c86;
    padding: 20px;
    gap: 12px;
    font-family: 'Courier New', Consolas, monospace;
}
body:not(.dark-theme):not(.dark) .xzd-style-pixel.post-XZDAI {
    background: #f4f4f8;
}
.xzd-style-pixel .XZDAI-labels {
    padding: 8px 12px;
    background: #333c57;
}
body:not(.dark-theme):not(.dark) .xzd-style-pixel .XZDAI-labels {
    background: #d4d8e0;
}
.xzd-style-pixel .XZDAI-label-text {
    color: #a7f070;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
body:not(.dark-theme):not(.dark) .xzd-style-pixel .XZDAI-label-text { color: #3b5dc9; }
.xzd-style-pixel .XZDAI-explanation {
    padding: 12px;
    background: #262b44;
    font-size: 13px;
    line-height: 1.8;
    color: #c2c3c7;
    border: 2px solid #333c57;
}
body:not(.dark-theme):not(.dark) .xzd-style-pixel .XZDAI-explanation {
    background: #fff;
    color: #4a4a5a;
    border-color: #c0c4cc;
}
.xzd-style-pixel .XZDAI-label-badge {
    background: #333c57;
    color: #a7f070;
    border: 2px solid #566c86;
    border-radius: 0;
    font-size: 11px;
    opacity: 1;
    padding: 3px 8px;
}
body:not(.dark-theme):not(.dark) .xzd-style-pixel .XZDAI-label-badge {
    background: #d4d8e0;
    color: #3b5dc9;
    border-color: #b0b4bc;
}

/* ---------- 10. 便签纸 ---------- */
.xzd-style-sticky.post-XZDAI {
    background: #fff9c4;
    border-radius: 2px;
    padding: 24px 20px 20px;
    gap: 10px;
    position: relative;
    box-shadow: 2px 3px 8px rgba(0,0,0,.12);
    transform: rotate(-0.5deg);
    border: none;
}
.dark-theme .xzd-style-sticky.post-XZDAI,
body.dark .xzd-style-sticky.post-XZDAI {
    background: #374151;
    box-shadow: 2px 3px 12px rgba(0,0,0,.3);
}
.xzd-style-sticky.post-XZDAI::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ef4444 0%, #ef4444 20%, #f59e0b 20%, #f59e0b 40%, #22c55e 40%, #22c55e 60%, #3b82f6 60%, #3b82f6 80%, #a855f7 80%, #a855f7 100%);
    border-radius: 2px 2px 0 0;
}
.xzd-style-sticky .xzd-ss-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #f87171, #dc2626);
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
    z-index: 1;
}
.xzd-style-sticky .XZDAI-label-text { color: #92400e; font-size: 14px; }
.dark-theme .xzd-style-sticky .XZDAI-label-text,
body.dark .xzd-style-sticky .XZDAI-label-text { color: #fbbf24; }
.xzd-style-sticky .XZDAI-explanation {
    padding: 0 0 10px;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #d4a853;
    font-size: 14px;
    line-height: 1.8;
    color: #78350f;
}
.dark-theme .xzd-style-sticky .XZDAI-explanation,
body.dark .xzd-style-sticky .XZDAI-explanation {
    color: #d1d5db;
    border-color: #4b5563;
}

/* ---------- 11. 渐变流光 ---------- */
.xzd-style-aurora.post-XZDAI {
    position: relative;
    background: var(--body-bg-color, #fafbff);
    border-radius: 16px;
    padding: 20px;
    gap: 14px;
    border: 1px solid rgba(139,92,246,.15);
    overflow: hidden;
}
.dark-theme .xzd-style-aurora.post-XZDAI,
body.dark .xzd-style-aurora.post-XZDAI {
    background: #0f172a;
    border-color: rgba(139,92,246,.2);
}
.xzd-style-aurora.post-XZDAI::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(139,92,246,.12), transparent, rgba(59,130,246,.12), transparent);
    animation: xzd-aurora 8s linear infinite;
    pointer-events: none;
}
@keyframes xzd-aurora { 100% { transform: rotate(360deg); } }
.xzd-style-aurora .XZDAI-labels { position: relative; z-index: 1; }
.xzd-style-aurora .XZDAI-label-text { color: var(--theme-color, #6d28d9); }
.dark-theme .xzd-style-aurora .XZDAI-label-text,
body.dark .xzd-style-aurora .XZDAI-label-text { color: #c4b5fd; }
.xzd-style-aurora .XZDAI-explanation {
    padding: 14px 16px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,.8);
    font-size: 14px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}
.dark-theme .xzd-style-aurora .XZDAI-explanation,
body.dark .xzd-style-aurora .XZDAI-explanation {
    background: rgba(255,255,255,.04);
    color: #94a3b8;
}
.xzd-style-aurora .xzd-sa-shimmer {
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--theme-color, #8b5cf6), #3b82f6, #06b6d4, var(--theme-color, #8b5cf6));
    background-size: 300% 100%;
    animation: xzd-shimmer 3s ease infinite;
    position: relative;
    z-index: 1;
}
@keyframes xzd-shimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ---------- 12. 梦幻流光 ---------- */
.xzd-style-menghuan.post-XZDAI {
    --ph-mask: rgba(255,255,255,.85);
    --ph-theme: #0883b7;
    padding-bottom: 16px;
    background: var(--ph-mask);
    border: none;
    overflow: hidden;
    position: relative;
}
.dark-theme .xzd-style-menghuan.post-XZDAI,
body.dark .xzd-style-menghuan.post-XZDAI {
    --ph-mask: rgba(15,15,26,.9);
    --ph-theme: #42A2FF;
}
.xzd-style-menghuan.post-XZDAI::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    filter: blur(8px);
    opacity: .4;
    background: conic-gradient(from 1.5708rad at 50% 50%, #d6b300 0%, #42A2FF 54%, #d6b300 100%);
    transform: scaleX(.99) scaleY(.95) translateY(2px);
}
.xzd-style-menghuan.post-XZDAI::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    border-radius: 12px;
    background: var(--ph-mask);
}
.xzd-style-menghuan .XZDAI-labels,
.xzd-style-menghuan .XZDAI-explanation {
    position: relative;
    z-index: 3;
}
.xzd-style-menghuan .XZDAI-label-text { font-weight: 400; font-size: 14px; }
.xzd-style-menghuan .XZDAI-explanation {
    background: transparent;
    border: none;
    padding: 8px 0;
}

/* ---------- 13. 简约清新 ---------- */
.xzd-style-simple.post-XZDAI { padding-top: 16px; }
.xzd-style-simple .XZDAI-label-text { font-weight: 400; font-size: 14px; color: #26b373; }
.xzd-style-simple .XZDAI-explanation {
    background: var(--body-bg-color, var(--main-bg-color, #f9fafb));
    border: none;
    padding: 8px 12px;
}
.xzd-style-simple .XZDAI-label-badge {
    background: #26b373;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 1;
}
.dark-theme .xzd-style-simple.post-XZDAI,
body.dark .xzd-style-simple.post-XZDAI {
    background: #1a1a22;
    border-color: #333340;
}
.dark-theme .xzd-style-simple .XZDAI-label-text,
body.dark .xzd-style-simple .XZDAI-label-text { color: #34d399; }
.dark-theme .xzd-style-simple .XZDAI-explanation,
body.dark .xzd-style-simple .XZDAI-explanation { background: #22222e; color: #d1d5db; }
.dark-theme .xzd-style-simple .XZDAI-label-badge,
body.dark .xzd-style-simple .XZDAI-label-badge { background: #34d399; color: #065f46; }

/* ---------- 14. 卡片悬浮 ---------- */
.xzd-style-floating.post-XZDAI {
    background: var(--body-bg-color, var(--main-bg-color, #fff));
    border: none;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,.1);
    animation: xzd-float 3s ease-in-out infinite;
}
.dark-theme .xzd-style-floating.post-XZDAI,
body.dark .xzd-style-floating.post-XZDAI {
    background: var(--body-bg-color, var(--main-bg-color, #1d1e22));
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
@keyframes xzd-float {
    0%,100% { transform: translateY(0); box-shadow: 0 10px 40px rgba(0,0,0,.1); }
    50%     { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
}
.xzd-style-floating .XZDAI-explanation {
    background: var(--body-bg-color, var(--main-bg-color, #f9fafb));
    border: none;
}

/* ---------- 15. AI摘要卡片（新版） ---------- */
.xzd-style-simple-card.post-XZDAI {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.dark-theme .xzd-style-simple-card.post-XZDAI,
body.dark .xzd-style-simple-card.post-XZDAI {
    box-shadow: 0 2px 16px rgba(255, 255, 255, 0.08);
}
.xzd-style-simple-card .XZDAI-explanation {
    background: transparent;
    border: none;
    font-size: 15px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   8. 6种皮肤 — 渐变背景 + 标签配色
   ═══════════════════════════════════════════ */

/* --- 蓝黄渐变 --- */
.xzd-skin-blue-yellow.post-XZDAI {
    background: linear-gradient(to right, #e3f2fd, #fff8e1);
}
.dark-theme .xzd-skin-blue-yellow.post-XZDAI,
body.dark .xzd-skin-blue-yellow.post-XZDAI {
    background: linear-gradient(to right, #1e3a5f, #3d2914);
}

/* --- 蓝粉渐变 --- */
.xzd-skin-blue-pink.post-XZDAI {
    background: linear-gradient(to right, #e3f2fd, #fce4ec);
}
.dark-theme .xzd-skin-blue-pink.post-XZDAI,
body.dark .xzd-skin-blue-pink.post-XZDAI {
    background: linear-gradient(to right, #1e3a5f, #4a1d2f);
}

/* --- 绿蓝渐变 --- */
.xzd-skin-green-blue.post-XZDAI {
    background: linear-gradient(to right, #dcfce7, #dbeafe);
}
.dark-theme .xzd-skin-green-blue.post-XZDAI,
body.dark .xzd-skin-green-blue.post-XZDAI {
    background: linear-gradient(to right, #14532d, #1e3a5f);
}

/* --- 橙蓝渐变 --- */
.xzd-skin-orange-blue.post-XZDAI {
    background: linear-gradient(to right, #fff7ed, #dbeafe);
}
.dark-theme .xzd-skin-orange-blue.post-XZDAI,
body.dark .xzd-skin-orange-blue.post-XZDAI {
    background: linear-gradient(to right, #7c2d12, #1e3a5f);
}

/* --- 自定义渐变（CSS变量来自内联style） --- */
.xzd-skin-custom.post-XZDAI {
    background: linear-gradient(to right, var(--xzd-skin-bg-start, #e3f2fd), var(--xzd-skin-bg-end, #fff8e1));
}
.dark-theme .xzd-skin-custom.post-XZDAI,
body.dark .xzd-skin-custom.post-XZDAI {
    background: linear-gradient(to right, var(--xzd-skin-bg-start-dark, #1e3a5f), var(--xzd-skin-bg-end-dark, #3d2914));
}

/* 非默认皮肤：内容区透明背景 */
.xzd-skin-blue-yellow .XZDAI-explanation,
.xzd-skin-blue-pink .XZDAI-explanation,
.xzd-skin-green-blue .XZDAI-explanation,
.xzd-skin-orange-blue .XZDAI-explanation,
.xzd-skin-custom .XZDAI-explanation {
    background: transparent;
    border: none;
}

/* ═══════════════════════════════════════════
   9. 通用暗色模式 — 降级兜底
   ═══════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    body:not(.dark-theme):not(.white-theme):not(.dark) .post-XZDAI.xzd-skin-default {
        background: #1e1e24;
        border-color: #2d2d35;
    }
    body:not(.dark-theme):not(.white-theme):not(.dark) .post-XZDAI.xzd-skin-default .XZDAI-explanation {
        color: #c0c0c8;
    }
}

/* ═══════════════════════════════════════════
   10. 硬降级 — 主题缺失CSS变量时的兜底
   ═══════════════════════════════════════════ */
.post-XZDAI[data-xzd-fallback="1"] {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}
.post-XZDAI[data-xzd-fallback="1"] .XZDAI-explanation {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}
@media (prefers-color-scheme: dark) {
    .post-XZDAI[data-xzd-fallback="1"] {
        background: #1a1a22 !important;
        border-color: #333340 !important;
        color: #d1d5db !important;
    }
    .post-XZDAI[data-xzd-fallback="1"] .XZDAI-explanation {
        background: #22222e !important;
        border-color: #353545 !important;
        color: #d1d5db !important;
    }
}

/* ═══════════════════════════════════════════
   11. 文章内 AI 生成结构化内容 — 日间/夜间完整适配
   ═══════════════════════════════════════════ */

/* --- 资源卡片 / 课程卡片 --- */
.xzd-resource-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 1em 0;
    border-left: 4px solid #2F6BFF;
    color: #212529;
}
.dark-theme .xzd-resource-card,
body.dark .xzd-resource-card,
[data-theme="dark"] .xzd-resource-card {
    background: #2b3035 !important;
    border-left-color: #6ea8fe !important;
    color: #e9ecef !important;
}
.xzd-param { margin: 6px 0; }
.xzd-param strong { color: #2F6BFF; }
.dark-theme .xzd-param strong,
body.dark .xzd-param strong,
[data-theme="dark"] .xzd-param strong { color: #6ea8fe !important; }

/* --- 价格对比 --- */
.xzd-price-box {
    display: inline-block;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    margin: 8px;
    text-align: center;
    min-width: 140px;
    background: #fff;
    color: #212529;
}
.dark-theme .xzd-price-box,
body.dark .xzd-price-box,
[data-theme="dark"] .xzd-price-box {
    border-color: #495057 !important;
    background: #212529 !important;
    color: #e9ecef !important;
}
.dark-theme .xzd-price-box h4,
body.dark .xzd-price-box h4,
[data-theme="dark"] .xzd-price-box h4 { color: #e9ecef !important; }

.xzd-price-amount { font-size: 24px; color: #2F6BFF; }
.dark-theme .xzd-price-amount,
body.dark .xzd-price-amount,
[data-theme="dark"] .xzd-price-amount { color: #6ea8fe !important; }

.xzd-price-desc { color: #888; }
.dark-theme .xzd-price-desc,
body.dark .xzd-price-desc,
[data-theme="dark"] .xzd-price-desc { color: #adb5bd !important; }

/* --- 标签链接 --- */
.xzd-tag-link { color: #2F6BFF; font-weight: 600; text-decoration: underline; }
/* V3.1.8 P3：移除 !important 让用户自定义颜色在暗色模式下也生效 */
.dark-theme .xzd-tag-link,
body.dark .xzd-tag-link,
[data-theme="dark"] .xzd-tag-link { color: #6ea8fe; }

/* --- AI 生成表格 --- */
.dark-theme .xzd-resource-card table,
body.dark .xzd-resource-card table,
.dark-theme .entry-content table:has(.xzd-param),
body.dark .entry-content table:has(.xzd-param),
[data-theme="dark"] .entry-content table:has(.xzd-param) {
    background: #2b3035 !important;
    color: #e9ecef !important;
}
.dark-theme .entry-content table:has(.xzd-param) td,
body.dark .entry-content table:has(.xzd-param) td,
[data-theme="dark"] .entry-content table:has(.xzd-param) td {
    border-color: #495057 !important;
    color: #e9ecef !important;
}

/* --- 通用：AI 生成的文章内元素夜间兜底 --- */
.dark-theme .xzd-resource-card *,
body.dark .xzd-resource-card *,
[data-theme="dark"] .xzd-resource-card * { color: #e9ecef !important; }
.dark-theme .xzd-price-box *,
body.dark .xzd-price-box *,
[data-theme="dark"] .xzd-price-box * { color: #e9ecef !important; }
