/* =========================================
   1. 角色颜色与视觉层级系统 (保持原样)
   ========================================= */
u-s { color: #B8860B; display: inline; font-weight: 900; letter-spacing: 0.5px; } 
e-s { color: #D02090; display: inline; font-weight: 900; letter-spacing: 0.5px; } 
n-s { color: #0050B3; display: inline; font-weight: 900; letter-spacing: 0.5px; } 
u-a, e-a, n-a { display: inline; }
u-a i { color: #B8860B; font-style: italic; font-weight: bold; font-family: "KaiTi", "Kaiti SC", "STKaiti", serif; background: rgba(184, 134, 11, 0.08); padding: 0 4px; border-radius: 3px; }
e-a i { color: #D02090; font-style: italic; font-weight: bold; font-family: "KaiTi", "Kaiti SC", "STKaiti", serif; background: rgba(208, 32, 144, 0.08); padding: 0 4px; border-radius: 3px; }
n-a i { color: #0050B3; font-style: italic; font-weight: bold; font-family: "KaiTi", "Kaiti SC", "STKaiti", serif; background: rgba(0, 80, 179, 0.08); padding: 0 4px; border-radius: 3px; }

/* =========================================
   2. 夜间模式 (赛博霓虹觉醒) 
   ========================================= */
@media (prefers-color-scheme: dark) {
    .top-status { background: linear-gradient(90deg, rgba(255,105,180,0.15) 0%, rgba(255,255,255,0.05) 100%); border-left-color: #FF69B4; color: #eee; box-shadow: 0 2px 10px rgba(255,105,180,0.2); }
    .top-status b { color: #FF69B4; text-shadow: 0 0 5px rgba(255,105,180,0.5); }
}

/* =========================================
   🚐 模块一：房车HUD中控面板 (.hud)
   ========================================= */
.hud {
    --hud-bg: rgba(20, 25, 35, 0.75); --hud-border: rgba(56, 189, 248, 0.4); --hud-glow: rgba(56, 189, 248, 0.8); --hud-text: #e2e8f0; --hud-item-bg: rgba(0, 0, 0, 0.3);
    background: var(--hud-bg); border: 1px solid var(--hud-border); border-radius: 12px; padding: 12px; margin: 15px 0; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(56, 189, 248, 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--hud-text); font-family: 'Courier New', Courier, monospace; transition: all 0.4s ease; overflow: hidden;
}
.hud:hover { border-color: var(--hud-glow); box-shadow: 0 0 15px var(--hud-glow), inset 0 0 15px rgba(56, 189, 248, 0.2); }
.hud summary { list-style: none; cursor: pointer; font-weight: 900; font-size: 1.15em; padding: 8px 12px; background: linear-gradient(90deg, var(--hud-item-bg), transparent); border-radius: 6px; display: flex; align-items: center; outline: none; text-shadow: 0 0 5px var(--hud-glow); border-left: 4px solid var(--hud-glow); }
.hud summary::before { content: '⚡'; margin-right: 10px; font-size: 0.9em; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.hud[open] summary::before { transform: rotate(90deg) scale(1.2); text-shadow: 0 0 10px #fbbf24; }
.hud p { margin: 8px 0; padding: 8px 12px; background: var(--hud-item-bg); border-left: 2px solid var(--hud-border); border-radius: 0 6px 6px 0; font-size: 0.9em; line-height: 1.5; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.hud p:hover { transform: translateX(6px); background: rgba(56, 189, 248, 0.1); border-left-color: var(--hud-glow); }
.hud b { display: block; text-align: right; margin-top: 12px; padding-right: 10px; font-size: 0.85em; font-weight: bold; color: #ef4444; letter-spacing: 1px; animation: hud-pulse 2s infinite; }
@keyframes hud-pulse { 0% { opacity: 0.6; text-shadow: 0 0 2px rgba(239, 68, 68, 0.3); } 50% { opacity: 1; text-shadow: 0 0 12px rgba(239, 68, 68, 0.9); } 100% { opacity: 0.6; text-shadow: 0 0 2px rgba(239, 68, 68, 0.3); } }

/* =========================================
   🌌 模块二：环境、行动(ab)与记忆终端(.sys)
   ========================================= */
.sys, ab {
    --sys-bg: rgba(15, 23, 42, 0.8); --sys-border: rgba(56, 189, 248, 0.3); --sys-text: #cbd5e1; --sys-accent: rgba(56, 189, 248, 0.8); --btn-bg: rgba(255, 255, 255, 0.05);
    display: block; background: var(--sys-bg); border: 1px solid var(--sys-border); border-radius: 10px; padding: 12px; margin: 12px 0; color: var(--sys-text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); font-family: 'Courier New', Courier, monospace;
}
.sys summary { list-style: none; cursor: pointer; font-weight: bold; font-size: 1.1em; padding: 6px 10px; border-bottom: 2px solid var(--sys-border); color: var(--sys-accent); outline: none; }
bn { display: block; padding: 10px 15px; background: var(--btn-bg); border-left: 4px solid var(--sys-border); border-radius: 4px; cursor: pointer; transition: all 0.3s ease; margin: 8px 0; }
bn:hover { background: rgba(56, 189, 248, 0.15); border-color: var(--sys-accent); transform: translateX(8px); box-shadow: 0 0 10px rgba(56, 189, 248, 0.2); }
be { display: block; padding: 10px 15px; background: rgba(236, 72, 153, 0.05); border-left: 4px solid #db2777; border-radius: 4px; cursor: pointer; color: #f472b6; font-weight: bold; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); margin: 8px 0; }
be:hover { background: rgba(236, 72, 153, 0.2); border-color: #f9a8d4; transform: translateX(8px) scale(1.02); box-shadow: 0 0 15px rgba(236, 72, 153, 0.4); text-shadow: 0 0 8px rgba(244, 114, 182, 0.8); }
ql { display: block; background: var(--btn-bg); padding: 6px 10px; border-radius: 4px; margin: 4px 0; }
memory { display: block; margin-top: 15px; padding-top: 10px; border-top: 1px dashed var(--sys-border); }
memory h3 { font-size: 0.9em; color: var(--sys-accent); margin: 10px 0 5px 0; text-transform: uppercase; }
lt, st { display: block; background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 6px; font-size: 0.85em; border: 1px solid rgba(255, 255, 255, 0.05); }
lt li, st li { list-style: none; margin: 4px 0; padding-bottom: 6px; border-bottom: 1px dotted rgba(128, 128, 128, 0.3); }
lt li:last-child, st li:last-child { border-bottom: none; padding-bottom: 0; }
lt li::before { content: '💾 L2-SYS: '; color: #a855f7; font-weight: bold;}
st li::before { content: '⏱️ L1-LOG: '; color: #10b981; font-weight: bold;}

/* ☀️ 面板日间模式适配 */
@media (prefers-color-scheme: light) {
    .hud { --hud-bg: rgba(245, 247, 250, 0.85); --hud-border: rgba(14, 165, 233, 0.5); --hud-text: #1e293b; --hud-item-bg: rgba(255, 255, 255, 0.5); }
    .sys, ab { --sys-bg: rgba(248, 250, 252, 0.85); --sys-border: rgba(14, 165, 233, 0.4); --sys-text: #334155; --btn-bg: rgba(0, 0, 0, 0.03); }
    lt, st { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.1); }
}

/* =========================================
   📺 模块三：高能弹幕穿插系统 (d1-d5)
   ========================================= */
d1, d2, d3, d4, d5 {
    display: block; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px; padding: 6px 16px; margin: 12px auto; width: fit-content; max-width: 90%; font-size: 0.9em; font-family: 'Microsoft YaHei', sans-serif; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: danmaku-slide-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0;
}
@keyframes danmaku-slide-in { 0% { opacity: 0; transform: translateX(30px) scale(0.9); } 100% { opacity: 1; transform: translateX(0) scale(1); } }
d1::before, d2::before, d3::before, d4::before, d5::before { content: '💬'; margin-right: 6px; font-size: 0.9em; filter: drop-shadow(0 0 2px rgba(255,255,255,0.5)); }

d1 { color: #2dd4bf; text-shadow: 0 0 6px rgba(45, 212, 191, 0.6); } /* 指导党 */
d2 { color: #f472b6; text-shadow: 0 0 8px rgba(244, 114, 182, 0.8); font-weight: bold; } /* 色情党 */
d3 { color: #fbbf24; text-shadow: 0 0 6px rgba(251, 191, 36, 0.6); } /* 数据党 */
d4 { color: #ef4444; text-shadow: 0 0 8px rgba(239, 68, 68, 0.8); font-weight: bold; } /* 乐子人 */
d5 { color: #c084fc; text-shadow: 0 0 6px rgba(192, 132, 252, 0.6); font-style: italic; } /* 剧透党 */

/* =========================================
   👥 模块四：房车全员肉体扫描终端 (.cp & mc)
   ========================================= */
.cp { background: rgba(15, 20, 30, 0.85); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 10px; padding: 12px; margin: 15px 0; color: #cbd5e1; font-family: 'Courier New', Courier, monospace; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }
.cp summary { list-style: none; cursor: pointer; font-weight: bold; font-size: 1.1em; padding: 8px 10px; border-bottom: 2px solid rgba(56, 189, 248, 0.5); color: #38bdf8; outline: none; text-shadow: 0 0 5px rgba(56, 189, 248, 0.5); }
mc { display: block; background: rgba(0, 0, 0, 0.4); border-left: 3px solid #38bdf8; border-radius: 4px; padding: 10px; margin: 12px 0; transition: all 0.3s ease; }
mc:hover { background: rgba(56, 189, 248, 0.05); border-left-color: #f472b6; transform: translateX(4px); }
mc p { margin: 4px 0; font-size: 0.85em; line-height: 1.4; border-bottom: 1px dotted rgba(255, 255, 255, 0.1); padding-bottom: 4px; }
mc p:last-child { border-bottom: none; }
ml { display: block; margin-top: 8px; color: #fbbf24; background: rgba(251, 191, 36, 0.1); padding: 5px 8px !important; border-radius: 3px; border-left: 3px solid #fbbf24; font-weight: bold; box-shadow: inset 0 0 5px rgba(251, 191, 36, 0.05); }
ml i { font-style: normal; font-family: inherit; letter-spacing: 0.5px; text-shadow: 0 0 2px rgba(0,0,0,0.8); }

/* ☀️ 日间模式适配 */
@media (prefers-color-scheme: light) {
    .cp { background: rgba(248, 250, 252, 0.9); border-color: rgba(14, 165, 233, 0.4); color: #334155; }
    mc { background: rgba(0, 0, 0, 0.03); border-color: #0ea5e9; }
    ml { color: #d97706; background: rgba(217, 119, 6, 0.08); border-left-color: #d97706; }
}