/* ============================================================
   四轮竞速 · 赛车风格（午夜霓虹街头版）
   只替换CSS，HTML结构不变
   设计方向：地下飙车 / 霓虹街头 / 赛博速度感
   ============================================================ */

/* 卡片容器 —— 午夜街头赛车面板 */
.topic_wrap {
    position: relative;
    /* 深紫黑到霓虹蓝的渐变，像午夜街头 */
    background:
        radial-gradient(ellipse at 15% 20%, rgba(255, 0, 128, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 80%, rgba(0, 200, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(120, 0, 200, 0.08) 0%, transparent 60%),
        linear-gradient(175deg, #0a0612 0%, #120a1e 40%, #0d0818 70%, #060310 100%);

    /* 紫粉霓虹边框，像街头霓虹灯管 */
    border: 1px solid rgba(255, 0, 128, 0.5);
    box-shadow:
        0 0 0 1px rgba(255, 0, 128, 0.15),
        inset 0 0 40px rgba(255, 0, 128, 0.06),
        inset 0 0 80px rgba(0, 200, 255, 0.05),
        inset 0 0 120px rgba(0, 0, 0, 0.85);
    margin: 0 auto;
    transition: all 0.35s ease;
    perspective: 1000px;
}

/* 标题 —— 地下飙车标题 */
.topic_wrap .title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    /* 粗黑斜体，像街头涂鸦/赛车游戏标题 */
    font-family: 'Impact', 'Arial Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-style: italic;
    color: #f0e8ff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(255, 0, 128, 0.7),
        0 0 20px rgba(255, 0, 128, 0.4),
        0 0 40px rgba(0, 200, 255, 0.2),
        2px 2px 0 #1a0a20,
        0 2px 4px rgba(0, 0, 0, 0.9);
    /* 底部紫粉线，像霓虹灯管 */
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 0, 128, 0.6);
    position: relative;
    transform: skewX(-6deg);
    animation: neon-title 2.5s ease-in-out infinite;
}

/* 标题下方的青色装饰线，像霓虹副灯 */
.topic_wrap .title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00c8ff, #40e0ff, #00c8ff, transparent);
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.6);
}

@keyframes neon-title {
    0%, 100% {
        text-shadow:
            0 0 8px rgba(255, 0, 128, 0.7),
            0 0 20px rgba(255, 0, 128, 0.4),
            0 0 40px rgba(0, 200, 255, 0.2),
            2px 2px 0 #1a0a20,
            0 2px 4px rgba(0, 0, 0, 0.9);
    }
    50% {
        text-shadow:
            0 0 12px rgba(255, 0, 128, 0.9),
            0 0 30px rgba(255, 0, 128, 0.6),
            0 0 60px rgba(0, 200, 255, 0.3),
            2px 2px 0 #1a0a20,
            0 2px 4px rgba(0, 0, 0, 0.9);
    }
}

/* 打字机容器 */
.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(255, 0, 128, 0.4) 15%,
        #ff0080 35%,
        #00c8ff 65%,
        rgba(0, 200, 255, 0.4) 85%,
        transparent 100%);
    margin-bottom: 10px;
    border-radius: 2px;
    opacity: 0.9;
    box-shadow:
        0 0 8px rgba(255, 0, 128, 0.6),
        0 0 16px rgba(0, 200, 255, 0.4);
    background-size: 200% 100%;
    animation: neon-flow 2.5s linear infinite;
}

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

/* 打字机核心 —— 街头赛车文字 */
.typewriter {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    /* 粗黑斜体，速度感 */
    font-family: 'Impact', 'Arial Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-style: italic;
    color: #f0e8ff;
    text-shadow:
        0 0 5px rgba(255, 0, 128, 0.6),
        0 0 15px rgba(255, 0, 128, 0.3),
        0 0 30px rgba(0, 200, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.12em solid #ff0080; /* 粉红光标，像霓虹尾灯 */
    width: 0;
    transform: skewX(-4deg);

    animation:
        typing 2.5s steps(10, end) forwards,
        blink-caret 0.6s step-end infinite,
        neon-flicker 3s 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: #ff0080; }
}

/* 霓虹闪烁 —— 像街头霓虹灯不稳定 */
@keyframes neon-flicker {
    0%, 100% {
        opacity: 1;
    }
    3% { opacity: 0.8; }
    5% { opacity: 1; }
    48% { opacity: 1; }
    49% { opacity: 0.7; }
    50% { opacity: 1; }
    82% { opacity: 1; }
    83% { opacity: 0.85; }
    84% { opacity: 1; }
}

/* 伪元素 —— 右上角"MIDNIGHT RUN"标识 */
.topic_wrap::before {
    content: 'MIDNIGHT RUN';
    position: absolute;
    top: 10px;
    right: 16px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-style: italic;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #ff0080;
    transform: skewX(-6deg);
    pointer-events: none;
    z-index: 0;
    border: 2px solid rgba(255, 0, 128, 0.6);
    padding: 2px 8px;
    background: rgba(10, 6, 18, 0.8);
    box-shadow:
        0 0 10px rgba(255, 0, 128, 0.4),
        inset 0 0 10px rgba(255, 0, 128, 0.1);
    text-shadow: 0 0 8px rgba(255, 0, 128, 0.8);
}

/* 伪元素 —— 左下角"NITRO · NOS"氮气状态 */
.topic_wrap::after {
    content: 'NITRO READY · NOS ARMED';
    position: absolute;
    bottom: 10px;
    left: 16px;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: rgba(0, 200, 255, 0.55);
    pointer-events: none;
    z-index: 0;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.6);
}

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