ai {
    display: block;
    background: #0a0a0a;
    color: #b09a73;
    padding: 12px;
    border: 1px solid #332222;
    border-top: 4px solid #8a0303;
    font-family: 'Noto Serif SC', 'SimSun', serif;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* 后台极秘水印 */
ai::before {
    content: "極秘";
    position: absolute;
    right: -15px;
    top: -20px;
    font-size: 80px;
    color: rgba(138, 3, 3, 0.04);
    transform: rotate(-15deg);
    pointer-events: none;
    font-weight: bold;
    letter-spacing: 5px;
    z-index: 0;
}

/* 新增：战火余烬 (火星微动画) */
ai::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: transparent;
    /* 利用多重阴影绘制分布在底部的火星群 */
    box-shadow: 
        20px 0px 2px #ff3300, 80px 10px 1px #ff5500, 
        150px -5px 2px #ff1100, 210px 15px 1px #ffaa00, 
        280px 5px 3px #ff3300, 350px 12px 1px #ff5500, 
        420px -2px 2px #ff1100, 500px 8px 1px #ffaa00, 
        580px 4px 2px #ff3300, 650px 18px 1px #ff5500;
    animation: ashes-rise 4s infinite linear;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

@keyframes ashes-rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-100px) scale(0.5); opacity: 0; }
}

ai hd {
    display: block;
    text-align: center;
    color: #8a0303;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1px dashed #332222;
    padding-bottom: 6px;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(138,3,3,0.3);
    position: relative;
    z-index: 1;
}

ai article {
    display: block;
    color: #d9c5a0;
    margin-bottom: 15px;
    text-align: justify;
    position: relative;
    z-index: 1;
}

ai details {
    background: rgba(20,20,20,0.9);
    border: 1px solid #332222;
    padding: 10px;
    position: relative;
    z-index: 1;
}

ai summary {
    color: #8a0303;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #332222;
    padding-bottom: 5px;
    list-style: none;
    outline: none;
}

ai summary::-webkit-details-marker { display: none; }
ai summary::before { content: "▼"; margin-right: 6px; font-size: 12px; }
ai details[open] summary::before { content: "▲"; }

ai p {
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

ai p::before {
    content: "【" attr(t) "】";
    display: block;
    width: 100%;
    color: #8a0303;
    font-size: 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid #221111;
    padding-bottom: 2px;
}

/* 角色姓名 */
ai f {
    font-weight: bold;
    color: #d9c5a0;
    width: 100%;
    font-size: 16px;
    text-shadow: 0 0 4px rgba(138,3,3,0.5);
    position: relative;
    display: block;
    overflow: hidden;
}

/* 新增：阵营专属暗纹徽记（伪元素绘制，绝对定位在名字右侧） */
ai f::after {
    position: absolute;
    right: 5px;
    top: -15px;
    font-size: 45px;
    color: rgba(138, 3, 3, 0.12);
    z-index: -1;
    pointer-events: none;
}
/* 海军 - 船锚与樱花意象 */
ai f[fac="navy"]::after { content: "⚓"; transform: rotate(15deg); }
/* 陆军 - 刺目的五芒星 */
ai f[fac="army"]::after { content: "★"; transform: rotate(-10deg); top: -20px; font-size: 50px; }
/* 宪兵特高课 - 监视之眼/鹰 */
ai f[fac="police"]::after { content: "👁"; font-size: 40px; top: -10px; }
/* 后方平民 - 凋零的稻穗/樱 */
ai f[fac="civil"]::after { content: "💮"; transform: rotate(45deg); opacity: 0.5; }

ai d {
    font-size: 12px;
    background: rgba(138,3,3,0.05);
    padding: 3px 8px;
    border: 1px solid #332222;
    border-radius: 2px;
    color: #aaa;
    transition: all 0.3s ease;
}

ai d:hover {
    background: rgba(138,3,3,0.15);
    color: #fff;
    border-color: #8a0303;
}

/* 危急流血状态 */
ai d[alert] {
    background: rgba(138,3,3,0.2);
    border-color: #8a0303;
    color: #d9c5a0;
    box-shadow: inset 0 0 5px rgba(138,3,3,0.5);
    animation: blood-pulse 2s infinite;
}

@keyframes blood-pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; border-color: #b00; }
    100% { opacity: 0.7; }
}