/* ============================================================
   刺客暗杀风格 · 潜行刺杀
   只替换CSS，HTML结构不变
   设计方向：潜行暗杀 / 冷峻隐秘 / 危险感
   ============================================================ */

/* 卡片容器 —— 刺客暗杀面板 */
.topic_wrap {
    position: relative;
    /* 深墨绿到暗黑的渐变，像刺客的夜行衣/暗巷 */
    background:
        radial-gradient(ellipse at 15% 20%, rgba(0, 255, 120, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 80%, rgba(200, 0, 0, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(20, 40, 30, 0.5) 0%, transparent 70%),
        linear-gradient(175deg, #060a08 0%, #0c1410 40%, #080e0a 70%, #030504 100%);

    /* 暗绿 + 暗红双层边框，像刺客袖剑/毒刃 */
    border: 1px solid #2a6a3a;
    box-shadow:
        inset 0 0 50px rgba(0, 255, 120, 0.04),
        inset 0 0 120px rgba(0, 0, 0, 0.9);
    margin: 0 auto;
    transition: all 0.35s ease;
    perspective: 1000px;
    /* 背景中隐约的菱形暗纹，像刺客信条 */
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 20px,
            rgba(42, 106, 58, 0.03) 20px,
            rgba(42, 106, 58, 0.03) 21px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0px,
            transparent 20px,
            rgba(42, 106, 58, 0.03) 20px,
            rgba(42, 106, 58, 0.03) 21px
        );
}

/* 标题 —— 刺客暗杀标题 */
.topic_wrap .title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    /* 锐利衬线/窄体，像刺客信条的UI */
    font-family: 'Cinzel', 'Trajan Pro', 'Georgia', 'Songti SC', 'SimSun', serif;
    color: #d0e8d8;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(0, 255, 120, 0.4),
        0 0 20px rgba(0, 255, 120, 0.2),
        0 0 40px rgba(200, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.95);
    /* 底部暗绿线，像刺客的标记 */
    padding-bottom: 8px;
    border-bottom: 1px solid #2a6a3a;
    position: relative;
    animation: assassin-title-glow 3.5s ease-in-out infinite;
}

/* 标题下方的暗红装饰线，像血迹 */
.topic_wrap .title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a1a1a, #c02020, #8a1a1a, transparent);
    opacity: 0.7;
    box-shadow: 0 0 8px rgba(200, 32, 32, 0.6);
}

@keyframes assassin-title-glow {
    0%, 100% {
        text-shadow:
            0 0 8px rgba(0, 255, 120, 0.4),
            0 0 20px rgba(0, 255, 120, 0.2),
            0 0 40px rgba(200, 0, 0, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.95);
    }
    50% {
        text-shadow:
            0 0 12px rgba(0, 255, 120, 0.6),
            0 0 30px rgba(0, 255, 120, 0.35),
            0 0 60px rgba(200, 0, 0, 0.25),
            0 2px 4px rgba(0, 0, 0, 0.95);
    }
}

/* 打字机容器 */
.typewriter-container {
    width: fit-content;
    margin: 0 auto;
    position: relative;
}

/* 顶部装饰 —— 刺客能量/血量条 */
.typewriter-container::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(42, 106, 58, 0.5) 20%,
        #2a6a3a 40%,
        #8a1a1a 60%,
        rgba(138, 26, 26, 0.5) 80%,
        transparent 100%);
    margin-bottom: 10px;
    border-radius: 1px;
    opacity: 0.9;
    box-shadow:
        0 0 8px rgba(42, 106, 58, 0.5),
        0 0 16px rgba(138, 26, 26, 0.4);
    background-size: 200% 100%;
    animation: assassin-energy-flow 4s linear infinite;
}

@keyframes assassin-energy-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 打字机核心 —— 刺客暗杀文字 */
.typewriter {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.15em;
    /* 锐利衬线/窄体，像刺客的密令 */
    font-family: 'Cinzel', 'Trajan Pro', 'Georgia', 'Songti SC', 'SimSun', serif;
    color: #d0e8d8;
    text-shadow:
        0 0 5px rgba(0, 255, 120, 0.5),
        0 0 15px rgba(0, 255, 120, 0.25),
        0 0 30px rgba(200, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.95);
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.12em solid #2a6a3a; /* 暗绿光标，像毒刃 */
    width: 0;

    animation:
        typing 2.5s steps(10, end) forwards,
        blink-caret 0.8s step-end infinite,
        assassin-flicker 5s ease-in-out infinite;
}

/* 打字动画 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* 光标闪烁 —— 暗绿 */
@keyframes blink-caret {
    from, to { border-right-color: transparent; }
    50% { border-right-color: #2a6a3a; }
}

/* 潜行闪烁 —— 像刺客在暗影中呼吸 */
@keyframes assassin-flicker {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 5px rgba(0, 255, 120, 0.5),
            0 0 15px rgba(0, 255, 120, 0.25),
            0 0 30px rgba(200, 0, 0, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.95);
    }
    50% {
        opacity: 0.92;
        text-shadow:
            0 0 8px rgba(0, 255, 120, 0.7),
            0 0 20px rgba(0, 255, 120, 0.4),
            0 0 40px rgba(200, 0, 0, 0.25),
            0 2px 4px rgba(0, 0, 0, 0.95);
    }
}

/* 伪元素 —— 右上角"TARGET"目标标识 */
.topic_wrap::before {
    content: 'TARGET';
    position: absolute;
    top: 10px;
    right: 16px;
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #c02020;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(192, 32, 32, 0.5);
    padding: 2px 8px;
    background: rgba(6, 10, 8, 0.85);
    box-shadow:
        0 0 10px rgba(192, 32, 32, 0.25),
        inset 0 0 10px rgba(192, 32, 32, 0.1);
    text-shadow: 0 0 8px rgba(192, 32, 32, 0.8);
    animation: target-pulse 2s ease-in-out infinite;
}

@keyframes target-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 伪元素 —— 左下角"STEALTH · ASSASSIN"状态 */
.topic_wrap::after {
    content: 'STEALTH · ASSASSIN';
    position: absolute;
    bottom: 10px;
    left: 16px;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(42, 106, 58, 0.6);
    pointer-events: none;
    z-index: 0;
    text-shadow: 0 0 6px rgba(42, 106, 58, 0.5);
}

/* 确保内容在伪元素之上 */
.topic_wrap > * {
    position: relative;
    z-index: 1;
}