/* 按钮 - 科幻超能浅色版 */
#prompt-input button:not([type="submit"]) {
    background: linear-gradient(145deg, #E6F0FF 0%, #D1E3FF 100%) !important;
    color: #0055CC !important;
    border: 2px solid #2D7AFF !important;
    border-radius: 6px !important;
    box-shadow: 
        4px 4px 0px #001F66,
        0 0 10px rgba(45, 122, 255, 0.6) !important; /* 光晕改为10px */
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

/* 超能光束效果伪元素 */
#prompt-input button:not([type="submit"])::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 85, 255, 0.15),
        rgba(0, 200, 255, 0.25),
        rgba(0, 85, 255, 0.15),
        transparent
    );
    transition: all 0.5s ease;
    opacity: 0;
    filter: blur(1px);
}

/* 按钮悬停效果 */
#prompt-input button:not([type="submit"]):hover {
    background: linear-gradient(145deg, #EDF5FF 0%, #D9E9FF 100%) !important;
    color: #0044AA !important;
    border-color: #0055FF !important;
    transform: translate(2px, 2px) !important;
    box-shadow: 
        2px 2px 0px #001F66,
        0 0 10px rgba(0, 85, 255, 0.8) !important; /* 光晕改为10px */
}

#prompt-input button:not([type="submit"]):hover::before {
    opacity: 1;
    left: 100%;
    transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

/* 按钮点击效果 */
#prompt-input button:not([type="submit"]):active {
    background: linear-gradient(145deg, #D1E3FF 0%, #B8D3FF 100%) !important;
    color: #003399 !important;
    transform: translate(3px, 3px) scale(0.98) !important;
    box-shadow: 
        1px 1px 0px #001F66,
        inset 0 0 10px rgba(0, 51, 153, 0.2), /* 内阴影模糊改为10px */
        0 0 10px rgba(0, 100, 255, 0.9) !important; /* 光晕改为10px */
}

/* 添加能量脉冲动画 */
@keyframes pulse-energy {
    0%, 100% {
        box-shadow: 
            4px 4px 0px #001F66,
            0 0 10px rgba(45, 122, 255, 0.6); /* 光晕改为10px */
    }
    50% {
        box-shadow: 
            4px 4px 0px #001F66,
            0 0 10px rgba(45, 122, 255, 0.9); /* 光晕改为10px */
    }
}

/* 活跃状态的能量脉冲效果 */
#prompt-input button:not([type="submit"]):focus {
    animation: pulse-energy 1.5s infinite;
}

/* ===== 发送按钮 - 橙色科幻超能 ===== */
#prompt-input [type="submit"] {
    background: linear-gradient(145deg, #FFF0E0 0%, #FFD9B3 100%) !important;
    color: #CC5500 !important;
    border: 2px solid #FF7700 !important;
    border-radius: 6px !important;
    box-shadow: 
        4px 4px 0px #663300,
        0 0 10px rgba(255, 119, 0, 0.6) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

#prompt-input [type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 119, 0, 0.15),
        rgba(255, 200, 0, 0.25),
        rgba(255, 119, 0, 0.15),
        transparent
    );
    transition: all 0.5s ease;
    opacity: 0;
    filter: blur(1px);
}

#prompt-input [type="submit"]:hover {
    background: linear-gradient(145deg, #FFF5EA 0%, #FFE4C2 100%) !important;
    color: #AA4400 !important;
    border-color: #FF8800 !important;
    transform: translate(2px, 2px) !important;
    box-shadow: 
        2px 2px 0px #663300,
        0 0 10px rgba(255, 119, 0, 0.8) !important;
}

#prompt-input [type="submit"]:hover::before {
    opacity: 1;
    left: 100%;
    transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

#prompt-input [type="submit"]:active {
    background: linear-gradient(145deg, #FFD9B3 0%, #FFC299 100%) !important;
    color: #883300 !important;
    transform: translate(3px, 3px) scale(0.98) !important;
    box-shadow: 
        1px 1px 0px #663300,
        inset 0 0 10px rgba(136, 51, 0, 0.2),
        0 0 10px rgba(255, 100, 0, 0.9) !important;
}

@keyframes pulse-energy-send {
    0%, 100% {
        box-shadow: 
            4px 4px 0px #663300,
            0 0 10px rgba(255, 119, 0, 0.6);
    }
    50% {
        box-shadow: 
            4px 4px 0px #663300,
            0 0 10px rgba(255, 119, 0, 0.9);
    }
}

#prompt-input [type="submit"]:focus {
    animation: pulse-energy-send 1.5s infinite;
}

/* ===== 停止按钮 - 红色科幻超能 ===== */
#prompt-input button[aria-label="停止"] {
    background: linear-gradient(145deg, #FFE6E6 0%, #FFCCCC 100%) !important;
    color: #CC0000 !important;
    border: 2px solid #FF3333 !important;
    border-radius: 6px !important;
    box-shadow: 
        4px 4px 0px #660000,
        0 0 10px rgba(255, 51, 51, 0.6) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

#prompt-input button[aria-label="停止"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 51, 51, 0.15),
        rgba(255, 100, 100, 0.25),
        rgba(255, 51, 51, 0.15),
        transparent
    );
    transition: all 0.5s ease;
    opacity: 0;
    filter: blur(1px);
}

#prompt-input button[aria-label="停止"]:hover {
    background: linear-gradient(145deg, #FFF0F0 0%, #FFDDDD 100%) !important;
    color: #AA0000 !important;
    border-color: #FF4444 !important;
    transform: translate(2px, 2px) !important;
    box-shadow: 
        2px 2px 0px #660000,
        0 0 10px rgba(255, 51, 51, 0.8) !important;
}

#prompt-input button[aria-label="停止"]:hover::before {
    opacity: 1;
    left: 100%;
    transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

#prompt-input button[aria-label="停止"]:active {
    background: linear-gradient(145deg, #FFCCCC 0%, #FFB3B3 100%) !important;
    color: #880000 !important;
    transform: translate(3px, 3px) scale(0.98) !important;
    box-shadow: 
        1px 1px 0px #660000,
        inset 0 0 10px rgba(136, 0, 0, 0.2),
        0 0 10px rgba(255, 0, 0, 0.9) !important;
}

@keyframes pulse-energy-stop {
    0%, 100% {
        box-shadow: 
            4px 4px 0px #660000,
            0 0 10px rgba(255, 51, 51, 0.6);
    }
    50% {
        box-shadow: 
            4px 4px 0px #660000,
            0 0 10px rgba(255, 51, 51, 0.9);
    }
}

#prompt-input button[aria-label="停止"]:focus {
    animation: pulse-energy-stop 1.5s infinite;
}

/* ===== 科幻风格消息输入框 ===== */
#prompt-input-body textarea[name="message"] {
    /* 主体背景：浅蓝白渐变，模拟发光面板 */
    background: linear-gradient(145deg, #f0f7ff 0%, #dce8ff 100%) !important;
    color: #003399 !important;  /* 深蓝文字，高对比 */
    border: 2px solid #2d7aff !important;
    border-radius: 6px !important;
    /* 科技感内凹 + 外发光 */
    box-shadow: 
        inset 0 2px 6px rgba(0, 51, 153, 0.15),
        0 0 10px rgba(45, 122, 255, 0.3) !important;
    font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    resize: vertical !important;
    transition: all 0.25s ease-in-out !important;
    text-shadow: none !important;  /* 清晰文本无需阴影 */
    /* 滚动条风格（与科幻蓝调匹配） */
    scrollbar-width: thin;
    scrollbar-color: #2d7aff #dce8ff;
}

/* 滚动条（WebKit） */
#prompt-input-body textarea[name="message"]::-webkit-scrollbar {
    width: 8px;
}
#prompt-input-body textarea[name="message"]::-webkit-scrollbar-track {
    background: #dce8ff;
    border-radius: 4px;
}
#prompt-input-body textarea[name="message"]::-webkit-scrollbar-thumb {
    background: #2d7aff;
    border-radius: 4px;
    border: 1px solid #a0c0ff;
}
#prompt-input-body textarea[name="message"]::-webkit-scrollbar-thumb:hover {
    background: #0055ff;
}

/* ===== 科幻光泽纹理（替代废土的磨损） ===== */
#prompt-input-body textarea[name="message"] {
    background-image: 
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0) 60%
        ),
        linear-gradient(145deg, #f0f7ff 0%, #dce8ff 100%);
    background-blend-mode: overlay, normal;
}

/* ===== 占位符样式 ===== */
#prompt-input-body textarea[name="message"]::placeholder {
    color: #6a8fc0 !important;
    opacity: 0.8;
    font-style: italic;
    font-weight: 300;
}

/* ===== 聚焦状态 - 能量脉冲光效 ===== */
@keyframes input-sci-glow {
    0%, 100% {
        box-shadow: 
            inset 0 2px 6px rgba(0, 51, 153, 0.15),
            0 0 10px rgba(45, 122, 255, 0.3),
            0 0 20px rgba(45, 122, 255, 0.1);
        border-color: #2d7aff;
    }
    50% {
        box-shadow: 
            inset 0 2px 6px rgba(0, 51, 153, 0.2),
            0 0 18px rgba(45, 122, 255, 0.6),
            0 0 40px rgba(45, 122, 255, 0.2);
        border-color: #4a8aff;
    }
}

#prompt-input-body textarea[name="message"]:focus {
    animation: input-sci-glow 1.8s infinite ease-in-out;
    outline: none !important;
    border-color: #4a8aff !important;
}

/* ===== 悬停状态 - 亮度提升 ===== */
#prompt-input-body textarea[name="message"]:hover {
    background-image: 
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0) 70%
        ),
        linear-gradient(145deg, #f5faff 0%, #e3edff 100%);
    border-color: #4a8aff;
    box-shadow: 
        inset 0 2px 6px rgba(0, 51, 153, 0.1),
        0 0 12px rgba(45, 122, 255, 0.4);
}

/* ===== 禁用状态 ===== */
#prompt-input-body textarea[name="message"]:disabled {
    opacity: 0.5;
    filter: grayscale(0.3);
    cursor: not-allowed;
}

/* =================================================== */
/* ===== 科幻风格父容器 #prompt-input ===== */
#prompt-input {
    /* 主体：半透明深色玻璃面板 + 蓝色光晕 */
    background: rgba(20, 30, 50, 0.75) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    /* 边框：高亮蓝紫渐变，模拟能量护盾 */
    border: 2px solid rgba(45, 122, 255, 0.6) !important;
    border-radius: 12px !important;
    /* 多层阴影：内部漫反射 + 外部辉光 */
    box-shadow: 
        inset 0 0 30px rgba(45, 122, 255, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(45, 122, 255, 0.2),  /* 精密的描边 */
        0 0 40px rgba(45, 122, 255, 0.15) !important;
    position: relative;
    display: flex !important;
    align-items: flex-end !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* 背景纹理：轻微科技感斜线 */
    background-image: 
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.02) 0px,
            rgba(255, 255, 255, 0.02) 2px,
            transparent 2px,
            transparent 6px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(0, 50, 150, 0.03) 0px,
            rgba(0, 50, 150, 0.03) 2px,
            transparent 2px,
            transparent 6px
        ),
        rgba(20, 30, 50, 0.75);
    background-blend-mode: overlay, overlay, normal;
    transition: all 0.3s ease;
}

/* ===== 容器内子元素间距 ===== */
#prompt-input #prompt-input-body {
    flex: 1;
    min-width: 0;
    /* 输入框区域与容器内边距协调 */
    padding: 4px 4px 4px 8px;
}

/* ===== 容器整体聚焦（包含输入框或按钮） ===== */
#prompt-input:focus-within {
    border-color: rgba(45, 122, 255, 0.9) !important;
    box-shadow: 
        inset 0 0 30px rgba(45, 122, 255, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(45, 122, 255, 0.4),
        0 0 60px rgba(45, 122, 255, 0.25) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* ===== 容器内按钮微调（与输入框协调） ===== */
#prompt-input button,
#prompt-input [type="submit"] {
    flex-shrink: 0;
    margin: 4px 6px 4px 4px;  /* 保持与容器边距一致 */
    /* 按钮自身样式由之前规则定义，此处仅做布局微调 */
}

/* ====科幻风格对话卡片样式 ==== */

/* 1. 浅色模式下的样式（AI侧） */
.is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
    background: rgba(255, 245, 230, 0.95);   /* 护眼浅杏黄 */
    border-left: 2px solid #F59E0B;           /* 橙色边框，与背景协调 */
    border-bottom: 2px solid #F59E0B;
    border-radius: 2px;
    backdrop-filter: blur(2px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); /* 文字阴影增强可读性 */
}

/* 2. 用户侧使用不同的背景色 */
.is-user .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
    background: rgba(230, 247, 255, 0.95);   /* 护眼浅天蓝 */
    border-left: 2px solid #3B82F6;           /* 蓝色边框 */
    border-bottom: 2px solid #3B82F6;
    border-radius: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* 3. 深色模式下的样式覆盖（使用 .dark） */
.dark .is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
    background: rgba(10, 30, 50, 0.7);
    border-left: 2px solid #FBBF24;           /* 亮橙色边框，与浅色模式呼应 */
    border-bottom: 2px solid #FBBF24;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); /* 深色背景下的阴影 */
}

.dark .is-user .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
    background: rgba(30, 15, 45, 0.7);
    border-left: 2px solid #60A5FA;           /* 亮蓝色边框，与浅色模式呼应 */
    border-bottom: 2px solid #60A5FA;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* 科幻与超能风格折叠状态栏美化 */
details {
    border-radius: 4px;
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* ----- 浅色模式默认变量值 ----- */
    --primary-color: #0066cc;
    --secondary-color: #7c3aed;
    --accent-color: #008855;
    --warning-color: #cc2244;
    --dark-bg: #f0f5ff;
    --dark-surface: #ffffff;
    --light-bg: #f0f5ff;
    --light-surface: #ffffff;
    --text-primary: #0a0a2a;
    --text-secondary: #4a4a7a;
    --text-muted: #6a6a9a;
    --text-light-primary: #0a0a2a;
    --text-light-secondary: #4a4a7a;
    --border-color: rgba(0, 120, 180, 0.4);
    --glow-primary: rgba(0, 120, 180, 0.25);
    --glow-secondary: rgba(120, 0, 180, 0.2);
    --grid-color: rgba(0, 120, 180, 0.1);
    --light-border-color: rgba(0, 120, 180, 0.6);
    --light-border-open: rgba(0, 217, 255, 0.9);
    --light-grid-color: rgba(0, 120, 180, 0.15);
    font-family: 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
}

/* 动态网格背景 - 浅色默认 */
details:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.4;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(24px); }
}

/* 折叠状态 - 浅色默认 */
details:not([open]) {
    background: linear-gradient(135deg, var(--light-bg) 0%, #ffffff 100%);
    border: 1px solid var(--light-border-color);
    box-shadow: 
        0 0 10px rgba(0, 120, 180, 0.15), /* 光晕改为10px */
        0 5px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    padding: 2px 0;
    position: relative;
}

details:not([open]):after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 217, 255, 0.08) 50%,
        transparent 70%
    );
    animation: scan 6s linear infinite;
    pointer-events: none;
}

/* 展开状态 - 浅色默认 */
details[open] {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e8f1ff 100%);
    border: 1px solid var(--light-border-open);
    box-shadow: 
        0 0 10px rgba(0, 217, 255, 0.4), /* 光晕改为10px */
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    padding: 1px;
    animation: pulseLight 3s infinite alternate;
}

@keyframes pulseLight {
    0% { 
        border-color: rgba(0, 120, 180, 0.8);
        box-shadow: 0 0 10px rgba(0, 120, 180, 0.25); /* 光晕改为10px */
    }
    100% { 
        border-color: rgba(0, 200, 255, 1);
        box-shadow: 0 0 10px rgba(0, 200, 255, 0.35); /* 光晕改为10px */
    }
}

@keyframes scan {
    0% { transform: translateY(-100%) rotate(45deg); }
    100% { transform: translateY(100%) rotate(45deg); }
}

/* 摘要标签 - 浅色默认 */
details summary {
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-light-primary);
    background: linear-gradient(135deg, 
        rgba(240, 245, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    padding: 8px 20px;
    margin: 0;
    position: relative;
    transition: all 0.3s ease;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1.2px;
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid var(--light-border-color);
    text-transform: uppercase;
    font-family: 'Orbitron', 'Rajdhani', monospace;
    text-shadow: 0 0 8px rgba(0, 120, 180, 0.4);
    z-index: 1;
    backdrop-filter: blur(5px);
}

details summary:hover {
    background: linear-gradient(135deg, 
        rgba(0, 120, 180, 0.08) 0%, 
        rgba(120, 0, 180, 0.05) 100%);
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(0, 120, 180, 0.2); /* 光晕改为10px */
    text-shadow: 0 0 12px rgba(0, 120, 180, 0.5);
    border-bottom: 1px solid rgba(0, 180, 255, 0.7);
}

/* 摘要文本 - 浅色默认 */
details summary .summary-text {
    background: linear-gradient(90deg, #0066cc, #009999);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    flex: 1;
    padding: 0 10px;
    font-weight: 800;
    font-family: 'Orbitron', 'Rajdhani', monospace;
    letter-spacing: 1.8px;
    font-size: 1.1em;
}

/* 动态箭头 - 浅色默认 */
details summary::after {
    content: '◈';
    font-size: 1.1em;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    color: #0066cc;
    margin: 0 10px;
    transform-origin: center;
    font-weight: bold;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 120, 180, 0.08);
    border-radius: 6px;
    text-shadow: 0 0 8px rgba(0, 120, 180, 0.4);
    box-shadow: 0 0 10px rgba(0, 120, 180, 0.2); /* 光晕改为10px */
    font-family: 'Arial', sans-serif;
}

details[open] summary::after {
    content: '◇';
    transform: rotate(90deg);
    color: #008855;
    text-shadow: 0 0 8px rgba(0, 180, 100, 0.4);
    box-shadow: 0 0 10px rgba(0, 180, 100, 0.25); /* 光晕改为10px */
    background: rgba(0, 180, 100, 0.08);
    animation: arrowPulse 1.5s infinite alternate;
}

@keyframes arrowPulse {
    0% { 
        transform: rotate(90deg) scale(1);
        opacity: 0.8;
    }
    100% { 
        transform: rotate(90deg) scale(1.2);
        opacity: 1;
    }
}

/* 内容区域 - 浅色默认 */
details > *:not(summary) {
    margin: 12px;
    padding: 0;
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text-light-secondary);
    position: relative;
    z-index: 1;
}

/* 文字强调 - 浅色默认 */
details strong, details b {
    color: #0066cc;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
    letter-spacing: 0.5px;
}

details em {
    color: #008855;
    font-style: italic;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 136, 85, 0.3);
}

/* 代码块 - 浅色默认 */
details code {
    color: #0a0a2a;
    background: rgba(0, 120, 180, 0.08);
    padding: 4px 4px;
    margin: 2px 0;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
    border: 1px solid rgba(0, 120, 180, 0.25);
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    box-shadow: 0 0 10px rgba(0, 120, 180, 0.15); /* 光晕改为10px */
    letter-spacing: 0.5px;
}

details pre {
    background: linear-gradient(135deg, 
        rgba(240, 245, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
    padding: 4px;
    border-radius: 4px;
    overflow-x: auto;
    color: var(--text-light-primary);
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
    margin: 4px 0;
    border: 1px solid rgba(0, 120, 180, 0.3);
    box-shadow: 
        0 0 10px rgba(0, 120, 180, 0.15), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 120, 180, 0.05); /* 内阴影改为10px */
    position: relative;
}

/* 链接 - 浅色默认 */
details a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
    position: relative;
}

details a:hover {
    color: #008855;
    border-bottom: 2px solid #008855;
    text-shadow: 0 0 10px rgba(0, 136, 85, 0.5); /* 光晕改为10px */
}

details a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

details a:hover::after {
    transform: scaleX(1);
}

/* 滚动条 - 浅色默认 */
details ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

details ::-webkit-scrollbar-track {
    background: rgba(240, 245, 255, 0.8);
    border-radius: 10px;
    border: 1px solid var(--light-border-color);
}

details ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(0, 120, 180, 0.7), rgba(120, 0, 180, 0.5));
    border-radius: 10px;
    border: 1px solid rgba(0, 120, 180, 0.3);
    box-shadow: 0 0 10px rgba(0, 120, 180, 0.3); /* 光晕改为10px */
}

details ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    box-shadow: 0 0 10px var(--accent-color); /* 光晕改为10px */
}

/* ========== 深色模式（.dark）覆盖 ========== */
.dark details {
    /* 深色变量值 */
    --primary-color: #00d9ff;
    --secondary-color: #9b5dff;
    --accent-color: #00ffa2;
    --warning-color: #ff3c7c;
    --dark-bg: #0a0a1a;
    --dark-surface: #121230;
    --light-bg: #f0f5ff;
    --light-surface: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #b8c0ff;
    --text-muted: #8a9aff;
    --text-light-primary: #0a0a2a;
    --text-light-secondary: #4a4a7a;
    --border-color: rgba(0, 217, 255, 0.4);
    --glow-primary: rgba(0, 217, 255, 0.5);
    --glow-secondary: rgba(155, 93, 255, 0.4);
    --grid-color: rgba(0, 217, 255, 0.15);
    --light-border-color: rgba(0, 120, 180, 0.6);
    --light-border-open: rgba(0, 217, 255, 0.9);
    --light-grid-color: rgba(0, 120, 180, 0.15);
}

.dark details:not([open]) {
    background: linear-gradient(135deg, var(--dark-surface) 0%, #1a1a40 100%);
    border: 1px solid var(--border-color);
    box-shadow: 
        0 0 10px var(--glow-primary), /* 光晕改为10px */
        0 5px 35px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dark details[open] {
    background: linear-gradient(135deg, var(--dark-surface) 0%, #0f0f28 100%);
    border: 1px solid var(--primary-color);
    box-shadow: 
        0 0 10px var(--glow-primary), /* 光晕改为10px */
        0 12px 50px rgba(0, 0, 0, 0.75),
        inset 0 0 10px rgba(0, 217, 255, 0.15); /* 内阴影改为10px */
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% { 
        box-shadow: 0 0 10px var(--glow-primary), 0 12px 50px rgba(0, 0, 0, 0.75); /* 光晕改为10px */
        border-color: var(--primary-color);
    }
    100% { 
        box-shadow: 0 0 10px var(--primary-color), 0 18px 60px rgba(0, 0, 0, 0.9); /* 光晕改为10px */
        border-color: var(--accent-color);
    }
}

.dark details summary {
    color: var(--text-primary);
    background: linear-gradient(135deg, 
        rgba(25, 25, 60, 0.9) 0%, 
        rgba(15, 15, 40, 0.9) 100%);
    border-bottom: 1px solid var(--border-color);
    text-shadow: 0 0 10px var(--primary-color); /* 改为10px */
}

.dark details summary:hover {
    background: linear-gradient(135deg, 
        rgba(0, 217, 255, 0.15) 0%, 
        rgba(155, 93, 255, 0.12) 100%);
    box-shadow: 0 0 10px var(--glow-primary); /* 光晕改为10px */
    text-shadow: 0 0 10px var(--primary-color); /* 改为10px */
    letter-spacing: 1.5px;
}

.dark details summary .summary-text {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
}

.dark details summary::after {
    color: var(--primary-color);
    background: rgba(0, 217, 255, 0.15);
    text-shadow: 0 0 10px var(--primary-color); /* 改为10px */
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.4); /* 光晕改为10px */
}

.dark details[open] summary::after {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color); /* 改为10px */
    box-shadow: 0 0 10px rgba(0, 255, 162, 0.5); /* 光晕改为10px */
    background: rgba(0, 255, 162, 0.15);
}

.dark details > *:not(summary) {
    color: var(--text-secondary);
}

.dark details strong, .dark details b {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--glow-primary);
}

.dark details em {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(0, 255, 162, 0.4);
}

.dark details code {
    color: var(--text-primary);
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.25); /* 光晕改为10px */
}

.dark details pre {
    background: linear-gradient(135deg, 
        rgba(15, 15, 40, 0.9) 0%, 
        rgba(25, 25, 60, 0.9) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 
        0 0 10px rgba(0, 217, 255, 0.25), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 217, 255, 0.08); /* 内阴影改为10px */
}

.dark details a {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-primary); /* 改为10px */
}

.dark details a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color); /* 改为10px */
}

.dark details ::-webkit-scrollbar-track {
    background: rgba(20, 20, 50, 0.8);
    border: 1px solid var(--border-color);
}

.dark details ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 1px solid rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 10px var(--primary-color); /* 光晕改为10px */
}

.dark details ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    box-shadow: 0 0 10px var(--accent-color); /* 光晕改为10px */
}

/* ========== 基础卡片样式（浅色默认） ========== */
.user-card,
.role-card,
.news-card,
.sms-card,
.task-card {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
    margin: 12px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

/* ========== ROLE CARD 角色卡片（浅红+浅橙） ========== */
.role-card {
    --role-primary: #cc3344;          /* 主色：红 */
    --role-secondary: #ee7733;        /* 辅色：橙 */
    --role-accent: #cc8800;           /* 强调色：金橙 */
    --role-bg: linear-gradient(135deg, 
        rgba(255, 235, 230, 0.95) 0%, 
        rgba(255, 245, 240, 0.98) 100%);
    --role-border: 1px solid rgba(255, 120, 80, 0.4);
    --role-glow: rgba(255, 120, 80, 0.2);
    --role-grid: rgba(255, 120, 80, 0.08);
    
    background: var(--role-bg);
    border: var(--role-border);
    box-shadow: 
        0 0 10px var(--role-glow),
        inset 0 0 10px rgba(255, 120, 80, 0.05);
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 97%, var(--role-grid) 100%),
        linear-gradient(0deg, transparent 97%, var(--role-grid) 100%);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.role-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--role-primary), 
        var(--role-secondary), 
        var(--role-accent));
    z-index: -1;
    opacity: 0.2;
    filter: blur(3px);
    border-radius: 8px;
}

.role-card > .title {
    color: var(--role-primary);
    text-shadow: 0 0 10px var(--role-primary);
}

.role-card > .title::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--role-primary), 
        var(--role-accent), 
        transparent);
    box-shadow: 0 0 10px var(--role-primary);
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 10px rgba(255, 120, 80, 0.3),
        inset 0 0 10px rgba(255, 120, 80, 0.1);
    border-color: rgba(255, 120, 80, 0.6);
}

/* ========== USER CARD 用户卡片（浅蓝+浅紫） ========== */
.user-card {
    --user-primary: #3366cc;          /* 主色：蓝 */
    --user-secondary: #8855dd;        /* 辅色：紫 */
    --user-accent: #44aadd;           /* 强调色：亮蓝 */
    --user-bg: linear-gradient(135deg, 
        rgba(230, 240, 255, 0.95) 0%, 
        rgba(245, 240, 255, 0.98) 100%);
    --user-border: 1px solid rgba(80, 120, 255, 0.4);
    --user-glow: rgba(80, 120, 255, 0.2);
    --user-grid: rgba(80, 120, 255, 0.08);
    
    background: var(--user-bg);
    border: var(--user-border);
    box-shadow: 
        0 0 10px var(--user-glow),
        inset 0 0 10px rgba(80, 120, 255, 0.05);
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 97%, var(--user-grid) 100%),
        linear-gradient(0deg, transparent 97%, var(--user-grid) 100%);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.user-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--user-primary), 
        var(--user-secondary), 
        var(--user-accent));
    z-index: -1;
    opacity: 0.2;
    filter: blur(3px);
    border-radius: 8px;
}

.user-card > .title {
    color: var(--user-primary);
    text-shadow: 0 0 10px var(--user-primary);
}

.user-card > .title::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--user-primary), 
        var(--user-accent), 
        transparent);
    box-shadow: 0 0 10px var(--user-primary);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 10px rgba(80, 120, 255, 0.3),
        inset 0 0 10px rgba(80, 120, 255, 0.1);
    border-color: rgba(80, 120, 255, 0.6);
}

/* 角色卡片进度条（浅色默认） */
.role-stat, user-stat {
    margin: 15px 0;
    position: relative;
    z-index: 2;
}

.stat-label {
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 4;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    padding: 3px 8px 3px 6px;
    min-width: 50px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    border-left: 3px solid;
    border-radius: 0 5px 5px 0;
    font-family: 'Rajdhani', sans-serif;
}

.health .stat-label {
    color: var(--role-primary);
    text-shadow: 0 0 3px rgba(255, 100, 150, 0.5);
    border-left-color: var(--role-primary);
    background: rgba(255, 100, 150, 0.15);
}

.energy .stat-label {
    color: var(--role-secondary);
    text-shadow: 0 0 3px rgba(0, 119, 170, 0.5);
    border-left-color: var(--role-secondary);
    background: rgba(0, 119, 170, 0.15);
}

.soul .stat-label {
    color: var(--role-accent);
    text-shadow: 0 0 3px rgba(204, 153, 0, 0.5);
    border-left-color: var(--role-accent);
    background: rgba(204, 153, 0, 0.15);
}

.progress-container {
    height: 26px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 100, 150, 0.3);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.05), /* 内阴影改为10px */
        0 0 8px rgba(255, 100, 150, 0.1);
    padding-left: 65px;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
    animation: scan 2.5s linear infinite;
    z-index: 2;
}

.progress-fill {
    height: 100%;
    position: relative;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: calc(var(--progress-width, 75%) - 65px);
    max-width: calc(100% - 65px);
}

.health .progress-fill {
    background: linear-gradient(90deg,
        rgba(255, 100, 150, 0.4),
        var(--role-primary) 70%);
    box-shadow: 0 0 8px rgba(255, 100, 150, 0.3);
}

.energy .progress-fill {
    background: linear-gradient(90deg,
        rgba(0, 119, 170, 0.4),
        var(--role-secondary) 70%);
    box-shadow: 0 0 8px rgba(0, 119, 170, 0.3);
}

.soul .progress-fill {
    background: linear-gradient(90deg,
        rgba(204, 153, 0, 0.4),
        var(--role-accent) 70%);
    box-shadow: 0 0 8px rgba(204, 153, 0, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

.progress-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #0a0a2a;
    font-weight: 800;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    z-index: 3;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
}

/* ========== NEWS CARD 新闻卡片（浅色默认） ========== */
.news-card {
    --news-primary: #008855;
    --news-secondary: #4466cc;
    --news-bg: linear-gradient(135deg, 
        rgba(230, 255, 245, 0.9) 0%, 
        rgba(245, 255, 250, 0.95) 100%);
    --news-border: 1px solid rgba(0, 200, 150, 0.4);
    --news-glow: rgba(0, 200, 150, 0.15);
    --news-grid: rgba(0, 200, 150, 0.08);
    
    background: var(--news-bg);
    border: var(--news-border);
    box-shadow: 
        0 0 10px var(--news-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 200, 150, 0.05); /* 内阴影改为10px */
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 98%, var(--news-grid) 100%),
        linear-gradient(0deg, transparent 98%, var(--news-grid) 100%);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.news-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--news-primary), 
        var(--news-secondary));
    z-index: -1;
    opacity: 0.15;
    filter: blur(3px);
    border-radius: 8px;
}

.news-card > .title {
    color: var(--news-primary);
    text-shadow: 0 0 10px var(--news-primary); /* 改为10px */
}

.news-card > .title::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--news-primary), 
        var(--news-secondary), 
        transparent);
    box-shadow: 0 0 10px var(--news-primary); /* 光晕改为10px */
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 10px rgba(0, 200, 150, 0.25), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 200, 150, 0.1); /* 内阴影改为10px */
    border-color: rgba(0, 200, 150, 0.6);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 200, 150, 0.3);
}

.news-source {
    color: var(--news-primary);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

.news-date {
    color: var(--news-secondary);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}

.news-title {
    color: #0a0a2a;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 12px 0;
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.news-content {
    color: var(--text-light-secondary);
    line-height: 1.6;
    margin: 15px 0;
    padding: 12px;
    background: rgba(0, 120, 180, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--news-primary);
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.news-tag {
    background: rgba(0, 200, 150, 0.15);
    color: var(--news-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 200, 150, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.news-tag:hover {
    background: rgba(0, 200, 150, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 0 10px var(--news-primary); /* 光晕改为10px */
}

/* ========== SMS CARD 消息卡片（浅色默认） ========== */
.sms-card {
    --sms-primary: #7c3aed;
    --sms-secondary: #a855f7;
    --sms-bg: linear-gradient(135deg, 
        rgba(245, 230, 255, 0.9) 0%, 
        rgba(250, 245, 255, 0.95) 100%);
    --sms-border: 1px solid rgba(180, 120, 255, 0.4);
    --sms-glow: rgba(180, 120, 255, 0.15);
    --sms-grid: rgba(180, 120, 255, 0.08);
    
    background: var(--sms-bg);
    border: var(--sms-border);
    box-shadow: 
        0 0 10px var(--sms-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(180, 120, 255, 0.05); /* 内阴影改为10px */
}

.sms-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, var(--sms-grid) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, var(--sms-grid) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.sms-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--sms-primary), 
        var(--sms-secondary));
    z-index: -1;
    opacity: 0.2;
    filter: blur(3px);
    border-radius: 8px;
}

.sms-card > .title {
    color: var(--sms-primary);
    text-shadow: 0 0 10px var(--sms-primary); /* 改为10px */
}

.sms-card > .title::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--sms-primary), 
        var(--sms-secondary), 
        transparent);
    box-shadow: 0 0 10px var(--sms-primary); /* 光晕改为10px */
}

.sms-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 10px rgba(180, 120, 255, 0.25), /* 光晕改为10px */
        inset 0 0 10px rgba(180, 120, 255, 0.1); /* 内阴影改为10px */
    border-color: rgba(180, 120, 255, 0.6);
}

.sms-message {
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    position: relative;
    max-width: 85%;
    animation: messageAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sms-sent {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid var(--sms-primary);
    margin-left: auto;
    box-shadow: 
        0 0 10px rgba(124, 58, 237, 0.2), /* 光晕改为10px */
        inset 0 0 10px rgba(124, 58, 237, 0.05); /* 内阴影改为10px */
}

.sms-received {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid var(--sms-secondary);
    margin-right: auto;
    box-shadow: 
        0 0 10px rgba(168, 85, 247, 0.2), /* 光晕改为10px */
        inset 0 0 10px rgba(168, 85, 247, 0.05); /* 内阴影改为10px */
}

.sms-sender {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sms-sent .sms-sender {
    color: var(--sms-primary);
    text-align: right;
}

.sms-received .sms-sender {
    color: var(--sms-secondary);
    text-align: left;
}

.sms-content {
    color: #0a0a2a;
    line-height: 1.5;
    margin: 8px 0;
}

.sms-time {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: right;
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: #6a4a8a;
}

.sms-input-area {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(124, 58, 237, 0.3);
}

.sms-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--sms-primary);
    border-radius: 6px;
    color: #0a0a2a;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 60px;
    transition: all 0.3s ease;
}

.sms-input:focus {
    outline: none;
    border-color: var(--sms-secondary);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); /* 光晕改为10px */
    background: rgba(255, 255, 255, 1);
}

/* ========== TASK CARD 任务卡片（浅色默认） ========== */
.task-card {
    --task-primary: #cc8800;
    --task-secondary: #ee7700;
    --task-accent: #cc2244;
    --task-bg: linear-gradient(135deg, 
        rgba(255, 245, 230, 0.9) 0%, 
        rgba(255, 250, 245, 0.95) 100%);
    --task-border: 1px solid rgba(255, 180, 0, 0.4);
    --task-glow: rgba(255, 180, 0, 0.15);
    --task-grid: rgba(255, 180, 0, 0.08);
    
    background: var(--task-bg);
    border: var(--task-border);
    box-shadow: 
        0 0 10px var(--task-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(255, 180, 0, 0.05); /* 内阴影改为10px */
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(0deg, 
            transparent, 
            transparent 2px, 
            var(--task-grid) 2px, 
            var(--task-grid) 4px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.task-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--task-primary), 
        var(--task-secondary), 
        var(--task-accent));
    z-index: -1;
    opacity: 0.15;
    filter: blur(3px);
    border-radius: 8px;
}

.task-card > .title {
    color: var(--task-primary);
    text-shadow: 0 0 10px var(--task-primary); /* 改为10px */
}

.task-card > .title::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--task-primary), 
        var(--task-secondary), 
        transparent);
    box-shadow: 0 0 10px var(--task-primary); /* 光晕改为10px */
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 10px rgba(255, 180, 0, 0.25), /* 光晕改为10px */
        inset 0 0 10px rgba(255, 180, 0, 0.1); /* 内阴影改为10px */
    border-color: rgba(255, 180, 0, 0.6);
}

.task-item {
    background: rgba(255, 245, 220, 0.6);
    border: 1px solid rgba(255, 180, 0, 0.3);
    border-radius: 6px;
    padding: 15px;
    margin: 12px 0;
    position: relative;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.2); /* 光晕改为10px */
    border-color: var(--task-primary);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    color: #0a0a2a;
    font-weight: 700;
    font-size: 1.1rem;
    flex: 1;
}

.task-priority {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-left: 10px;
}

.priority-high {
    background: rgba(204, 34, 68, 0.15);
    color: var(--task-accent);
    border: 1px solid rgba(204, 34, 68, 0.3);
}

.priority-medium {
    background: rgba(204, 136, 0, 0.15);
    color: var(--task-primary);
    border: 1px solid rgba(204, 136, 0, 0.3);
}

.priority-low {
    background: rgba(238, 119, 0, 0.15);
    color: var(--task-secondary);
    border: 1px solid rgba(238, 119, 0, 0.3);
}

.task-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.status-pending {
    background: rgba(204, 136, 0, 0.15);
    color: var(--task-primary);
    border: 1px solid rgba(204, 136, 0, 0.3);
}

.status-progress {
    background: rgba(238, 119, 0, 0.15);
    color: var(--task-secondary);
    border: 1px solid rgba(238, 119, 0, 0.3);
}

.status-completed {
    background: rgba(0, 200, 100, 0.15);
    color: #008855;
    border: 1px solid rgba(0, 200, 100, 0.3);
}

.status-failed {
    background: rgba(204, 34, 68, 0.15);
    color: var(--task-accent);
    border: 1px solid rgba(204, 34, 68, 0.3);
}

.task-description {
    color: #664422;
    margin: 10px 0;
    line-height: 1.5;
    padding-left: 15px;
    border-left: 2px solid var(--task-primary);
}

.task-progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--task-primary), var(--task-secondary));
    border-radius: 3px;
    transition: width 1s ease;
    position: relative;
    box-shadow: 0 0 10px var(--task-primary); /* 光晕改为10px */
}

.task-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    animation: scan 2s linear infinite;
}

.task-deadline {
    color: #886633;
    font-size: 0.85rem;
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-deadline::before {
    content: '⏱️';
    font-size: 0.9rem;
}

/* ========== 卡片深色模式（.dark）覆盖 ========== */
.dark .role-card {
    --role-primary: #ff4d5a;          /* 亮红 */
    --role-secondary: #ff8c42;        /* 亮橙 */
    --role-accent: #ffbb33;           /* 亮金 */
    --role-bg: linear-gradient(135deg, 
        rgba(40, 20, 15, 0.85) 0%, 
        rgba(60, 30, 20, 0.9) 100%);
    --role-border: 1px solid rgba(255, 77, 90, 0.6);
    --role-glow: rgba(255, 77, 90, 0.3);
    --role-grid: rgba(255, 77, 90, 0.1);
    
    background: var(--role-bg);
    border: var(--role-border);
    box-shadow: 
        0 0 10px var(--role-glow),
        inset 0 0 10px rgba(255, 77, 90, 0.1);
}

.dark .role-card .title {
    color: var(--role-primary);
    text-shadow: 0 0 10px var(--role-primary);
}

.dark .role-card:hover {
    box-shadow: 
        0 0 10px rgba(255, 77, 90, 0.4),
        inset 0 0 10px rgba(255, 77, 90, 0.15);
    border-color: rgba(255, 77, 90, 0.8);
}

/* ------ user-card 深色模式 ------ */
.dark .user-card {
    --user-primary: #5c8cff;          /* 亮蓝 */
    --user-secondary: #aa77ff;        /* 亮紫 */
    --user-accent: #66ccff;           /* 亮青蓝 */
    --user-bg: linear-gradient(135deg, 
        rgba(15, 20, 40, 0.85) 0%, 
        rgba(30, 20, 60, 0.9) 100%);
    --user-border: 1px solid rgba(92, 140, 255, 0.6);
    --user-glow: rgba(92, 140, 255, 0.3);
    --user-grid: rgba(92, 140, 255, 0.1);
    
    background: var(--user-bg);
    border: var(--user-border);
    box-shadow: 
        0 0 10px var(--user-glow),
        inset 0 0 10px rgba(92, 140, 255, 0.1);
}

.dark .user-card .title {
    color: var(--user-primary);
    text-shadow: 0 0 10px var(--user-primary);
}

.dark .user-card:hover {
    box-shadow: 
        0 0 10px rgba(92, 140, 255, 0.4),
        inset 0 0 10px rgba(92, 140, 255, 0.15);
    border-color: rgba(92, 140, 255, 0.8);
}

.dark .health .stat-label {
    color: var(--role-primary);
    text-shadow: 0 0 3px rgba(255, 0, 85, 0.9);
    border-left-color: var(--role-primary);
    background: rgba(255, 0, 85, 0.2);
}

.dark .energy .stat-label {
    color: var(--role-secondary);
    text-shadow: 0 0 3px rgba(0, 217, 255, 0.9);
    border-left-color: var(--role-secondary);
    background: rgba(0, 217, 255, 0.2);
}

.dark .soul .stat-label {
    color: var(--role-accent);
    text-shadow: 0 0 3px rgba(255, 221, 0, 0.9);
    border-left-color: var(--role-accent);
    background: rgba(255, 221, 0, 0.2);
}

.dark .progress-container {
    background: rgba(40, 10, 30, 0.6);
    border: 1px solid rgba(255, 0, 85, 0.4);
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.9), /* 内阴影改为10px */
        0 0 8px rgba(255, 0, 85, 0.2);
}

.dark .progress-value {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.5);
}

.dark .health .progress-fill {
    background: linear-gradient(90deg,
        rgba(255, 0, 85, 0.4),
        var(--role-primary) 70%);
    box-shadow: 0 0 8px rgba(255, 0, 85, 0.5);
}

.dark .energy .progress-fill {
    background: linear-gradient(90deg,
        rgba(0, 217, 255, 0.4),
        var(--role-secondary) 70%);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.5);
}

.dark .soul .progress-fill {
    background: linear-gradient(90deg,
        rgba(255, 221, 0, 0.4),
        var(--role-accent) 70%);
    box-shadow: 0 0 8px rgba(255, 221, 0, 0.5);
}

/* 新闻卡片深色 */
.dark .news-card {
    --news-primary: #00ffa2;
    --news-secondary: #6c8cff;
    --news-bg: linear-gradient(135deg, 
        rgba(10, 20, 40, 0.85) 0%, 
        rgba(20, 30, 60, 0.9) 100%);
    --news-border: 1px solid rgba(0, 255, 162, 0.5);
    --news-glow: rgba(0, 255, 162, 0.25);
    --news-grid: rgba(0, 255, 162, 0.08);
    
    background: var(--news-bg);
    border: var(--news-border);
    box-shadow: 
        0 0 10px var(--news-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 255, 162, 0.08); /* 内阴影改为10px */
}

.dark .news-card .title {
    color: var(--news-primary);
    text-shadow: 0 0 10px var(--news-primary); /* 改为10px */
}

.dark .news-card:hover {
    box-shadow: 
        0 0 10px rgba(0, 255, 162, 0.35), /* 光晕改为10px */
        inset 0 0 10px rgba(0, 255, 162, 0.12); /* 内阴影改为10px */
    border-color: rgba(0, 255, 162, 0.7);
}

.dark .news-title {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.dark .news-content {
    color: #b8c0ff;
    background: rgba(0, 0, 0, 0.25);
}

.dark .news-source {
    color: var(--news-primary);
}

.dark .news-date {
    color: var(--news-secondary);
}

.dark .news-tag {
    background: rgba(0, 255, 162, 0.15);
    color: var(--news-primary);
    border: 1px solid rgba(0, 255, 162, 0.3);
}

/* SMS卡片深色 */
.dark .sms-card {
    --sms-primary: #9b5dff;
    --sms-secondary: #c96dff;
    --sms-bg: linear-gradient(135deg, 
        rgba(40, 20, 60, 0.85) 0%, 
        rgba(60, 30, 80, 0.9) 100%);
    --sms-border: 1px solid rgba(155, 93, 255, 0.5);
    --sms-glow: rgba(155, 93, 255, 0.25);
    --sms-grid: rgba(155, 93, 255, 0.1);
    
    background: var(--sms-bg);
    border: var(--sms-border);
    box-shadow: 
        0 0 10px var(--sms-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(155, 93, 255, 0.1); /* 内阴影改为10px */
}

.dark .sms-card .title {
    color: var(--sms-primary);
    text-shadow: 0 0 10px var(--sms-primary); /* 改为10px */
}

.dark .sms-card:hover {
    box-shadow: 
        0 0 10px rgba(155, 93, 255, 0.35), /* 光晕改为10px */
        inset 0 0 10px rgba(155, 93, 255, 0.15); /* 内阴影改为10px */
    border-color: rgba(155, 93, 255, 0.7);
}

.dark .sms-sent {
    background: rgba(155, 93, 255, 0.2);
    border: 1px solid var(--sms-primary);
    box-shadow: 
        0 0 10px rgba(155, 93, 255, 0.3), /* 光晕改为10px */
        inset 0 0 10px rgba(155, 93, 255, 0.1); /* 内阴影改为10px */
}

.dark .sms-received {
    background: rgba(201, 109, 255, 0.2);
    border: 1px solid var(--sms-secondary);
    box-shadow: 
        0 0 10px rgba(201, 109, 255, 0.3), /* 光晕改为10px */
        inset 0 0 10px rgba(201, 109, 255, 0.1); /* 内阴影改为10px */
}

.dark .sms-content {
    color: #ffffff;
}

.dark .sms-time {
    color: #c0a0ff;
}

.dark .sms-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--sms-primary);
    color: #ffffff;
}

.dark .sms-input:focus {
    border-color: var(--sms-secondary);
    box-shadow: 0 0 10px rgba(201, 109, 255, 0.3); /* 光晕改为10px */
    background: rgba(0, 0, 0, 0.4);
}

/* 任务卡片深色 */
.dark .task-card {
    --task-primary: #ffaa00;
    --task-secondary: #ff7b00;
    --task-accent: #ff3c7c;
    --task-bg: linear-gradient(135deg, 
        rgba(40, 30, 10, 0.85) 0%, 
        rgba(60, 40, 15, 0.9) 100%);
    --task-border: 1px solid rgba(255, 170, 0, 0.6);
    --task-glow: rgba(255, 170, 0, 0.25);
    --task-grid: rgba(255, 170, 0, 0.1);
    
    background: var(--task-bg);
    border: var(--task-border);
    box-shadow: 
        0 0 10px var(--task-glow), /* 光晕改为10px */
        inset 0 0 10px rgba(255, 170, 0, 0.1); /* 内阴影改为10px */
}

.dark .task-card .title {
    color: var(--task-primary);
    text-shadow: 0 0 10px var(--task-primary); /* 改为10px */
}

.dark .task-card:hover {
    box-shadow: 
        0 0 10px rgba(255, 170, 0, 0.35), /* 光晕改为10px */
        inset 0 0 10px rgba(255, 170, 0, 0.15); /* 内阴影改为10px */
    border-color: rgba(255, 170, 0, 0.8);
}

.dark .task-item {
    background: rgba(50, 35, 15, 0.6);
    border: 1px solid rgba(255, 170, 0, 0.4);
}

.dark .task-item:hover {
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3); /* 光晕改为10px */
    border-color: var(--task-primary);
}

.dark .task-title {
    color: #ffffff;
}

.dark .task-description {
    color: #ffd8a0;
}

.dark .task-deadline {
    color: #ffcc80;
}

.dark .priority-high {
    background: rgba(255, 60, 124, 0.25);
    color: var(--task-accent);
    border: 1px solid rgba(255, 60, 124, 0.5);
}

.dark .priority-medium {
    background: rgba(255, 170, 0, 0.25);
    color: var(--task-primary);
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.dark .priority-low {
    background: rgba(255, 123, 0, 0.25);
    color: var(--task-secondary);
    border: 1px solid rgba(255, 123, 0, 0.5);
}

.dark .status-pending {
    background: rgba(255, 170, 0, 0.2);
    color: var(--task-primary);
    border: 1px solid rgba(255, 170, 0, 0.4);
}

.dark .status-progress {
    background: rgba(255, 123, 0, 0.2);
    color: var(--task-secondary);
    border: 1px solid rgba(255, 123, 0, 0.4);
}

.dark .status-completed {
    background: rgba(100, 255, 100, 0.2);
    color: #00ff88;
    border: 1px solid rgba(100, 255, 100, 0.4);
}

.dark .status-failed {
    background: rgba(255, 60, 124, 0.2);
    color: var(--task-accent);
    border: 1px solid rgba(255, 60, 124, 0.4);
}

.dark .task-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.dark .task-progress-fill {
    background: linear-gradient(90deg, var(--task-primary), var(--task-secondary));
    box-shadow: 0 0 10px var(--task-primary); /* 光晕改为10px */
}

/* 全局深色微调（可选） */
.dark .role-card > .title,
.dark .news-card > .title,
.dark .sms-card > .title,
.dark .task-card > .title {
    color: var(--role-primary, #ff0055) /* 各卡片会覆盖 */;
}

@keyframes shimmer {
    0% { opacity: 0.2; }
    50% { opacity: 0.4; }
    100% { opacity: 0.2; }
}

/* 响应式设计（保留，与深色模式无关） */
@media (max-width: 768px) {
    details {
        margin: 2px 0;
    }
    
    details > *:not(summary) {
        margin: 2px 0;
        font-size: 0.95em;
    }
    
    details summary {
        padding: 2px 6px;
        font-size: 1em;
    }
    
    .user-card,
    .role-card,
    .news-card,
    .sms-card,
    .task-card {
        padding: 2px;
        margin: 2px 0;
        font-size: 0.95em;
    }
    
    .progress-container {
        height: 22px;
        padding-left: 55px;
    }
    
    .sms-message {
        max-width: 90%;
    }
    
    .task-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .news-title {
        font-size: 1em;
    }
    
    .sms-input {
        padding: 8px;
        min-height: 50px;
        font-size: 0.9em;
    }
    
    .task-item {
        padding: 10px;
    }
    
    .task-title {
        font-size: 1em;
    }
}

/* ========== 行动选项（.act-opt） ========== */
.act-opt {
    --act-primary: #00aaff;
    --act-secondary: #6677ff;
    --act-bg: linear-gradient(135deg, 
        rgba(230, 248, 255, 0.85) 0%, 
        rgba(240, 245, 255, 0.90) 100%);
    --act-border: 1px solid rgba(0, 170, 255, 0.4);
    --act-glow: rgba(0, 170, 255, 0.2);
    --act-grid: rgba(0, 170, 255, 0.06);

    display: inline-block;
    padding: 12px 24px;
    margin: 6px 4px;
    border-radius: 8px;
    background: var(--act-bg);
    border: var(--act-border);
    box-shadow: 
        0 0 12px var(--act-glow),
        inset 0 0 8px rgba(0, 170, 255, 0.04);
    color: #0a2a4a;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    user-select: none;
    backdrop-filter: blur(4px);
}

/* 微网格背景（浅色） */
.act-opt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--act-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--act-grid) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* 悬浮光晕扫描线（装饰） */
.act-opt::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(0, 200, 255, 0.06) 50%,
        transparent 60%
    );
    animation: actScan 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes actScan {
    0% { transform: translateY(-100%) rotate(30deg); }
    100% { transform: translateY(100%) rotate(30deg); }
}

/* 内容放在上层 */
.act-opt > * {
    position: relative;
    z-index: 1;
}

/* ---- 悬停效果 ---- */
.act-opt:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, 
        rgba(220, 245, 255, 0.95) 0%, 
        rgba(235, 240, 255, 0.98) 100%);
    border-color: rgba(0, 170, 255, 0.7);
    box-shadow: 
        0 0 20px rgba(0, 170, 255, 0.4),
        inset 0 0 12px rgba(0, 170, 255, 0.08);
    color: #003366;
}

/* ---- 点击/激活效果 ---- */
.act-opt:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 
        0 0 8px rgba(0, 170, 255, 0.3),
        inset 0 2px 8px rgba(0, 0, 0, 0.05);
    transition-duration: 0.08s;
}

/* ---- 选中状态（添加 .active 类） ---- */
.act-opt.active {
    --act-primary: #0077ff;
    background: linear-gradient(135deg, 
        rgba(200, 235, 255, 0.95) 0%, 
        rgba(220, 230, 255, 0.98) 100%);
    border-color: var(--act-primary);
    box-shadow: 
        0 0 24px rgba(0, 119, 255, 0.5),
        inset 0 0 16px rgba(0, 119, 255, 0.12);
    color: #001a4a;
    animation: actPulse 2s infinite ease-in-out;
}

@keyframes actPulse {
    0%, 100% { box-shadow: 0 0 24px rgba(0, 119, 255, 0.4); }
    50% { box-shadow: 0 0 36px rgba(0, 119, 255, 0.7); }
}

/* ---- 深色模式 ---- */
.dark .act-opt {
    --act-bg: linear-gradient(135deg, 
        rgba(15, 30, 60, 0.85) 0%, 
        rgba(25, 35, 70, 0.90) 100%);
    --act-border: 1px solid rgba(0, 170, 255, 0.5);
    --act-glow: rgba(0, 170, 255, 0.3);
    --act-grid: rgba(0, 170, 255, 0.12);
    color: #c0e0ff;
}

.dark .act-opt:hover {
    background: linear-gradient(135deg, 
        rgba(25, 50, 90, 0.95) 0%, 
        rgba(35, 45, 100, 0.98) 100%);
    border-color: rgba(0, 200, 255, 0.8);
    box-shadow: 
        0 0 28px rgba(0, 170, 255, 0.5),
        inset 0 0 16px rgba(0, 170, 255, 0.15);
    color: #ffffff;
}

.dark .act-opt.active {
    background: linear-gradient(135deg, 
        rgba(30, 60, 120, 0.95) 0%, 
        rgba(50, 50, 140, 0.98) 100%);
    border-color: #00ccff;
    box-shadow: 
        0 0 32px rgba(0, 200, 255, 0.6),
        inset 0 0 20px rgba(0, 200, 255, 0.2);
    color: #ffffff;
}

/* ---- 小屏幕适配 ---- */
@media (max-width: 768px) {
    .act-opt {
        padding: 4px 8px;
        font-size: 0.9rem;
        margin: 4px 2px;
    }
}

/* ====== 对话行容器 - 科幻硬朗版（姓名框无光晕） ====== */
.npc-talk,
.my-talk {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
    max-width: 100%;
}

.npc-talk {
    flex-direction: row !important;
}

.my-talk {
    flex-direction: row-reverse !important;
}

/* ====== 姓名框 · 无光晕 · 高对比硬朗直角 ====== */
.npc-name,
.my-name {
    flex-shrink: 0;
    padding: 8px 16px;
    font-weight: 800;
    font-size: 1em;
    letter-spacing: 0.6px;
    line-height: 1.4;
    margin-top: 2px;
    max-width: 100px;
    word-break: break-all;
    border: 2px solid;
    border-radius: 0 !important;      /* 强制直角 */
    color: #ffffff !important;        /* 纯白文字，最高对比 */
    text-shadow: none !important;     /* 移除文字发光 */
    cursor: default;
    user-select: none;
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: none;            /* 去掉模糊，保证清晰 */
    -webkit-backdrop-filter: none;
    transition: all 0.15s ease;
    transform: translateY(0);
}

/* ---- 🚀 NPC 姓名 · 橙色边框 + 实色阴影 ---- */
.npc-name {
    border-color: #ff8800;
    background: rgba(30, 15, 5, 0.95);
    box-shadow: 4px 4px 0 #b35f00;   /* 实色偏移，无模糊光晕 */
}

.npc-name:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #b35f00;
}

.npc-name:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0 #b35f00;
}

/* ---- 🚀 用户姓名 · 蓝色边框 + 实色阴影 ---- */
.my-name {
    border-color: #2d7aff;
    background: rgba(5, 15, 35, 0.95);
    box-shadow: 4px 4px 0 #1a4a88;
}

.my-name:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #1a4a88;
}

.my-name:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0 #1a4a88;
}

/* ====== 对话气泡 · 科幻发光边框（保留） ====== */
.talk-word {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 2px solid;
    border-radius: 2px;             /* 极微圆角，保持硬朗 */
    word-wrap: break-word;
    line-height: 1.7;
    font-size: 1em;
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #0a1a2a;
    transition: box-shadow 0.2s ease;
}

/* ---- 🚀 NPC 气泡 · 橙色边框 + 暖底 ---- */
.npc-talk .talk-word {
    border-color: #ff8800;
    background: rgba(255, 240, 220, 0.90);
    color: #2a1a0a;
    box-shadow: 
        -4px 4px 0 0 #cc6600,         /* 硬朗立体偏移 */
        0 0 16px rgba(255, 136, 0, 0.25);
}

/* ---- 🚀 用户气泡 · 蓝色边框 + 冷底 ---- */
.my-talk .talk-word {
    border-color: #2d7aff;
    background: rgba(230, 242, 255, 0.90);
    color: #0a1a3a;
    box-shadow: 
        4px 4px 0 0 #1a4a88,
        0 0 16px rgba(45, 122, 255, 0.25);
}

/* ====== 箭头三角形 · 发光线条感 ====== */
.npc-talk .talk-word::before,
.npc-talk .talk-word::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 16px;
    width: 0;
    height: 0;
    border-style: solid;
}

.npc-talk .talk-word::before {
    border-width: 7px 10px 7px 0;
    border-color: transparent #ff8800 transparent transparent;
    filter: drop-shadow(-2px 0 4px #ff8800);
}

.npc-talk .talk-word::after {
    left: -6px;
    border-width: 5px 8px 5px 0;
    border-color: transparent #fff0dc transparent transparent; /* 匹配气泡底色 */
}

.my-talk .talk-word::before,
.my-talk .talk-word::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 16px;
    width: 0;
    height: 0;
    border-style: solid;
}

.my-talk .talk-word::before {
    border-width: 7px 0 7px 10px;
    border-color: transparent transparent transparent #2d7aff;
    filter: drop-shadow(2px 0 4px #2d7aff);
}

.my-talk .talk-word::after {
    right: -6px;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #e6f2ff; /* 匹配气泡底色 */
}

/* ============================================================
   🌙 深色模式 · 自动适配（姓名框依然清晰无光晕）
   ============================================================ */
.dark .npc-name {
    background: rgba(20, 10, 0, 0.96);
    border-color: #ff8800;
    box-shadow: 4px 4px 0 #b35f00;
    color: #fff;
}

.dark .npc-name:hover {
    box-shadow: 2px 2px 0 #b35f00;
}

.dark .npc-name:active {
    box-shadow: 0px 0px 0 #b35f00;
}

.dark .my-name {
    background: rgba(0, 10, 25, 0.96);
    border-color: #2d7aff;
    box-shadow: 4px 4px 0 #1a4a88;
    color: #fff;
}

.dark .my-name:hover {
    box-shadow: 2px 2px 0 #1a4a88;
}

.dark .my-name:active {
    box-shadow: 0px 0px 0 #1a4a88;
}

.dark .npc-talk .talk-word {
    border-color: #ff7700;
    background: rgba(30, 18, 8, 0.85);
    color: #f0d8b8;
    box-shadow: 
        -4px 4px 0 0 #994400,
        0 0 20px rgba(255, 119, 0, 0.30);
}

.dark .my-talk .talk-word {
    border-color: #1a6aff;
    background: rgba(8, 18, 36, 0.85);
    color: #c8d8f0;
    box-shadow: 
        4px 4px 0 0 #0a2a5a,
        0 0 20px rgba(26, 106, 255, 0.30);
}

.dark .npc-talk .talk-word::before {
    border-color: transparent #ff7700 transparent transparent;
    filter: drop-shadow(-2px 0 6px #ff7700);
}

.dark .npc-talk .talk-word::after {
    border-color: transparent #1e1208 transparent transparent;
}

.dark .my-talk .talk-word::before {
    border-color: transparent transparent transparent #1a6aff;
    filter: drop-shadow(2px 0 6px #1a6aff);
}

.dark .my-talk .talk-word::after {
    border-color: transparent transparent transparent #081224;
}

/* ============================================================
   📱 小屏幕适配 (≤768px)
   ============================================================ */
@media (max-width: 768px) {

    .npc-talk,
    .my-talk {
        gap: 8px;
        margin-bottom: 20px;
    }

    .npc-name,
    .my-name {
        font-size: 0.9em;
        padding: 4px 10px;
        max-width: 80px;
        border-width: 1.5px;
        margin-top: 0;
        box-shadow: 3px 3px 0 #b35f00; /* 小屏阴影同步缩小 */
        transform: none;
    }

    .npc-name:hover,
    .my-name:hover {
        transform: translate(1px, 1px);
        box-shadow: 2px 2px 0 #b35f00;
    }

    .npc-name:active,
    .my-name:active {
        transform: translate(3px, 3px);
        box-shadow: 0px 0px 0 #b35f00;
    }

    /* 调整小屏姓名框颜色（蓝/橙各自阴影） */
    .my-name {
        box-shadow: 3px 3px 0 #1a4a88;
    }
    .my-name:hover {
        box-shadow: 2px 2px 0 #1a4a88;
    }
    .my-name:active {
        box-shadow: 0px 0px 0 #1a4a88;
    }

    .dark .npc-name {
        box-shadow: 3px 3px 0 #b35f00;
    }
    .dark .npc-name:hover {
        box-shadow: 2px 2px 0 #b35f00;
    }
    .dark .npc-name:active {
        box-shadow: 0px 0px 0 #b35f00;
    }
    .dark .my-name {
        box-shadow: 3px 3px 0 #1a4a88;
    }
    .dark .my-name:hover {
        box-shadow: 2px 2px 0 #1a4a88;
    }
    .dark .my-name:active {
        box-shadow: 0px 0px 0 #1a4a88;
    }

    .talk-word {
        padding: 6px 10px;
        font-size: 0.95em;
        border-width: 1.5px;
        border-radius: 2px;
    }

    .npc-talk .talk-word {
        box-shadow: -3px 3px 0 0 #cc6600;
    }
    .my-talk .talk-word {
        box-shadow: 3px 3px 0 0 #1a4a88;
    }
    .dark .npc-talk .talk-word {
        box-shadow: -3px 3px 0 0 #994400;
    }
    .dark .my-talk .talk-word {
        box-shadow: 3px 3px 0 0 #0a2a5a;
    }

    /* 箭头缩小 */
    .npc-talk .talk-word::before {
        left: -8px;
        top: 12px;
        border-width: 5px 8px 5px 0;
    }
    .npc-talk .talk-word::after {
        left: -5px;
        top: 12px;
        border-width: 4px 6px 4px 0;
    }

    .my-talk .talk-word::before {
        right: -8px;
        top: 12px;
        border-width: 5px 0 5px 8px;
    }
    .my-talk .talk-word::after {
        right: -5px;
        top: 12px;
        border-width: 4px 0 4px 6px;
    }
}