/* ============================================================
   大型3D游戏风格 · 3A大作主菜单
   只替换CSS，HTML结构不变
   设计方向：史诗感 / 电影化光影 / 次世代UI
   ============================================================ */

/* 卡片容器 —— 3A游戏主菜单面板 */
.topic_wrap {
    position: relative;
    /* 深空蓝黑到暗金的渐变，像史诗奇幻/科幻大作的场景 */
    background:
        radial-gradient(ellipse at 15% 10%, rgba(255, 180, 60, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 90%, rgba(80, 120, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(40, 50, 80, 0.5) 0%, transparent 70%),
        linear-gradient(175deg, #080a12 0%, #10141f 40%, #0c0e16 70%, #04060a 100%);

    /* 暗金 + 冷蓝双层边框，像3A游戏UI的高级质感 */
    border: 2px solid #c8a050;
    box-shadow:
        inset 0 0 50px rgba(255, 180, 60, 0.05),
        inset 0 0 120px rgba(0, 0, 0, 0.85);
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    perspective: 1000px;
}

/* 标题 —— 3A大作标题 */
.topic_wrap .title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    /* 史诗感衬线/科技混合，像3A大作标题 */
    font-family: 'Cinzel', 'Trajan Pro', 'Georgia', 'Songti SC', 'SimSun', serif;
    color: #f0e8d8;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-shadow:
        0 0 10px rgba(255, 180, 60, 0.5),
        0 0 30px rgba(255, 180, 60, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(80, 120, 255, 0.15);
    /* 底部暗金线，像3A大作UI的分隔 */
    padding-bottom: 10px;
    border-bottom: 2px solid #c8a050;
    position: relative;
    animation: aaa-title-glow 4s ease-in-out infinite;
}

/* 标题下方的冷蓝装饰线，像魔法/科技能量 */
.topic_wrap .title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4a8aff, #80b0ff, #4a8aff, transparent);
    opacity: 0.8;
    box-shadow: 0 0 12px rgba(74, 138, 255, 0.7);
}

@keyframes aaa-title-glow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 180, 60, 0.5),
            0 0 30px rgba(255, 180, 60, 0.25),
            0 2px 4px rgba(0, 0, 0, 0.9),
            0 0 60px rgba(80, 120, 255, 0.15);
    }
    50% {
        text-shadow:
            0 0 15px rgba(255, 200, 80, 0.7),
            0 0 40px rgba(255, 180, 60, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.9),
            0 0 90px rgba(80, 120, 255, 0.25);
    }
}

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

/* 顶部装饰 —— 史诗能量条 */
.typewriter-container::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(200, 160, 80, 0.4) 15%,
        #c8a050 35%,
        #4a8aff 65%,
        rgba(74, 138, 255, 0.4) 85%,
        transparent 100%);
    margin-bottom: 12px;
    border-radius: 2px;
    opacity: 0.9;
    box-shadow:
        0 0 10px rgba(200, 160, 80, 0.5),
        0 0 20px rgba(74, 138, 255, 0.4);
    background-size: 200% 100%;
    animation: aaa-energy-flow 4s linear infinite;
}

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

/* 打字机核心 —— 3A大作对话文字 */
.typewriter {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    /* 史诗感衬线/科技混合 */
    font-family: 'Cinzel', 'Trajan Pro', 'Georgia', 'Songti SC', 'SimSun', serif;
    color: #f0e8d8;
    text-shadow:
        0 0 5px rgba(255, 180, 60, 0.5),
        0 0 15px rgba(255, 180, 60, 0.25),
        0 0 30px rgba(80, 120, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.12em solid #c8a050; /* 暗金光标，像史诗武器 */
    width: 0;

    animation:
        typing 2.5s steps(10, end) forwards,
        blink-caret 0.8s step-end infinite,
        aaa-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: #c8a050; }
}

/* 史诗闪烁 —— 像3A大作的光影变化 */
@keyframes aaa-flicker {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 5px rgba(255, 180, 60, 0.5),
            0 0 15px rgba(255, 180, 60, 0.25),
            0 0 30px rgba(80, 120, 255, 0.15),
            0 2px 4px rgba(0, 0, 0, 0.9);
    }
    50% {
        opacity: 0.95;
        text-shadow:
            0 0 8px rgba(255, 200, 80, 0.7),
            0 0 20px rgba(255, 180, 60, 0.4),
            0 0 40px rgba(80, 120, 255, 0.25),
            0 2px 4px rgba(0, 0, 0, 0.9);
    }
}

/* 伪元素 —— 右上角"LV 99"等级标识 */
.topic_wrap::before {
    content: 'LV 99';
    position: absolute;
    top: 10px;
    right: 16px;
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #c8a050;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(200, 160, 80, 0.5);
    padding: 2px 8px;
    background: rgba(8, 10, 18, 0.85);
    box-shadow:
        0 0 10px rgba(200, 160, 80, 0.25),
        inset 0 0 10px rgba(200, 160, 80, 0.1);
    text-shadow: 0 0 8px rgba(200, 160, 80, 0.8);
}

/* 伪元素 —— 左下角"QUEST · MAIN"任务信息 */
.topic_wrap::after {
    content: 'QUEST · MAIN STORY';
    position: absolute;
    bottom: 10px;
    left: 16px;
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(74, 138, 255, 0.5);
    pointer-events: none;
    z-index: 0;
    text-shadow: 0 0 8px rgba(74, 138, 255, 0.5);
}

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