/* ============================================================
   真人影游风格 · 简约白色系（轻盈都市版）
   只替换CSS，HTML结构不变
   设计方向：年轻都市 / 轻盈通透 / 恋爱互动
   ============================================================ */

/* 卡片容器 —— 轻盈都市对话面板 */
.topic_wrap {
    position: relative;
    /* 纯净白底，带极淡的粉蓝渐变，像清晨的天空 */
    background:
        radial-gradient(ellipse at 20% 10%, rgba(255, 220, 235, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(220, 235, 255, 0.35) 0%, transparent 50%),
        linear-gradient(175deg, #ffffff 0%, #fefdff 40%, #fdfcfe 70%, #fcfbfd 100%);
    /* 极细的淡粉边框，温柔不张扬 */
    border: 1px solid #f5e8f0;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

/* 标题 —— 轻盈都市影游标题 */
.topic_wrap .title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    /* 干净圆润的无衬线，像现代恋爱影游 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #3a3038;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: none;
    /* 底部极细的淡粉线 */
    padding-bottom: 10px;
    border-bottom: 1px solid #f5e8f0;
    position: relative;
}

/* 标题下方的小装饰，像对话的心动标记 */
.topic_wrap .title::after {
    content: '♡';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #f0a8c8;
    background: #ffffff;
    padding: 0 8px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(240, 168, 200, 0.5);
}

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

/* 顶部装饰 —— 极简的粉蓝渐变细线 */
.typewriter-container::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(240, 168, 200, 0.3) 20%,
        rgba(240, 168, 200, 0.6) 40%,
        rgba(168, 200, 240, 0.6) 60%,
        rgba(168, 200, 240, 0.3) 80%,
        transparent 100%);
    margin-bottom: 14px;
    border-radius: 1px;
}

/* 打字机核心 —— 轻盈都市影游文字 */
.typewriter {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    /* 干净圆润的无衬线 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #4a4048;
    text-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.08em solid #f0a8c8; /* 温柔的粉红光标 */
    width: 0;

    animation:
        typing 3s steps(10, end) forwards,
        blink-caret 0.9s step-end infinite,
        heart-beat 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: #f0a8c8; }
}

/* 心动呼吸 —— 像对话时的心跳 */
@keyframes heart-beat {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.01);
    }
}

/* 伪元素 —— 右上角"EP.05"章节标识 */
.topic_wrap::before {
    content: 'EP.05';
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #d0a8c0;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(208, 168, 192, 0.3);
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    text-shadow: none;
    box-shadow: 0 1px 4px rgba(208, 168, 192, 0.1);
}

/* 伪元素 —— 左下角"TAP TO CONTINUE"提示 */
.topic_wrap::after {
    content: 'TAP TO CONTINUE';
    position: absolute;
    bottom: 12px;
    left: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(208, 168, 192, 0.6);
    pointer-events: none;
    z-index: 0;
    text-shadow: none;
    animation: tap-blink 2s ease-in-out infinite;
}

@keyframes tap-blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

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