﻿/* ===== 基础变量 ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-hover: #252540;
    
    --text-primary: #e0e0ff;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --text-accent: #00f0ff;
    --text-warning: #ff6b35;
    --text-danger: #ff3366;
    --text-success: #00ff88;
    
    --border-color: #2a2a4a;
    --border-glow: rgba(0, 240, 255, 0.3);
    
    --accent-cyan: #00f0ff;
    --accent-pink: #ff00aa;
    --accent-purple: #aa00ff;
    --accent-orange: #ff6b35;
    
    /* 霓虹发光变量 */
    --glow-cyan: 0 0 5px rgba(0, 240, 255, 0.5), 0 0 10px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
    --glow-pink: 0 0 5px rgba(255, 0, 170, 0.5), 0 0 10px rgba(255, 0, 170, 0.3), 0 0 20px rgba(255, 0, 170, 0.1);
    --glow-purple: 0 0 5px rgba(170, 0, 255, 0.5), 0 0 10px rgba(170, 0, 255, 0.3), 0 0 20px rgba(170, 0, 255, 0.1);
    --glow-orange: 0 0 5px rgba(255, 107, 53, 0.5), 0 0 10px rgba(255, 107, 53, 0.3), 0 0 20px rgba(255, 107, 53, 0.1);
    
    --font-mono: 'Courier New', 'SF Mono', monospace;
    --font-display: 'Arial Black', 'Helvetica Neue', sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== 可访问性：减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ending-title-compact,
    .personality-stamp,
    .ending-illustration-compact,
    .ending-radar-compact,
    .energy-fill {
        will-change: auto;
        transform: none;
    }
    
    .neo-panel,
    .ending-content,
    .ending-illustration-compact,
    .ending-radar-compact {
        contain: none;
    }
}

/* ===== 重置与基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Performance: Contain layout for independent regions */
.ending-content,
.neo-panel,
.ending-illustration-compact {
    contain: layout style;
}

/* Performance: GPU acceleration for animated elements */
.ending-title-compact,
.personality-stamp,
.ending-illustration-compact,
.ending-radar-compact,
.energy-fill {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
}

/* 背景图层 - 独立处理动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/backgrounds/bg_boot_dark_1920.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    animation: bgZoom 20s ease-in-out infinite alternate;
}

/* 扫描线效果层 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.03) 2px,
        rgba(0, 240, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
    animation: scanlineMove 8s linear infinite;
}

/* ===== UI装饰层 ===== */
.ui-decor-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* 科技感网格装饰 */
.decor-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/ui/ui_decor_grid_512.png');
    background-size: 256px 256px;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: overlay;
}

.decor-grid.active {
    opacity: 0.15;
    animation: gridPulse 4s ease-in-out infinite;
}

/* 扫描线装饰 */
.decor-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/ui/ui_decor_scanline_512.png');
    background-size: 100% 4px;
    background-repeat: repeat-y;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

.decor-scanline.active {
    opacity: 0.3;
    animation: scanlineSlide 3s linear infinite;
}

/* 故障效果装饰 */
.decor-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/ui/ui_decor_glitch_512.png');
    background-size: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    mix-blend-mode: difference;
}

.decor-glitch.active {
    opacity: 0.2;
    animation: glitchFlicker 0.3s ease-in-out infinite alternate;
}

/* 装饰动画 */
@keyframes gridPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

@keyframes scanlineSlide {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

@keyframes glitchFlicker {
    0% { opacity: 0.1; transform: translateX(0); }
    25% { opacity: 0.3; transform: translateX(-2px); }
    50% { opacity: 0.15; transform: translateX(2px); }
    75% { opacity: 0.25; transform: translateX(-1px); }
    100% { opacity: 0.1; transform: translateX(1px); }
}

/* 移动端背景适配 */
@media (max-width: 768px) {
    body::before {
        background-size: cover;
        background-position: center center;
        animation: bgZoomMobile 25s ease-in-out infinite alternate;
    }
    
    html, body {
        font-size: 15px;
    }
}

/* 背景缩放动画 */
@keyframes bgZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

@keyframes bgZoomMobile {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* ===== 屏幕管理 ===== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
    /* Performance: Promote screen to own layer */
    will-change: transform;
    transform: translateZ(0);
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===== 章节标题页面 ===== */
#chapter-screen {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 900;
    transition: opacity 0.8s ease;
}

#chapter-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.chapter-content {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    animation: chapterFadeIn 1.2s ease forwards;
}

@keyframes chapterFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter-number {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-accent);
    margin-bottom: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
}

.chapter-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    text-shadow: 
        0 0 20px var(--accent-cyan),
        0 0 60px rgba(0, 240, 255, 0.2);
    margin-bottom: 1.5rem;
}

.chapter-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 0 auto 1.5rem;
    animation: chapterLineExpand 1.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

@keyframes chapterLineExpand {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 60px;
        opacity: 1;
    }
}

.chapter-hint {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    opacity: 0.7;
    animation: chapterHintFade 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

@keyframes chapterHintFade {
    0% { opacity: 0; }
    100% { opacity: 0.7; }
}

/* 移动端章节标题适配 */
@media (max-width: 768px) {
    .chapter-content {
        padding: 1.5rem;
    }
    
    .chapter-name {
        letter-spacing: 0.1em;
    }
}

/* ===== 启动画面 ===== */
#boot-screen {
    background-size: cover;
    background-position: center;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 启动画面遮罩层 - 增加暗度和科技感 */
#boot-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 20, 0.3) 0%,
        rgba(10, 10, 20, 0.6) 50%,
        rgba(10, 10, 20, 0.85) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* 底部渐变遮罩 - 突出人物剪影 */
#boot-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(10, 10, 20, 0.9) 0%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

.boot-content {
    position: relative;
    z-index: 100;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-height: 80vh;
}

/* 人物剪影层 */
.boot-character-silhouette {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 400px;
    background: url('assets/characters/silhouette.png') center bottom no-repeat;
    background-size: contain;
    opacity: 0.6;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

/* 科技感装饰元素 */
.boot-tech-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* 科技线条 */
.tech-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    height: 1px;
    opacity: 0.3;
}

.tech-line-1 {
    top: 20%;
    left: -100%;
    width: 100%;
    animation: techLineMove 4s ease-in-out infinite;
}

.tech-line-2 {
    top: 45%;
    left: -100%;
    width: 80%;
    animation: techLineMove 5s ease-in-out infinite 1s;
}

.tech-line-3 {
    top: 70%;
    left: -100%;
    width: 60%;
    animation: techLineMove 6s ease-in-out infinite 2s;
}

@keyframes techLineMove {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.5; }
    100% { left: 100%; opacity: 0; }
}

/* 科技圆圈 */
.tech-circle {
    position: absolute;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 50%;
    animation: techCirclePulse 3s ease-in-out infinite;
}

.tech-circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.tech-circle-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 5%;
    animation-delay: 1.5s;
}

@keyframes techCirclePulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.2; 
        border-color: rgba(0, 240, 255, 0.2);
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.4; 
        border-color: rgba(0, 240, 255, 0.4);
    }
}

/* 六边形装饰 */
.tech-hexagon {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 15%;
    left: 10%;
    background: url('assets/ui/hexagon.png') center no-repeat;
    background-size: contain;
    opacity: 0.3;
    animation: hexagonRotate 10s linear infinite;
}

@keyframes hexagonRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主标题区域 - 居中大字 */
.boot-title-area {
    position: absolute;
    top: calc(50% - 30px);
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 800px;
}

/* LOGO图片 - 严格居中 */
.boot-logo-img {
    display: block;
    margin: 0 auto 2rem;
    max-width: 80vw;
    width: 600px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6))
            drop-shadow(0 0 60px rgba(0, 240, 255, 0.3));
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.6))
                drop-shadow(0 0 60px rgba(0, 240, 255, 0.3));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(0, 240, 255, 0.8))
                drop-shadow(0 0 80px rgba(0, 240, 255, 0.5));
        transform: scale(1.02);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .boot-logo-img {
        width: 90vw;
        max-width: 400px;
    }
}

/* 标语 */
.boot-tagline {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.15em;
    font-style: italic;
    text-shadow: 
        0 0 20px rgba(0, 240, 255, 0.6),
        0 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 底部状态区 */
.boot-bottom-area {
    position: absolute;
    z-index: 100;
    bottom: 5.8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: clamp(320px, 27vw, 370px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ===== 启动画面动态文本元素 ===== */

/* 系统状态文本容器 */
.boot-sys-text {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: rgba(0, 240, 255, 0.6);
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.boot-sys-text .sys-line {
    margin-bottom: 0.3rem;
    opacity: 0;
    animation: sysLineFadeIn 0.5s ease forwards;
}

.boot-sys-text .sys-line:nth-child(1) { animation-delay: 0.5s; }
.boot-sys-text .sys-line:nth-child(2) { animation-delay: 0.8s; }
.boot-sys-text .sys-line:nth-child(3) { animation-delay: 1.1s; }

@keyframes sysLineFadeIn {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* 位置定位 */
.boot-sys-top-left {
    top: 2rem;
    left: 2rem;
    text-align: left;
}

.boot-sys-top-right {
    top: 2rem;
    right: 2rem;
    text-align: right;
}

.boot-sys-bottom-left {
    bottom: 2rem;
    left: 2rem;
    text-align: left;
}

.boot-sys-bottom-right {
    bottom: 2rem;
    right: 2rem;
    text-align: right;
}

/* 系统状态文本闪烁动画 */
.sys-line {
    position: relative;
    overflow: hidden;
}

.sys-line::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(0, 240, 255, 0.9);
    clip-path: inset(0 100% 0 0);
    animation: sysLineScan 3s ease-in-out infinite;
}

.sys-line:nth-child(1)::after { animation-delay: 0s; }
.sys-line:nth-child(2)::after { animation-delay: 1s; }
.sys-line:nth-child(3)::after { animation-delay: 2s; }

@keyframes sysLineScan {
    0% { clip-path: inset(0 100% 0 0); }
    50% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 0 0 100%); }
}

/* 代码雨效果 */
.boot-code-rain {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
    opacity: 0.3;
}

.code-rain-column {
    position: absolute;
    top: -100%;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.2;
    color: rgba(0, 240, 255, 0.4);
    writing-mode: vertical-rl;
    text-orientation: upright;
    animation: codeRainFall linear infinite;
}

@keyframes codeRainFall {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}

/* 扫描线动画 */
.boot-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.6), transparent);
    z-index: 6;
    pointer-events: none;
    animation: bootScanLine 4s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes bootScanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

/* 角落装饰 */
.boot-corner-decor {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    z-index: 5;
    pointer-events: none;
    animation: cornerPulse 2s ease-in-out infinite;
}

.boot-corner-decor::before,
.boot-corner-decor::after {
    content: '';
    position: absolute;
    background: rgba(0, 240, 255, 0.5);
}

.boot-corner-decor::before {
    width: 10px;
    height: 1px;
}

.boot-corner-decor::after {
    width: 1px;
    height: 10px;
}

.corner-tl {
    top: 1rem;
    left: 1rem;
    border-right: none;
    border-bottom: none;
}

.corner-tl::before { top: 0; left: 0; }
.corner-tl::after { top: 0; left: 0; }

.corner-tr {
    top: 1rem;
    right: 1rem;
    border-left: none;
    border-bottom: none;
}

.corner-tr::before { top: 0; right: 0; }
.corner-tr::after { top: 0; right: 0; }

.corner-bl {
    bottom: 1rem;
    left: 1rem;
    border-right: none;
    border-top: none;
}

.corner-bl::before { bottom: 0; left: 0; }
.corner-bl::after { bottom: 0; left: 0; }

.corner-br {
    bottom: 1rem;
    right: 1rem;
    border-left: none;
    border-top: none;
}

.corner-br::before { bottom: 0; right: 0; }
.corner-br::after { bottom: 0; right: 0; }

@keyframes cornerPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 随机数据块 */
.boot-data-block {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 2px;
    pointer-events: none;
    z-index: 3;
    animation: dataBlockBlink 4s ease-in-out infinite;
}

@keyframes dataBlockBlink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* 移动端适配 - 动态文本 */
@media (max-width: 768px) {
    .boot-sys-text {
        font-size: 0.55rem;
    }
    
    .boot-sys-top-left,
    .boot-sys-top-right,
    .boot-sys-bottom-left,
    .boot-sys-bottom-right {
        display: none;
    }
    
    .boot-corner-decor {
        width: 25px;
        height: 25px;
    }
    
    .boot-code-rain {
        height: 20%;
        opacity: 0.2;
    }
}

/* ===== 按钮样式 ===== */
.cyber-btn {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 1.2rem 3rem;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cyber-btn:hover::before,
.cyber-btn:active::before {
    left: 100%;
}

.cyber-btn:hover,
.cyber-btn:active {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-3px);
}

.cyber-btn.secondary {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.cyber-btn.secondary:hover,
.cyber-btn.secondary:active {
    background: rgba(136, 136, 170, 0.1);
    box-shadow: 0 0 20px rgba(136, 136, 170, 0.2);
}

/* 按钮点击效果 */
.cyber-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

/* 按钮故障效果 */
@keyframes btnGlitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.cyber-btn:hover {
    animation: btnGlitch 0.3s ease infinite;
}

/* ===== 游戏主界面 ===== */
#game-screen {
    background: rgba(10, 10, 15, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#game-screen .game-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 260px;
    gap: 16px;
    padding: 14px 28px 16px;
    height: 100%;
    min-height: 0;
}

#game-screen .comm-panel,
#game-screen .system-monitor-panel {
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.9), rgba(4, 10, 20, 0.82));
    border: 1px solid rgba(0, 212, 255, 0.16);
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.04);
    padding: 14px;
    position: relative;
    align-self: start;
}

#game-screen .system-monitor-panel {
    overflow: visible;
}

#game-screen .comm-panel {
    overflow: visible;
}

#game-screen .comm-panel {
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

#game-screen .comm-panel.comm-hidden {
    opacity: 0;
    visibility: hidden;
}

#game-screen .comm-panel::before,
#game-screen .system-monitor-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.025) 0px,
        rgba(255, 255, 255, 0.025) 1px,
        transparent 3px,
        transparent 6px
    );
    opacity: 0.22;
}

#game-screen .comm-panel .panel-title,
#game-screen .system-monitor-panel .panel-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

#game-screen .comm-panel .title-en,
#game-screen .system-monitor-panel .title-en {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    color: rgba(0, 212, 255, 0.82);
}

#game-screen .comm-panel .title-cn,
#game-screen .system-monitor-panel .title-cn {
    font-size: 0.9rem;
    color: #d9ecff;
    font-weight: 700;
}

#game-screen .comm-avatar-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.24);
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(0, 212, 255, 0.16), rgba(8, 16, 30, 0.86));
    margin-bottom: 12px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.12), inset 0 0 20px rgba(0, 212, 255, 0.08);
    animation: commBreath 3.2s ease-in-out infinite;
}

#game-screen .comm-avatar-frame::after {
    content: '';
    position: absolute;
    inset: 8%;
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 8px;
    pointer-events: none;
    animation: commRipple 3.4s ease-in-out infinite;
}

#game-screen .comm-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) brightness(0.9);
    opacity: 1;
    transition: opacity 0.12s ease;
}

#game-screen .comm-avatar.avatar-fade {
    opacity: 0;
}

#game-screen .comm-avatar-frame .comm-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.16), transparent);
    animation: commScan 4.8s linear infinite;
}

@keyframes commScan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes commBreath {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 212, 255, 0.1), inset 0 0 16px rgba(0, 212, 255, 0.06); }
    50% { box-shadow: 0 0 28px rgba(0, 212, 255, 0.22), inset 0 0 24px rgba(0, 212, 255, 0.1); }
}

@keyframes commRipple {
    0%, 100% { opacity: 0.28; transform: scale(0.98); }
    50% { opacity: 0.6; transform: scale(1); }
}

#game-screen .comm-name {
    font-size: 1.15rem;
    color: #f3f9ff;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 14px rgba(0, 212, 255, 0.2);
}

#game-screen .comm-role,
#game-screen .comm-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

#game-screen .comm-role {
    color: rgba(0, 212, 255, 0.82);
    margin-bottom: 6px;
}

#game-screen .comm-status {
    color: rgba(157, 179, 206, 0.86);
    padding-top: 7px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

#game-screen .comm-dynamic-tag {
    position: absolute;
    left: calc(100% + 8px);
    top: 70px;
    width: fit-content;
    max-width: 98px;
    min-height: 0;
    box-sizing: border-box;
    z-index: 30;
    padding: 10px 5px 10px 4px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.32);
    background: linear-gradient(90deg, rgba(6, 24, 40, 0.92), rgba(8, 34, 58, 0.76));
    color: rgba(216, 244, 255, 0.95);
    font-size: 1.02rem;
    line-height: 1.32;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.24s ease;
    pointer-events: none;
    white-space: normal;
    overflow-wrap: anywhere;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 600;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
}

#game-screen .comm-dynamic-tag.show {
    opacity: 1;
    transform: translateX(0);
    animation: commBubbleIn 260ms ease-out 1;
}

#game-screen .comm-dynamic-tag::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 26px;
    border-width: 8px 9px 8px 0;
    border-style: solid;
    border-color: transparent rgba(0, 212, 255, 0.35) transparent transparent;
    opacity: 0.8;
}

#game-screen .comm-dynamic-tag::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 27px;
    border-width: 7px 8px 7px 0;
    border-style: solid;
    border-color: transparent rgba(8, 32, 54, 0.94) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-ai::before {
    border-color: transparent rgba(0, 226, 255, 0.72) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-ai::after {
    border-color: transparent rgba(8, 42, 66, 0.94) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-hr::before {
    border-color: transparent rgba(104, 154, 255, 0.72) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-hr::after {
    border-color: transparent rgba(18, 34, 68, 0.94) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-colleague::before {
    border-color: transparent rgba(255, 196, 92, 0.72) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-colleague::after {
    border-color: transparent rgba(64, 40, 14, 0.94) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-rebel::before {
    border-color: transparent rgba(255, 78, 170, 0.78) transparent transparent;
}

#game-screen .comm-dynamic-tag.tag-rebel::after {
    border-color: transparent rgba(40, 10, 34, 0.94) transparent transparent;
}

#game-screen .comm-dynamic-tag.is-updating {
    opacity: 0.58;
}

#game-screen .comm-dynamic-tag.is-closing {
    opacity: 0;
    transform: translateX(-6px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#game-screen .comm-dynamic-tag.tag-ai {
    border-color: rgba(0, 226, 255, 0.72);
    color: rgba(180, 246, 255, 1);
    background: linear-gradient(90deg, rgba(6, 30, 44, 0.95), rgba(8, 42, 66, 0.82));
    box-shadow: 0 0 14px rgba(0, 226, 255, 0.2), inset 0 0 14px rgba(0, 226, 255, 0.12);
}

#game-screen .comm-dynamic-tag.tag-hr {
    border-color: rgba(104, 154, 255, 0.72);
    color: rgba(214, 230, 255, 1);
    background: linear-gradient(90deg, rgba(14, 24, 46, 0.95), rgba(18, 34, 68, 0.82));
    box-shadow: 0 0 12px rgba(104, 154, 255, 0.18), inset 0 0 14px rgba(104, 154, 255, 0.12);
}

#game-screen .comm-dynamic-tag.tag-colleague {
    border-color: rgba(255, 196, 92, 0.72);
    color: rgba(255, 235, 192, 1);
    background: linear-gradient(90deg, rgba(40, 28, 12, 0.95), rgba(64, 40, 14, 0.82));
    box-shadow: 0 0 12px rgba(255, 196, 92, 0.16), inset 0 0 14px rgba(255, 196, 92, 0.1);
}

#game-screen .comm-dynamic-tag.tag-rebel {
    border-color: rgba(255, 78, 170, 0.78);
    color: rgba(255, 190, 228, 1);
    background: linear-gradient(90deg, rgba(26, 6, 22, 0.92), rgba(40, 10, 34, 0.74));
    box-shadow: 0 0 16px rgba(255, 78, 170, 0.28), inset 0 0 16px rgba(255, 78, 170, 0.12);
}

#game-screen .anomaly-signal-card .signal-hint.text-fade {
    opacity: 0.52;
    transition: opacity 0.22s ease;
}

#game-screen .anomaly-guide-tag {
    position: absolute;
    left: calc(100% + 8px);
    top: 436px;
    width: fit-content;
    max-width: 100px;
    min-height: 0;
    box-sizing: border-box;
    padding: 10px 6px 10px 5px;
    border-radius: 6px;
    border: 1px solid rgba(255, 74, 168, 0.42);
    background: linear-gradient(90deg, rgba(26, 7, 22, 0.92), rgba(40, 10, 34, 0.74));
    color: rgba(255, 216, 240, 0.95);
    font-size: 1.02rem;
    line-height: 1.32;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 6;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    font-weight: 600;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
}

#game-screen .anomaly-guide-tag.show {
    opacity: 0.95;
    transform: translateX(0);
    animation: anomalyGuideIn 300ms ease-out 1, anomalyGuidePulse 2.6s ease-in-out infinite 0.3s;
}

#game-screen .anomaly-guide-tag.is-updating {
    opacity: 0.58;
}

#game-screen .anomaly-guide-tag::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 24px;
    border-width: 8px 9px 8px 0;
    border-style: solid;
    border-color: transparent rgba(255, 74, 168, 0.42) transparent transparent;
}

#game-screen .anomaly-guide-tag::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 25px;
    border-width: 7px 8px 7px 0;
    border-style: solid;
    border-color: transparent rgba(39, 10, 34, 0.96) transparent transparent;
}

@keyframes commBubbleIn {
    0% { opacity: 0; transform: translateX(-10px) scale(0.96); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes anomalyGuideIn {
    0% { opacity: 0; transform: translateX(-10px) scale(0.98); }
    100% { opacity: 0.95; transform: translateX(0) scale(1); }
}

@keyframes anomalyGuidePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 78, 170, 0), inset 0 0 10px rgba(255, 78, 170, 0.06); }
    50% { box-shadow: 0 0 18px rgba(255, 78, 170, 0.25), inset 0 0 16px rgba(255, 78, 170, 0.12); }
}

@media (max-width: 900px) {
    #game-screen .comm-dynamic-tag {
        display: none !important;
    }
}

#game-screen .comm-stats {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    display: grid;
    gap: 5px;
}

#game-screen .comm-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: rgba(165, 188, 216, 0.86);
    padding: 4px 6px;
    border: 1px solid rgba(0, 212, 255, 0.09);
    background: rgba(5, 14, 26, 0.52);
    border-radius: 4px;
}

#game-screen .comm-stat-row em {
    font-style: normal;
    color: rgba(0, 212, 255, 0.9);
    font-weight: 700;
}

#game-screen .comm-wave {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    height: 24px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 4px;
}

#game-screen .comm-wave span {
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(0, 212, 255, 1), rgba(0, 212, 255, 0.4));
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
    animation: commWave 1.3s ease-in-out infinite;
    height: 20%;
}

#game-screen .comm-wave span:nth-child(2n) { animation-duration: 1.1s; }
#game-screen .comm-wave span:nth-child(3n) { animation-duration: 1.6s; }
#game-screen .comm-wave span:nth-child(4n) { animation-duration: 0.95s; }
#game-screen .comm-wave span:nth-child(1) { animation-delay: 0.1s; }
#game-screen .comm-wave span:nth-child(2) { animation-delay: 0.25s; }
#game-screen .comm-wave span:nth-child(3) { animation-delay: 0.4s; }
#game-screen .comm-wave span:nth-child(4) { animation-delay: 0.15s; }
#game-screen .comm-wave span:nth-child(5) { animation-delay: 0.3s; }
#game-screen .comm-wave span:nth-child(6) { animation-delay: 0.45s; }

@keyframes commWave {
    0%, 100% { height: 18%; opacity: 0.65; }
    50% { height: 100%; opacity: 1; }
}

#game-screen .comm-link-lines {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 212, 255, 0.18);
}

#game-screen .comm-link-lines div {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    color: rgba(0, 212, 255, 0.62);
    line-height: 1.55;
}

#game-screen #game-main-column {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(18, 18, 26, 0.9);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 100px;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.back-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.status-time {
    color: var(--text-accent);
    font-weight: bold;
    min-width: 50px;
}

.status-title {
    color: var(--text-secondary);
    text-align: center;
    flex: 1;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.status-icons {
    display: flex;
    gap: 0.5rem;
    min-width: 50px;
    justify-content: flex-end;
}

.status-icon {
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.status-icon.active {
    opacity: 1;
    animation: pulse 2s infinite;
}

/* ===== 人格维度面板 ===== */
.personality-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.personality-panel.collapsed .panel-content {
    display: none;
}

.panel-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    user-select: none;
}

.panel-toggle:hover {
    background: var(--bg-hover);
}

.toggle-arrow {
    transition: transform var(--transition-normal);
    font-size: 0.6rem;
}

.personality-panel.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}

.panel-content {
    padding: 0.5rem 1rem 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.dimension {
    display: grid;
    grid-template-columns: 80px 1fr 35px;
    align-items: center;
    gap: 0.5rem;
}

.dim-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.dim-bar {
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.dim-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 3px;
    transition: width var(--transition-slow);
    position: relative;
}

.dim-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 10px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    filter: blur(2px);
}

.dim-value {
    font-size: 0.7rem;
    color: var(--text-accent);
    text-align: right;
    font-weight: bold;
}

/* ===== 剧情容器 ===== */
.story-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.05rem 1.2rem 0.8rem;
    scroll-behavior: smooth;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

.story-container::-webkit-scrollbar {
    width: 4px;
}

.story-container::-webkit-scrollbar-track {
    background: transparent;
}

.story-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.story-content::before {
    content: 'PERSONA ANALYSIS  |  DATA STREAM  |  MEMORY TRACE  |  EMOTION LOG  |  SYSTEM ACTIVE';
    position: sticky;
    top: 2px;
    display: block;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: rgba(0, 212, 255, 0.05);
    pointer-events: none;
    z-index: 0;
    margin-bottom: 4px;
}

/* 剧情文本 - 带黑色半透明底框 */
.story-text {
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    line-height: 1.6;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(42, 42, 74, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.story-text.system {
    color: var(--text-accent);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 8px 8px 0;
    background: rgba(0, 240, 255, 0.08);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.story-text.dialogue {
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(4px);
    border-left: 3px solid var(--accent-purple);
    border-radius: 0 8px 8px 0;
    padding: 0.6rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.story-text.narrator {
    color: var(--text-primary);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(42, 42, 74, 0.3);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.story-text.typed-complete {
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.28);
}

/* 三周目：同类型内容合并展示 */
body.author-mode .story-text.story-group {
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
}

.story-group-line {
    white-space: pre-wrap;
    line-height: 1.62;
    margin: 0;
}

.story-group-line + .story-group-line {
    margin-top: 0.36rem;
    padding-top: 0.32rem;
    border-top: 1px dashed rgba(132, 188, 224, 0.15);
}

body.author-mode .story-text.system .story-group-line + .story-group-line {
    border-top-color: rgba(0, 240, 255, 0.16);
}

body.author-mode .story-text.dialogue .story-group-line + .story-group-line {
    border-top-color: rgba(169, 135, 255, 0.16);
}

.story-text.story-card-item {
    background: linear-gradient(180deg, rgba(8, 16, 30, 0.9), rgba(6, 12, 22, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-left: 2px solid rgba(255, 80, 170, 0.7);
    padding: 0.75rem;
}

.story-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.story-card-image {
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.28);
}

.story-card-title {
    color: rgba(137, 235, 255, 0.95);
    font-weight: 700;
    font-size: 0.96rem;
    letter-spacing: 0.04em;
}

.story-card-subtitle {
    color: rgba(205, 220, 236, 0.86);
    font-size: 0.84rem;
}

.story-text.ai-assistant,
.story-text.ai_assistant {
    border-left: 3px solid rgba(0, 226, 255, 0.9);
    color: rgba(179, 245, 255, 0.98);
}

.story-text.hr,
.story-text.supervisor {
    border-left: 3px solid rgba(104, 154, 255, 0.9);
    color: rgba(214, 230, 255, 0.96);
}

.story-text.colleague {
    border-left: 3px solid rgba(255, 196, 92, 0.9);
    color: rgba(255, 235, 192, 0.98);
}

.story-text.friend {
    border-left: 3px solid rgba(231, 241, 255, 0.68);
}

.story-text.rebel,
.story-text.resistance {
    border-left: 3px solid rgba(255, 78, 170, 0.92);
    color: rgba(255, 188, 224, 0.98);
}

.story-text.system-node {
    border-left: 3px solid rgba(0, 255, 240, 0.72);
}

/* 对话头像 */
.story-text.with-avatar {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(42, 42, 74, 0.5);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dialogue-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(0, 240, 255, 0.3);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.dialogue-text {
    flex: 1;
    font-style: italic;
    color: var(--text-secondary);
}

/* 移动端头像适配 */
@media (max-width: 768px) {
    .dialogue-avatar {
        width: 40px;
        height: 40px;
    }
    
    .story-text.with-avatar {
        gap: 0.6rem;
        padding: 0.8rem 1rem;
    }
}

/* 打字机光标 */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-cyan);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

/* ===== 选择按钮区 ===== */
.choices-container {
    padding: 0.9rem 1rem 1rem;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 760px;
    margin: 0 auto;
    width: min(760px, 100%);
    align-self: center;
    box-shadow: none;
    position: relative;
}

.choice-feedback {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.38);
    background: rgba(0, 212, 255, 0.11);
    color: rgba(0, 212, 255, 0.98);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    width: fit-content;
    animation: feedbackFade 1.2s ease forwards;
}

@keyframes feedbackFade {
    0% { opacity: 0; transform: translateY(5px); }
    15% { opacity: 1; transform: translateY(0); }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

#game-screen .system-monitor-panel .monitor-metrics {
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

#game-screen .system-monitor-panel .metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    padding: 7px 8px;
    border-radius: 6px;
    color: rgba(157, 179, 206, 0.88);
    border: 1px solid rgba(0, 212, 255, 0.1);
    background: rgba(5, 14, 26, 0.62);
}

#game-screen .system-monitor-panel .metric-row span,
#game-screen .system-monitor-panel .metric-row em {
    white-space: nowrap;
}

#game-screen .system-monitor-panel .metric-row em {
    font-style: normal;
    color: rgba(0, 212, 255, 0.92);
    font-weight: 700;
}

#game-screen .monitor-log {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background: rgba(2, 10, 22, 0.62);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 10px;
}

#game-screen .monitor-log-title {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: rgba(0, 212, 255, 0.9);
    margin-bottom: 6px;
}

#game-screen .monitor-log-list {
    display: grid;
    gap: 4px;
    max-height: 84px;
    overflow: hidden;
}

#game-screen .monitor-log-list div {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.05em;
    color: rgba(173, 194, 219, 0.78);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    opacity: 0.9;
}

#game-screen .anomaly-signal-card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    border: 1px dashed rgba(255, 63, 160, 0.36);
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(30, 8, 24, 0.35), rgba(10, 6, 20, 0.42));
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    animation: none;
}

#game-screen .comm-anomaly-card {
    margin-top: 10px;
    margin-bottom: 8px;
    width: 100%;
    min-height: 132px;
}

#game-screen .anomaly-link-weak {
    margin-top: 12px;
    padding: 8px 10px;
    border: 1px dashed rgba(255, 78, 170, 0.26);
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(16, 10, 24, 0.55), rgba(10, 24, 34, 0.5));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-mono);
}

#game-screen .anomaly-link-weak .weak-label {
    color: rgba(183, 208, 236, 0.84);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

#game-screen .anomaly-link-weak .weak-value {
    color: rgba(255, 128, 204, 0.88);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

#game-screen .anomaly-signal-card.is-hidden {
    display: none !important;
}

#game-screen .anomaly-signal-card.is-active {
    animation: anomalyPulse 2.4s ease-in-out infinite, anomalyGlitch 1.8s steps(2, end) infinite;
}

#game-screen .anomaly-signal-card.is-active::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    border: 1px solid rgba(255, 72, 170, 0.45);
    pointer-events: none;
    animation: anomalyBorderFlash 1.25s steps(2, end) infinite;
}

#game-screen .anomaly-signal-card.is-unlocked {
    border-color: rgba(0, 255, 240, 0.38);
    background: linear-gradient(180deg, rgba(5, 28, 34, 0.38), rgba(3, 16, 25, 0.46));
    box-shadow: inset 0 0 18px rgba(0, 255, 240, 0.08);
    animation: anomalyUnlockedPulse 3.8s ease-in-out infinite;
}

#game-screen .anomaly-signal-card.is-ai-anomaly {
    border-color: rgba(80, 215, 255, 0.42);
    background: linear-gradient(180deg, rgba(5, 28, 42, 0.5), rgba(22, 10, 34, 0.52));
}

#game-screen .anomaly-signal-card.is-ai-anomaly.is-active {
    animation: anomalyPulse 2.4s ease-in-out infinite, anomalyGlitch 1.8s steps(2, end) infinite;
}

#game-screen .anomaly-signal-card.is-ai-anomaly .signal-title,
#game-screen .anomaly-signal-card.is-ai-anomaly .signal-hint {
    color: rgba(95, 220, 255, 0.92);
}

#game-screen .anomaly-signal-card.is-ai-anomaly .signal-state {
    border-color: rgba(95, 220, 255, 0.38);
    background: rgba(95, 220, 255, 0.08);
}

#game-screen .anomaly-signal-card.is-ai-anomaly:hover,
#game-screen .anomaly-signal-card.is-ai-anomaly.signal-ping {
    border-color: rgba(95, 220, 255, 0.72);
    box-shadow: 0 0 20px rgba(95, 220, 255, 0.18), inset 0 0 22px rgba(255, 63, 190, 0.07);
}

#game-screen .anomaly-signal-card.is-ai-anomaly.ai-card-reveal {
    animation: aiAnomalyCardReveal 0.88s cubic-bezier(0.2, 0.9, 0.2, 1) 1, anomalyPulse 2.4s ease-in-out infinite;
}

@keyframes aiAnomalyCardReveal {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
        filter: blur(8px) hue-rotate(35deg);
        box-shadow: 0 0 0 rgba(95, 220, 255, 0);
    }
    42% {
        opacity: 1;
        transform: translateY(0) scale(1.02);
        filter: blur(0) hue-rotate(-18deg);
        box-shadow: 0 0 30px rgba(95, 220, 255, 0.26), inset 0 0 22px rgba(255, 63, 190, 0.12);
    }
    64% {
        transform: translateX(-2px) scale(1);
    }
    78% {
        transform: translateX(2px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: none;
    }
}

#game-screen .anomaly-signal-card .signal-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(255, 63, 160, 0.88);
}

#game-screen .anomaly-signal-card .signal-subtitle {
    font-size: 0.8rem;
    color: #ffe7f4;
    margin-top: 2px;
    font-weight: 700;
}

#game-screen .anomaly-signal-card .signal-state {
    margin-top: 8px;
    display: inline-block;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 63, 160, 0.35);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(255, 63, 160, 0.08);
}

#game-screen .anomaly-signal-card .signal-desc {
    margin-top: 8px;
    font-size: 0.74rem;
    color: rgba(182, 199, 222, 0.82);
    line-height: 1.5;
}

#game-screen .anomaly-signal-card .signal-hint {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.57rem;
    letter-spacing: 0.11em;
    color: rgba(255, 63, 160, 0.82);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

#game-screen .anomaly-signal-card:hover {
    border-color: rgba(255, 63, 160, 0.65);
    box-shadow: 0 0 18px rgba(255, 63, 160, 0.2), inset 0 0 22px rgba(255, 63, 160, 0.07);
    transform: translateY(-1px);
}

#game-screen .anomaly-signal-card.signal-ping {
    border-color: rgba(255, 63, 160, 0.92);
    box-shadow: 0 0 30px rgba(255, 63, 160, 0.28), inset 0 0 26px rgba(255, 63, 160, 0.12);
}

#game-screen .anomaly-signal-card.signal-reveal {
    animation: anomalyRevealPop 0.72s ease-out 1, anomalyPulse 2.4s ease-in-out infinite, anomalyGlitch 1.8s steps(2, end) infinite;
}

@keyframes anomalyPulse {
    0%, 100% { box-shadow: inset 0 0 12px rgba(255, 63, 160, 0.05); }
    50% { box-shadow: inset 0 0 22px rgba(255, 63, 160, 0.1); }
}

@keyframes anomalyGlitch {
    0%, 94%, 100% { filter: none; }
    95% { filter: hue-rotate(18deg) saturate(1.08); }
    96% { filter: hue-rotate(-12deg) brightness(1.05); }
    97% { filter: none; }
}

@keyframes anomalyRevealPop {
    0% { opacity: 0; transform: translateY(12px) scale(0.94); filter: brightness(1.22); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.02); filter: brightness(1.08); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: none; }
}

@keyframes anomalyBorderFlash {
    0%, 100% { opacity: 0.35; transform: translateX(0); }
    22% { opacity: 0.8; transform: translateX(1px); }
    23% { opacity: 0.2; transform: translateX(-1px); }
    24% { opacity: 0.75; transform: translateX(0); }
    60% { opacity: 0.45; transform: translateY(0); }
    61% { opacity: 0.85; transform: translateY(1px); }
}

@keyframes anomalyUnlockedPulse {
    0%, 100% { box-shadow: inset 0 0 12px rgba(0, 255, 240, 0.05); }
    50% { box-shadow: inset 0 0 24px rgba(0, 255, 240, 0.12); }
}

/* 结算页：未解锁时的异常信号诱导态（仅增强，不改布局） */
#locked-profile-file.is-anomaly-tease {
    animation: endingAnomalyTeasePulse 2.8s ease-in-out infinite;
}

#locked-profile-file.is-anomaly-tease #locked-file-title,
#locked-profile-file.is-anomaly-tease #locked-file-subtitle {
    color: rgba(255, 96, 178, 0.95);
    text-shadow: 0 0 10px rgba(255, 62, 150, 0.35);
}

#locked-profile-file.is-anomaly-tease #locked-file-cta-action {
    color: rgba(255, 76, 162, 0.95);
}

@keyframes endingAnomalyTeasePulse {
    0%, 100% { filter: none; }
    48% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(14deg) saturate(1.08); }
    52% { filter: hue-rotate(-10deg) brightness(1.03); }
}

#game-screen .system-message {
    margin: 8px 12px 12px;
}

@media (max-width: 900px) {
    #game-screen .game-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "comm"
            "main"
            "monitor";
        gap: 10px;
        padding: 10px 10px 12px;
        min-height: 0;
        overflow: hidden;
    }

    #game-screen .comm-panel {
        grid-area: comm;
        padding: 8px 10px;
        display: grid;
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "avatar title"
            "avatar name"
            "avatar meta";
        gap: 2px 10px;
        align-items: center;
    }

    #game-screen .comm-panel .panel-title {
        grid-area: title;
        margin: 0;
        gap: 1px;
    }

    #game-screen .comm-panel .title-en {
        font-size: 0.56rem;
        letter-spacing: 0.1em;
    }

    #game-screen .comm-panel .title-cn {
        font-size: 0.72rem;
    }

    #game-screen .comm-avatar-frame {
        grid-area: avatar;
        width: 44px;
        height: 44px;
        aspect-ratio: auto;
        margin: 0;
        border-radius: 50%;
    }

    #game-screen .comm-name {
        grid-area: name;
        margin: 0;
        font-size: 0.95rem;
    }

    #game-screen .comm-role,
    #game-screen .comm-status {
        grid-area: meta;
        font-size: 0.6rem;
        padding: 0;
        border: 0;
        margin: 0;
    }

    #game-screen .comm-stats,
    #game-screen .comm-wave,
    #game-screen .comm-link-lines {
        display: none;
    }

    #game-screen #game-main-column {
        grid-area: main;
    }

    #game-screen .system-monitor-panel {
        grid-area: monitor;
        padding: 8px 10px;
    }

    #game-screen .system-monitor-panel .panel-title {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    #game-screen .system-monitor-panel .title-en {
        order: 2;
        font-size: 0.54rem;
        letter-spacing: 0.08em;
    }

    #game-screen .system-monitor-panel .title-cn {
        order: 1;
        font-size: 0.72rem;
    }

    #game-screen .system-monitor-panel .monitor-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    #game-screen .system-monitor-panel .metric-row {
        font-size: 0.58rem;
        padding: 5px 6px;
    }

    #game-screen .monitor-log {
        display: none;
    }

    #game-screen .anomaly-signal-card {
        margin-top: 8px;
        padding: 7px 8px;
    }

    #game-screen .anomaly-signal-card .signal-title {
        font-size: 0.54rem;
    }

    #game-screen .anomaly-signal-card .signal-subtitle {
        font-size: 0.68rem;
    }

    #game-screen .anomaly-signal-card .signal-state {
        margin-top: 5px;
        font-size: 0.56rem;
        padding: 2px 7px;
    }

    #game-screen .anomaly-signal-card .signal-desc {
        margin-top: 5px;
        font-size: 0.62rem;
        line-height: 1.35;
    }

    #game-screen .anomaly-signal-card .signal-hint {
        margin-top: 4px;
        font-size: 0.52rem;
        letter-spacing: 0.03em;
        line-height: 1.35;
    }

    #game-screen .story-container {
        padding: 0.9rem 0.85rem 0.8rem;
    }

    #game-screen .choices-container {
        padding: 0.8rem 0.85rem 0.9rem;
        gap: 0.7rem;
    }
}

/* 手机端精简模式：剧情优先（不影响桌面） */
@media (max-width: 900px) {
    #personality-panel {
        display: none !important;
    }

    #game-screen .game-layout {
        grid-template-areas:
            "comm"
            "main" !important;
        gap: 10px !important;
    }

    #game-screen .system-monitor-panel {
        display: none !important;
    }

    #game-screen .comm-panel {
        padding: 10px 12px !important;
        grid-template-columns: 72px minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto auto auto !important;
        grid-template-areas:
            "avatar line1"
            "avatar line2"
            "avatar line3"
            "avatar line4"
            "avatar line4" !important;
        gap: 4px 10px !important;
        align-items: center !important;
    }

    #game-screen .comm-panel .panel-title {
        display: none !important;
    }

    #game-screen .comm-avatar-frame {
        width: 72px !important;
        height: 92px !important;
        border-radius: 10px !important;
    }

    #game-screen .comm-name {
        grid-area: line1 !important;
        margin: 0 !important;
        font-size: 0.8rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #game-screen .comm-role {
        grid-area: line2 !important;
        margin: 0 !important;
        font-size: 0.76rem !important;
        border: 0 !important;
        padding: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #game-screen .comm-status {
        grid-area: line3 !important;
        margin: 0 !important;
        font-size: 0.76rem !important;
        border: 0 !important;
        padding: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #game-screen .comm-stats {
        grid-area: line4 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    #game-screen .comm-stat-row {
        padding: 0 !important;
        border: 0 !important;
        font-size: 0.76rem !important;
        color: rgba(216, 238, 255, 0.9);
    }

    #game-screen .comm-stat-row:nth-child(n+2),
    #game-screen .comm-wave,
    #game-screen .comm-link-lines {
        display: none !important;
    }

    #game-screen .comm-name::before,
    #game-screen .comm-role::before,
    #game-screen .comm-status::before {
        color: rgba(132, 214, 255, 0.86);
        margin-right: 4px;
    }
    #game-screen .comm-name::before { content: '通讯接入：'; }
    #game-screen .comm-role::before { content: '任务名称：'; }
    #game-screen .comm-status::before { content: '人物关系：'; }

    #comm-emotion-label {
        color: rgba(132, 214, 255, 0.86);
    }
    #comm-emotion-label::after { content: '：'; }
}

/* 拒绝提示信息 */
.reject-message {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: var(--text-danger);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    animation: shake 0.4s ease;
    margin-bottom: 0.5rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* 选项消失动画 */
.choice-btn.removing {
    animation: choiceDisappear 0.6s ease forwards;
    pointer-events: none;
}

@keyframes choiceDisappear {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-20px) scale(0.95);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50px) scale(0.8);
        filter: blur(4px);
        height: 0;
        min-height: 0;
        padding: 0;
        margin: 0;
        border: none;
        overflow: hidden;
    }
}

.choice-btn {
    background: linear-gradient(180deg, rgba(10, 20, 34, 0.82), rgba(6, 12, 24, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.18);
    color: var(--text-primary);
    padding: 1.08rem 1.25rem;
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    min-height: 56px;
    line-height: 1.5;
    box-shadow: inset 0 0 14px rgba(0, 212, 255, 0.03);
}

/* 主线异常信号主动弹窗（阶段触达） */
.anomaly-signal-modal {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.anomaly-signal-mask {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 14, 0.78);
    backdrop-filter: blur(8px);
}

.anomaly-signal-card {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    border-radius: 16px;
    padding: 18px 16px 14px;
    background:
        radial-gradient(circle at top right, rgba(0, 212, 255, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(7, 14, 28, 0.94), rgba(3, 8, 18, 0.98));
    border: 1px solid rgba(0, 212, 255, 0.24);
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.18), inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.anomaly-signal-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}

.signal-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.68);
}

.signal-live-text,
.signal-trace-text {
    font-family: Orbitron, monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
}

.signal-live-text { color: rgba(0, 212, 255, 0.92); }
.signal-trace-text { margin-left: auto; color: rgba(255, 79, 163, 0.84); }

.anomaly-signal-head h2 {
    margin: 6px 0 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    color: #eaf6ff;
}

.anomaly-signal-head p {
    margin: 6px 0 0;
    font-family: Orbitron, monospace;
    font-size: 10px;
    letter-spacing: 0.24em;
    color: rgba(132, 214, 255, 0.72);
}

.anomaly-signal-message-box {
    margin-top: 10px;
    height: 148px;
    overflow: auto;
    border-radius: 12px;
    padding: 12px 12px 10px;
    background: rgba(0, 10, 22, 0.56);
    border: 1px solid rgba(255, 79, 163, 0.26);
    color: rgba(235, 245, 255, 0.9);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
}

.anomaly-signal-risk {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 198, 221, 0.88);
    background: rgba(255, 79, 163, 0.08);
    border: 1px dashed rgba(255, 79, 163, 0.35);
}

.anomaly-signal-actions {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.signal-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.signal-btn-primary {
    border: 1px solid rgba(0, 212, 255, 0.55);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.08));
    color: #00d4ff;
}

.signal-btn-secondary {
    border: 1px solid rgba(160, 180, 210, 0.28);
    background: rgba(7, 14, 28, 0.72);
    color: rgba(212, 228, 246, 0.88);
}

.anomaly-signal-card.stage-final .signal-trace-text {
    color: #ff7fc7;
}

@media (max-width: 520px) {
    .anomaly-signal-card { width: min(94vw, 420px); }
    .anomaly-signal-head h2 { font-size: 22px; }
}

.choice-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.choice-btn:hover::before,
.choice-btn:active::before {
    opacity: 1;
}

.choice-btn:hover,
.choice-btn:active {
    background: linear-gradient(180deg, rgba(12, 26, 42, 0.92), rgba(7, 16, 29, 0.96));
    border-color: rgba(0, 240, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.24), inset 0 0 18px rgba(0, 240, 255, 0.08);
    animation: none;
}

/* Glitch Hover 效果 */
@keyframes glitch-hover {
    0% {
        transform: translateX(6px);
        filter: none;
    }
    20% {
        transform: translateX(6px) skewX(-2deg);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translateX(6px) skewX(2deg);
        filter: hue-rotate(-90deg);
    }
    60% {
        transform: translateX(6px) skewX(-1deg);
        filter: hue-rotate(45deg);
    }
    80% {
        transform: translateX(6px) skewX(1deg);
        filter: hue-rotate(-45deg);
    }
    100% {
        transform: translateX(6px);
        filter: none;
    }
}

/* 数据损坏效果 */
.choice-btn:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 240, 255, 0.03) 50%,
        transparent 100%
    );
    animation: data-corruption 2s linear infinite;
    pointer-events: none;
}

@keyframes data-corruption {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.choice-btn .choice-label {
    color: var(--accent-cyan);
    font-weight: bold;
    margin-right: 0.5rem;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.choice-btn .choice-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    padding-left: 1.5rem;
}

/* 二周目异常选项高亮 */
.choice-btn.choice-anomaly {
    border-width: 1px;
    backdrop-filter: blur(1px);
    transform-origin: center;
    animation: anomalyChoicePulse 2.2s ease-in-out infinite;
}

.choice-btn.choice-anomaly::before {
    opacity: 1;
}

.choice-btn.choice-anomaly::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 45%,
        transparent 60%
    );
    transform: translateX(-120%);
    animation: anomalySweep 2.6s ease-in-out infinite;
    pointer-events: none;
}

.choice-btn.choice-anomaly .choice-label {
    text-shadow: 0 0 10px currentColor;
}

.choice-btn.choice-anomaly:hover {
    animation: anomalyChoiceJitter 420ms steps(2, end) 1;
}

.choice-btn.choice-anomaly-danger {
    background: linear-gradient(180deg, rgba(58, 10, 26, 0.92), rgba(40, 6, 18, 0.96));
    border-color: rgba(255, 72, 132, 0.82);
    box-shadow: 0 0 22px rgba(255, 72, 132, 0.42), inset 0 0 16px rgba(255, 72, 132, 0.15);
}

.choice-btn.choice-anomaly-danger .choice-label {
    color: #ff5f9c;
}

.choice-btn.choice-anomaly-investigate {
    background: linear-gradient(180deg, rgba(10, 24, 54, 0.92), rgba(6, 15, 35, 0.96));
    border-color: rgba(0, 212, 255, 0.82);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35), inset 0 0 14px rgba(0, 212, 255, 0.12);
}

.choice-btn.choice-anomaly-stealth {
    background: linear-gradient(180deg, rgba(31, 12, 52, 0.92), rgba(19, 8, 33, 0.96));
    border-color: rgba(176, 96, 255, 0.8);
    box-shadow: 0 0 20px rgba(176, 96, 255, 0.32), inset 0 0 14px rgba(176, 96, 255, 0.12);
}

.choice-btn.choice-anomaly-order {
    background: linear-gradient(180deg, rgba(10, 36, 42, 0.92), rgba(8, 22, 28, 0.96));
    border-color: rgba(130, 247, 255, 0.82);
    box-shadow: 0 0 20px rgba(130, 247, 255, 0.34), inset 0 0 14px rgba(130, 247, 255, 0.12);
}

.choice-btn.choice-anomaly-signal {
    background: linear-gradient(180deg, rgba(44, 14, 44, 0.9), rgba(28, 8, 28, 0.94));
    border-color: rgba(255, 125, 200, 0.76);
    box-shadow: 0 0 18px rgba(255, 125, 200, 0.3), inset 0 0 12px rgba(255, 125, 200, 0.1);
}

.choice-btn.choice-anomaly .choice-hint {
    color: rgba(220, 240, 255, 0.88);
}

@keyframes anomalyChoiceJitter {
    0% { transform: translateY(-2px) translateX(0); filter: hue-rotate(0deg); }
    25% { transform: translateY(-2px) translateX(1px); filter: hue-rotate(20deg); }
    50% { transform: translateY(-2px) translateX(-1px); filter: hue-rotate(-20deg); }
    75% { transform: translateY(-2px) translateX(1px); filter: hue-rotate(15deg); }
    100% { transform: translateY(-2px) translateX(0); filter: hue-rotate(0deg); }
}

@keyframes anomalyChoicePulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 96, 180, 0), inset 0 0 12px rgba(255, 255, 255, 0.02);
    }
    50% {
        box-shadow: 0 0 24px rgba(255, 96, 180, 0.26), inset 0 0 20px rgba(255, 255, 255, 0.05);
    }
}

@keyframes anomalySweep {
    0% { transform: translateX(-120%); opacity: 0; }
    20% { opacity: 0.6; }
    60% { opacity: 0.4; }
    100% { transform: translateX(130%); opacity: 0; }
}

/* ===== 系统消息 ===== */
.system-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--accent-warning);
    color: var(--text-warning);
    padding: 1.5rem 2rem;
    font-size: 0.9rem;
    text-align: center;
    z-index: 500;
    max-width: 90%;
    width: 400px;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.2);
}

.system-message.hidden {
    display: none;
}

/* ===== 结局页面 - MBTI风格 ===== */
#ending-screen {
    background: var(--bg-primary);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ending-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 5rem;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    /* Performance: Enable smooth scrolling */
    -webkit-overflow-scrolling: touch;
}

/* 顶部标题区 */
.ending-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.ending-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.ending-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ending-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* 结局标题 - 大字发光效果 */
.ending-title-section {
    position: relative;
    text-align: center;
    margin: 0.5rem 0;
}

.ending-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3rem);
    color: var(--text-primary);
    text-shadow: 
        0 0 10px var(--accent-cyan),
        0 0 40px rgba(0, 240, 255, 0.3),
        0 0 80px rgba(0, 240, 255, 0.1);
    animation: titleGlow 3s ease-in-out infinite alternate;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    position: relative;
    z-index: 2;
    margin: 0;
}

.ending-title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.15), transparent 70%);
    z-index: 1;
    pointer-events: none;
}

@keyframes titleGlow {
    0% { 
        text-shadow: 
            0 0 10px var(--accent-cyan),
            0 0 40px rgba(0, 240, 255, 0.3);
    }
    100% { 
        text-shadow: 
            0 0 20px var(--accent-cyan),
            0 0 60px rgba(0, 240, 255, 0.4),
            0 0 100px rgba(0, 240, 255, 0.2);
    }
}

/* 结局插画 - 视觉重心 */
.ending-illustration {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    box-shadow: 
        0 0 30px rgba(0, 240, 255, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.ending-illustration:hover {
    transform: translateY(-4px);
}

.illustration-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ending-illustration:hover .illustration-img {
    transform: scale(1.05);
}

.illustration-frame {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    pointer-events: none;
    z-index: 2;
}

.illustration-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink), var(--accent-cyan));
    border-radius: 18px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(12px);
}

.ending-illustration:hover .illustration-glow {
    opacity: 0.5;
    animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
    0% { filter: blur(12px) hue-rotate(0deg); }
    100% { filter: blur(12px) hue-rotate(360deg); }
}

/* 插画加载占位 */
.ending-illustration.loading::before {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 1;
}

.ending-illustration::before {
    content: '[结局插画]';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 1;
    pointer-events: none;
}

.ending-illustration img[src]:not([src=""]) ~ .illustration-frame::before {
    display: none;
}

/* 标签云 */
.ending-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.tag-primary {
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.tag-secondary {
    background: rgba(170, 0, 255, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(170, 0, 255, 0.3);
}

.tag-accent {
    background: rgba(255, 0, 170, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 0, 170, 0.3);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 人格标签 - 重点展示样式 */
.ending-personality-tag {
    position: relative;
    text-align: center;
    padding: 1.2rem 1.5rem;
    margin: 0.5rem auto;
    max-width: 90%;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(255, 107, 53, 0.1));
    border: 2px solid rgba(255, 51, 102, 0.4);
    border-radius: 12px;
    overflow: hidden;
    animation: tagPulse 2s ease-in-out infinite alternate;
    word-wrap: break-word;
    word-break: break-all;
}

@keyframes tagPulse {
    0% {
        box-shadow: 0 0 20px rgba(255, 51, 102, 0.2), inset 0 0 20px rgba(255, 51, 102, 0.05);
        border-color: rgba(255, 51, 102, 0.4);
    }
    100% {
        box-shadow: 0 0 40px rgba(255, 51, 102, 0.4), inset 0 0 30px rgba(255, 51, 102, 0.1);
        border-color: rgba(255, 51, 102, 0.7);
    }
}

.personality-tag-label {
    font-size: 0.75rem;
    color: var(--text-danger);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.personality-tag-name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 5vw, 2rem);
    color: var(--text-primary);
    text-shadow: 
        0 0 10px rgba(255, 51, 102, 0.8),
        0 0 30px rgba(255, 51, 102, 0.5),
        0 0 60px rgba(255, 51, 102, 0.3);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
    line-height: 1.3;
    word-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
}

.personality-tag-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(255, 51, 102, 0.2), transparent 70%);
    z-index: 1;
    pointer-events: none;
    animation: glowBreathe 3s ease-in-out infinite alternate;
}

@keyframes glowBreathe {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* 性格描述金句 */
.ending-quote {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--accent-cyan);
    border-right: 3px solid var(--accent-cyan);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    max-width: 100%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.ending-quote::before {
    content: '"';
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-right: 0.25rem;
}

.ending-quote::after {
    content: '"';
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-left: 0.25rem;
}

/* 六维雷达图 */
.ending-radar {
    width: 100%;
    max-width: 280px;
    margin: 0.5rem 0;
}

.ending-radar canvas {
    width: 100%;
    height: auto;
}

/* 详细数据 */
.ending-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* 系统评价 */
.ending-description {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    border-left: 3px solid var(--accent-orange);
    width: 100%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
}

.ending-suggestion {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* 分享区 */
.share-section {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

.share-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.share-btn:hover,
.share-btn:active {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ending-content {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .ending-illustration {
        max-width: 100%;
        aspect-ratio: 3/4;
    }
    
    .ending-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }
    
    .ending-quote {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .stat-row {
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .ending-radar {
        max-width: 240px;
    }
}

/* 桌面端适配 */
@media (min-width: 769px) {
    .ending-content {
        max-width: 600px;
        padding: 3rem 2rem;
    }
    
    .ending-illustration {
        max-width: 400px;
    }
    
    .ending-stats {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ===== 结局页紧凑版 ===== */
.ending-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.ending-id-compact {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.ending-title-compact {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    color: var(--text-primary);
    text-shadow: 
        0 0 8px var(--accent-cyan),
        0 0 30px rgba(0, 240, 255, 0.3);
    margin: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    display: inline-block;
    animation: titleGlow 3s ease-in-out infinite alternate, fadeInUp 0.6s ease-out forwards;
}

.ending-personality-tag-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 255, 136, 0.05));
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
}

.ending-personality-tag-compact .tag-label {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.ending-personality-tag-compact .tag-name {
    color: var(--accent-cyan);
    font-weight: bold;
}

.ending-illustration-compact {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    animation: fadeInUp 0.8s ease-out forwards;
}

.illustration-img-compact {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ending-quote-compact {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
    padding: 0.75rem 1rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    width: 100%;
    border-left: 2px solid rgba(0, 240, 255, 0.3);
}

.ending-radar-compact {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    animation: fadeInUp 0.7s ease-out 0.2s forwards;
    opacity: 0;
    /* Performance: Canvas optimization */
    contain: layout style;
}

.ending-radar-compact canvas {
    width: 100%;
    height: auto;
}

.ending-stats-compact {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    animation: fadeInUp 0.7s ease-out 0.3s forwards;
    opacity: 0;
}

.stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-value-compact {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 0.2rem;
}

.stat-label-compact {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ending-description-compact {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    border-left: 2px solid var(--accent-orange);
    width: 100%;
    line-height: 1.5;
}

.ending-suggestion-compact {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem;
    border-radius: 4px;
}

.share-buttons-compact {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    animation: fadeInUp 0.7s ease-out 0.6s forwards;
    opacity: 0;
}

.share-btn-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-normal);
    flex: 1;
    max-width: 160px;
}

.share-btn-compact:hover,
.share-btn-compact:active {
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.share-btn-compact.secondary {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

/* 移动端紧凑适配 */
@media (max-width: 768px) {
    .ending-content {
        padding: 0.75rem 1rem;
        gap: 0.6rem;
    }
    
    .ending-illustration-compact {
        max-width: 100%;
        aspect-ratio: 3/4;
    }
    
    .ending-title-compact {
        font-size: clamp(1.4rem, 8vw, 1.8rem);
        padding: 0.3rem 0.6rem;
    }
    
    .ending-quote-compact {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    .stat-cell {
        padding: 0.5rem;
    }
    
    .ending-radar-compact {
        max-width: 180px;
    }
    
    .neo-panel {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .personality-stamp {
        padding: 0.5rem 1rem;
    }
    
    .stamp-text {
        font-size: 0.9rem;
    }
    
    .energy-bars {
        padding: 0.5rem;
        gap: 0.4rem;
    }
    
    .energy-bar {
        grid-template-columns: 60px 1fr 40px;
        gap: 0.3rem;
    }
    
    .energy-label {
        font-size: 0.6rem;
    }
    
    .energy-value {
        font-size: 0.7rem;
    }
    
    .ending-zinger {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .share-buttons-compact {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .share-btn-compact {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ===== 模态框 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 90%;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.screenshot-preview {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* 返回确认模态框 */
.back-modal-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.back-modal-title {
    font-size: 1.25rem;
    color: var(--text-warning);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.back-modal-message {
    text-align: center;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.highlight-danger {
    color: var(--text-danger);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

.cyber-btn.danger {
    border-color: var(--text-danger);
    color: var(--text-danger);
}

.cyber-btn.danger:hover,
.cyber-btn.danger:active {
    background: rgba(255, 51, 102, 0.1);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
}

/* ===== 截图分享模态框 - 卡片式设计 ===== */
#screenshot-modal .modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    max-width: 860px;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.screenshot-header {
    text-align: center;
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.screenshot-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.screenshot-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.screenshot-preview {
    background: var(--bg-primary);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* 分享卡片内部样式 - 新版优化 */
.share-card {
    width: 100%;
    max-width: 340px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.share-card-header {
    text-align: center;
    width: 100%;
}

.share-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.share-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* 插画 - 视觉重心 */
.share-card-illustration-main {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.share-card-illustration-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.illustration-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.8), transparent);
    pointer-events: none;
}

.share-card-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text-primary);
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    margin: 0.25rem 0;
}

/* 人格标签 */
.share-card-personality {
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(255, 107, 53, 0.1));
    border: 1px solid rgba(255, 51, 102, 0.4);
    border-radius: 8px;
    width: 100%;
}

.share-personality-label {
    font-size: 0.7rem;
    color: var(--text-danger);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.share-personality-name {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

/* 金句高亮 */
.share-card-quote-highlight {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent-cyan);
    border-right: 3px solid var(--accent-cyan);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    width: 100%;
}

/* 分享卡片雷达图 */
.share-card-radar {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.share-card-radar canvas {
    max-width: 240px;
    max-height: 240px;
}



/* 核心数据 - 三列展示 */
.share-card-key-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0;
}

.key-stat {
    text-align: center;
    flex: 1;
}

.key-stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    font-family: var(--font-mono);
    margin-bottom: 0.25rem;
}

.key-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.key-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

/* 共鸣文案 */
.share-card-resonance {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0.75rem;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    width: 100%;
}

.share-card-footer {
    width: 100%;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-card-cta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 0.1em;
}

.choice-btn:focus-visible {
    outline: 2px solid rgba(0, 240, 255, 0.7);
    outline-offset: 2px;
}

/* 分享弹窗 V2：仅保留插画 + 人格类型 + 系统结论 */
#screenshot-modal {
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(10px) !important;
}

#screenshot-modal .screenshot-header {
    display: none !important;
}

#screenshot-modal .modal-content.screenshot-card {
    width: 420px !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 36px) !important;
    overflow: hidden !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#screenshot-modal .screenshot-preview {
    padding: 0 !important;
    background: transparent !important;
    overflow-y: auto !important;
}

#screenshot-modal .share-card-preview,
#mobile-share-host .share-card-preview {
    position: relative;
    width: 390px;
    max-width: 100%;
    min-height: 690px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top, rgba(0, 212, 255, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(4, 10, 22, 0.96), rgba(2, 6, 14, 0.98));
    border: 0;
    box-shadow:
        inset 0 0 22px rgba(0, 212, 255, 0.05);
    font-family: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

#screenshot-modal .share-card-preview::before,
#mobile-share-host .share-card-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.035) 0px,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 3px,
        transparent 6px
    );
    opacity: 0.18;
}

#screenshot-modal .share-card-header,
#mobile-share-host .share-card-header {
    position: relative;
    z-index: 1;
}

#screenshot-modal .share-card-kicker,
#mobile-share-host .share-card-kicker {
    font-family: Orbitron, monospace;
    font-size: 11px;
    letter-spacing: 5px;
    color: rgba(0, 212, 255, 0.85);
    text-align: center;
}

#screenshot-modal .share-card-title,
#mobile-share-host .share-card-title {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 800;
    color: #00d4ff;
    text-align: center;
    text-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
    font-family: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

#screenshot-modal .share-illustration,
#mobile-share-host .share-illustration {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.14);
}

#screenshot-modal .share-illustration img,
#mobile-share-host .share-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.86) contrast(1.08) saturate(0.95);
}

#screenshot-modal .share-personality-panel,
#mobile-share-host .share-personality-panel {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    padding: 22px 16px;
    border-radius: 14px;
    background: rgba(0, 18, 32, 0.56);
    border: 1px solid rgba(0, 212, 255, 0.18);
    text-align: center;
}

#screenshot-modal .section-label,
#mobile-share-host .section-label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    text-align: left;
    margin-bottom: 14px;
}

#screenshot-modal .section-label span,
#mobile-share-host .section-label span {
    display: inline-block;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    font-family: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

#screenshot-modal .section-label em,
#mobile-share-host .section-label em {
    display: inline-block;
    margin-top: 0;
    font-family: Orbitron, monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(150, 170, 200, 0.75);
    font-style: normal;
}

#screenshot-modal .share-personality-name,
#mobile-share-host .share-personality-name {
    font-size: 42px;
    line-height: 1.05;
    font-weight: 900;
    color: #00d4ff;
    text-shadow:
        0 0 18px rgba(0, 212, 255, 0.42),
        0 0 40px rgba(0, 212, 255, 0.16);
}

#screenshot-modal .share-personality-en,
#mobile-share-host .share-personality-en {
    margin-top: 8px;
    font-family: Orbitron, monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(0, 212, 255, 0.75);
}

#screenshot-modal .share-conclusion-panel,
#mobile-share-host .share-conclusion-panel {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    padding: 20px 18px;
    border-radius: 14px;
    background: rgba(0, 12, 24, 0.62);
    border: 1px solid rgba(0, 212, 255, 0.18);
}

#screenshot-modal .share-conclusion-quote,
#mobile-share-host .share-conclusion-quote {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.8;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    font-family: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

#screenshot-modal .share-conclusion-quote::before,
#mobile-share-host .share-conclusion-quote::before {
    content: "“";
    color: #00d4ff;
    font-size: 42px;
    line-height: 0;
    vertical-align: -14px;
    margin-right: 6px;
}

#screenshot-modal .share-conclusion-quote::after,
#mobile-share-host .share-conclusion-quote::after {
    content: "”";
    color: #00d4ff;
    font-size: 34px;
    line-height: 0;
    vertical-align: -10px;
    margin-left: 4px;
}

#screenshot-modal .modal-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
    padding: 0 2px;
    border-top: 0 !important;
    margin-bottom: 6px;
}

#screenshot-modal .modal-buttons .cyber-btn {
    height: 58px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    font-family: "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif !important;
    background: rgba(0, 10, 20, 0.76) !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

#screenshot-modal .modal-buttons .cyber-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 48%),
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.03) 0,
            rgba(255,255,255,0.03) 1px,
            transparent 3px,
            transparent 6px
        );
    opacity: 0.75;
}

#screenshot-modal #btn-download {
    color: #00d4ff !important;
    border: 1px solid rgba(0, 212, 255, 0.55) !important;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.16) !important;
}

#screenshot-modal #btn-close-modal {
    color: #ff4fa3 !important;
    border: 1px solid rgba(255, 63, 160, 0.42) !important;
    box-shadow: 0 0 24px rgba(255, 63, 160, 0.12) !important;
}

#screenshot-modal #btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 34px rgba(0, 212, 255, 0.28) !important;
}

#screenshot-modal #btn-close-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 34px rgba(255, 63, 160, 0.22) !important;
}

@media (max-width: 480px) {
    #screenshot-modal {
        padding: 12px !important;
    }

    #screenshot-modal .modal-content.screenshot-card {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 8px !important;
    }

    #screenshot-modal .share-card-preview {
        width: calc(100vw - 28px);
        min-height: auto;
        max-height: calc(100vh - 150px);
        padding: 16px;
    }

    #screenshot-modal .share-personality-name {
        font-size: 34px;
    }

    #screenshot-modal .share-conclusion-quote {
        font-size: 15px;
        line-height: 1.7;
    }

    #screenshot-modal .modal-buttons {
        gap: 10px;
    }

    #screenshot-modal .modal-buttons .cyber-btn {
        height: 52px;
        font-size: 16px;
    }
}

/* 旧样式兼容 */
.share-card-illustration {
    width: 100%;
    max-height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.share-card-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
}

.share-tag-secondary {
    background: rgba(255, 107, 53, 0.2) !important;
    border-color: var(--accent-orange) !important;
    color: var(--accent-orange) !important;
}

.share-card-quote {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.4rem;
    border-left: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
    line-height: 1.4;
}

.share-card-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-stat-section {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.share-stat-section-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.2rem;
}

.share-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.share-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.share-stat-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: bold;
    font-family: var(--font-mono);
}

.share-card-stat {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.share-card-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.share-card-stat-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: bold;
}

.share-card-disclaimer {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
}

#screenshot-modal .modal-buttons {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}


/* ===== 工具类 ===== */
.hidden {
    display: none !important;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes glitch {
    0%, 90%, 100% { 
        text-shadow: 0 0 10px var(--accent-cyan), 0 0 40px rgba(0, 240, 255, 0.3);
    }
    92% {
        text-shadow: -2px 0 var(--accent-pink), 2px 0 var(--accent-cyan);
    }
    94% {
        text-shadow: 2px 0 var(--accent-pink), -2px 0 var(--accent-cyan);
    }
    96% {
        text-shadow: 0 0 10px var(--accent-cyan), 0 0 40px rgba(0, 240, 255, 0.3);
    }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* screenshot modal final overrides */
#screenshot-modal .modal-buttons {
    padding: 0 2px !important;
    border-top: 0 !important;
}

/* screenshot modal: remove only the outer card frame, keep inner panel borders */
#screenshot-modal .share-card-preview {
    border: 1px solid rgba(0, 212, 255, 0.28) !important;
    outline: none !important;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.12) !important;
}

/* screenshot preview wrapper: remove square frame around the whole preview area */
#screenshot-modal #screenshot-preview,
#screenshot-modal .screenshot-preview,
#screenshot-modal .modal-content.screenshot-card {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 扫描线效果 */
#game-screen::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 100;
}

/* 全局扫描线移动动画 */
@keyframes scanlineMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ===== 响应式适配 ===== */
@media (min-width: 768px) {
    .panel-content {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .ending-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .choices-container {
        padding: 1.5rem;
    }
    
    .story-container {
        padding: 1.5rem;
    }
    
    /* 桌面端更大字体 */
    .story-text {
        font-size: 1.05rem;
        line-height: 2;
    }
    
    .choice-btn {
        font-size: 1rem;
        padding: 1.3rem 1.8rem;
    }
}

@media (min-width: 1024px) {
    .boot-content {
        max-width: 600px;
    }
    
    .ending-content {
        max-width: 600px;
        padding: 3rem;
    }
    
    .story-text {
        font-size: 1.1rem;
    }
}

/* 横屏手机适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .personality-panel {
        max-height: 30vh;
        overflow-y: auto;
    }
    
    .panel-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .boot-logo {
        font-size: 1.5rem;
    }
}

/* 小屏幕手机 */
@media (max-width: 360px) {
    .status-bar {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
    
    .dimension {
        grid-template-columns: 70px 1fr 30px;
    }
    
    .choice-btn {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    .story-text {
        font-size: 0.95rem;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .story-container {
        padding: 2rem;
    }
    
    .choices-container {
        padding: 1.5rem 2rem;
    }
    
    .ending-content {
        max-width: 550px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before,
    body::after {
        animation: none !important;
    }
}

/* 暗色模式 (默认就是暗色) */
@media (prefers-color-scheme: light) {
    /* 保持暗色主题，因为这是赛博朋克风格 */
}

/* ===== 打印样式 (用于截图) ===== */
@media print {
    body {
        background: var(--bg-primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== ҳ - ޺ϵͳ ===== */

/* װԪز */
.ending-decor-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* ʮƴ */
.decor-hex-code {
    position: absolute;
    top: 5%;
    right: 3%;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(0, 240, 255, 0.3);
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    animation: hexFloat 6s ease-in-out infinite;
}

@keyframes hexFloat {
    0%, 100% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(-10px); }
}

/* װ */
.decor-barcode {
    position: absolute;
    bottom: 8%;
    left: 2%;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 0.2em;
    transform: rotate(-90deg);
    transform-origin: left center;
}

/* άװ */
.decor-qr {
    position: absolute;
    top: 15%;
    left: 3%;
    display: grid;
    grid-template-columns: repeat(3, 6px);
    grid-template-rows: repeat(3, 6px);
    gap: 2px;
    opacity: 0.3;
}

.qr-block {
    background: rgba(0, 240, 255, 0.4);
    border-radius: 1px;
}

.qr-block.active {
    background: rgba(255, 0, 170, 0.6);
    animation: qrPulse 2s infinite;
}

@keyframes qrPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ʮ׼ */
.decor-crosshair {
    position: absolute;
    bottom: 20%;
    right: 5%;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 0, 170, 0.3);
    border-radius: 50%;
    animation: crosshairRotate 8s linear infinite;
}

.decor-crosshair::before,
.decor-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 0, 170, 0.3);
}

.decor-crosshair::before {
    top: 50%;
    left: 20%;
    width: 60%;
    height: 1px;
    transform: translateY(-50%);
}

.decor-crosshair::after {
    left: 50%;
    top: 20%;
    width: 1px;
    height: 60%;
    transform: translateX(-50%);
}

@keyframes crosshairRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== ޺ (Neo-Container) ===== */
.neo-panel {
    background: rgba(18, 18, 26, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    /* Performance: Reduce blur cost on mobile */
    contain: layout style paint;
}

.neo-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.6;
}

.neo-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-right: 1px solid rgba(0, 240, 255, 0.2);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.panel-label {
    font-size: 0.65rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* ͬ޺ɫ */
.illustration-panel {
    border-color: rgba(0, 240, 255, 0.25);
}

.radar-panel {
    border-color: rgba(170, 0, 255, 0.25);
}

.radar-panel::before {
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.stats-panel {
    border-color: rgba(255, 0, 170, 0.25);
}

.stats-panel::before {
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
}

.conclusion-panel {
    border-color: rgba(255, 107, 53, 0.25);
}

.conclusion-panel::before {
    background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
}

/* ===== Ϣ ===== */
.ending-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ending-timestamp {
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
}

/* ===== ˸ǩӡ ===== */
.personality-stamp {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem auto;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 51, 102, 0.5);
    border-radius: 4px;
    transform: rotate(-3deg) translateZ(0);
    animation: stampGlitch 3s infinite;
    /* Performance: Already has will-change from global rule */
    contain: layout style;
}

@keyframes stampGlitch {
    0%, 90%, 100% { transform: rotate(-3deg); filter: none; }
    91% { transform: rotate(-3deg) translateX(2px); filter: hue-rotate(90deg); }
    92% { transform: rotate(-3deg) translateX(-2px); filter: hue-rotate(-90deg); }
    93% { transform: rotate(-3deg); filter: none; }
}

.stamp-rank {
    font-size: 0.6rem;
    color: var(--accent-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.stamp-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-danger);
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
    letter-spacing: 0.05em;
}

.stamp-danger {
    font-size: 0.6rem;
    color: var(--text-warning);
    margin-top: 0.2rem;
    letter-spacing: 0.1em;
}

/* ===== ϵͳ ===== */
.energy-bars {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem;
    border-radius: 8px;
    animation: fadeInUp 0.7s ease-out 0.4s forwards;
    opacity: 0;
}

.energy-bar {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 0.5rem;
}

.energy-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.energy-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), rgba(0, 240, 255, 0.6));
    border-radius: 4px;
    transition: width 1s ease-out;
    position: relative;
}

.energy-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    border-radius: 0 4px 4px 0;
}

.energy-fill.danger {
    background: linear-gradient(90deg, var(--text-danger), rgba(255, 51, 102, 0.6));
}

.energy-fill.success {
    background: linear-gradient(90deg, var(--text-success), rgba(0, 255, 136, 0.6));
}

.energy-fill.warning {
    background: linear-gradient(90deg, var(--text-warning), rgba(255, 107, 53, 0.6));
}

/* ֵ嶯 */
.energy-fill.pulse {
    animation: energyPulse 2s infinite;
}

@keyframes energyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.energy-value {
    font-size: 0.75rem;
    color: var(--text-primary);
    text-align: right;
    font-weight: bold;
}

/* =====  ===== */
.ending-zinger {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    text-align: center;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 240, 255, 0.15);
    font-style: italic;
    line-height: 1.6;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    animation: fadeInUp 0.7s ease-out 0.5s forwards;
    opacity: 0;
}

/* ===== Ӧʽ ===== */
@media (max-width: 768px) {
    .decor-hex-code,
    .decor-barcode,
    .decor-qr,
    .decor-crosshair {
        display: none;
    }
    
    .energy-bar {
        grid-template-columns: 70px 1fr 45px;
    }
    
    .energy-label {
        font-size: 0.65rem;
    }
    
    .stamp-text {
        font-size: 0.95rem;
    }
}

/* ===== 底部固定按钮栏 ===== */
.ending-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    z-index: 100;
    /* Performance: Promote to own layer */
    will-change: transform;
    transform: translateZ(0);
}

.ending-actions-bar .cyber-btn,
.ending-actions-bar .share-btn-compact {
    flex: 1;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 可访问性：焦点样式 ===== */
.share-btn-compact:focus-visible,
.ending-actions-bar .cyber-btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.2);
}

/* ===== 扫描线效果 ===== */
.ending-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 240, 255, 0.02) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ===== 角落装饰 ===== */
.corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-cyan);
    border-style: solid;
    pointer-events: none;
    opacity: 0.6;
}

.corner-accent.top-left {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.corner-accent.top-right {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.corner-accent.bottom-left {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.corner-accent.bottom-right {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* ===== 霓虹边框增强 ===== */
.neo-panel {
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(0, 240, 255, 0.05),
        0 0 20px rgba(0, 240, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

.neo-panel:hover {
    box-shadow: 
        inset 0 0 30px rgba(0, 240, 255, 0.1),
        0 0 30px rgba(0, 240, 255, 0.2);
}

/* 不同面板的霓虹色 */
.illustration-panel {
    box-shadow: 
        inset 0 0 20px rgba(0, 240, 255, 0.05),
        0 0 20px rgba(0, 240, 255, 0.1);
}

.illustration-panel:hover {
    box-shadow: 
        inset 0 0 30px rgba(0, 240, 255, 0.1),
        var(--glow-cyan);
}

.radar-panel {
    box-shadow: 
        inset 0 0 20px rgba(170, 0, 255, 0.05),
        0 0 20px rgba(170, 0, 255, 0.1);
}

.radar-panel:hover {
    box-shadow: 
        inset 0 0 30px rgba(170, 0, 255, 0.1),
        var(--glow-purple);
}

.stats-panel {
    box-shadow: 
        inset 0 0 20px rgba(255, 0, 170, 0.05),
        0 0 20px rgba(255, 0, 170, 0.1);
}

.stats-panel:hover {
    box-shadow: 
        inset 0 0 30px rgba(255, 0, 170, 0.1),
        var(--glow-pink);
}

.conclusion-panel {
    box-shadow: 
        inset 0 0 20px rgba(255, 107, 53, 0.05),
        0 0 20px rgba(255, 107, 53, 0.1);
}

.conclusion-panel:hover {
    box-shadow: 
        inset 0 0 30px rgba(255, 107, 53, 0.1),
        var(--glow-orange);
}

/* ===== 威胁等级徽章 ===== */
.threat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
    transition: all 0.3s ease;
}

.threat-badge[data-level="low"] {
    color: var(--text-success);
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.1);
}

.threat-badge[data-level="medium"] {
    color: var(--text-warning);
    border-color: rgba(255, 107, 53, 0.5);
    background: rgba(255, 107, 53, 0.1);
}

.threat-badge[data-level="high"] {
    color: var(--text-danger);
    border-color: rgba(255, 51, 102, 0.5);
    background: rgba(255, 51, 102, 0.1);
}

.threat-badge[data-level="extreme"] {
    color: var(--accent-purple);
    border-color: rgba(170, 0, 255, 0.5);
    background: rgba(170, 0, 255, 0.1);
    animation: threatPulse 2s infinite;
}

@keyframes threatPulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(170, 0, 255, 0.3);
        opacity: 1;
    }
    50% { 
        box-shadow: 0 0 15px rgba(170, 0, 255, 0.6);
        opacity: 0.9;
    }
}

/* ===== 布局系统 ===== */
.ending-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    margin: 1rem 0;
}

.ending-left,
.ending-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ending-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ending-left {
        order: 2;
    }
    
    .ending-right {
        order: 1;
    }
}

/* ===== 可访问性：打印样式 ===== */
@media print {
    .ending-decor-layer,
    .ending-actions-bar,
    .share-buttons-compact,
    .ending-screen::before {
        display: none !important;
    }
    
    .ending-content {
        background: white;
        color: black;
    }
    
    .neo-panel {
        border: 1px solid #ccc;
        background: white;
    }
}

/* ===== 结局页UI优化 - 克制的高级感 ===== */

/* 结局页专用变量 */
:root {
    /* 结局页6档固定字号 */
    --ending-size-xs: 11px;   /* 英文辅助标签 */
    --ending-size-sm: 13px;   /* 次要信息 */
    --ending-size-md: 16px;   /* 正文 */
    --ending-size-lg: 22px;   /* 小标题 */
    --ending-size-xl: 32px;   /* 标题 */
    --ending-size-2xl: 48px;  /* 大标题 */
    
    /* 结局页4层背景 */
    --ending-bg-base: #03040a;
    --ending-bg-grid: rgba(0, 234, 255, 0.03);
    --ending-bg-gradient: linear-gradient(180deg, rgba(3,6,12,0.9) 0%, rgba(3,6,12,0.4) 50%, rgba(3,6,12,0.9) 100%);
    --ending-bg-vignette: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.6) 100%);
}

/* 结局页4层背景系统 */
.ending-screen {
    position: relative;
    background: var(--ending-bg-base);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ending-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        var(--ending-bg-vignette),
        var(--ending-bg-gradient);
    pointer-events: none;
    z-index: 1;
}

.ending-screen::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 234, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* 结局页内容层 */
.ending-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* HUD角点装饰 - 仅用于结局面板 */
.ending-hud-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: rgba(0, 234, 255, 0.4);
    border-style: solid;
    pointer-events: none;
    transition: all 0.3s ease;
}

.ending-hud-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.ending-hud-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.ending-hud-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.ending-hud-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* 结局页面板基础 - 带HUD角点 */
.ending-panel {
    position: relative;
    background: rgba(6, 10, 18, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 234, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.ending-panel:hover {
    border-color: rgba(0, 234, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.05);
}

.ending-panel:hover .ending-hud-corner {
    border-color: rgba(0, 234, 255, 0.6);
    width: 12px;
    height: 12px;
}

/* 结局页标题 - 唯一发光元素（15%规则） */
.ending-title-compact {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    /* 唯一发光效果 */
    text-shadow: 
        0 0 12px rgba(0, 234, 255, 0.9),
        0 0 28px rgba(0, 234, 255, 0.28);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 结局页副标题/标签 - 不发光 */
.ending-label {
    font-size: var(--ending-size-xs);
    color: #8aa7bc;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

/* 结局页人格标签 - 大印章效果 */
.ending-personality-tag-compact {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem auto;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 46, 166, 0.5);
    border-radius: 4px;
    transform: rotate(-2deg) translateZ(0);
    animation: stampGlitch 3s infinite;
}

.ending-personality-tag-compact .tag-label {
    font-size: var(--ending-size-xs);
    color: #ff74c2;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.ending-personality-tag-compact .tag-name {
    font-family: var(--font-display);
    font-size: var(--ending-size-xl);
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.05em;
    /* 轻微发光，属于15%的一部分 */
    text-shadow: 0 0 10px rgba(255, 46, 166, 0.5);
}

/* 结局页插画 - 视觉重心 */
.ending-illustration-compact {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(0, 234, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.ending-illustration-compact:hover {
    transform: translateY(-2px);
}

.ending-illustration-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 结局页引用语 */
.ending-quote-compact {
    font-size: var(--ending-size-md);
    color: #b8c8d8;
    text-align: center;
    font-style: italic;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border-left: 2px solid rgba(0, 234, 255, 0.3);
    width: 100%;
}

/* 结局页雷达图 */
.ending-radar-compact {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.ending-radar-compact canvas {
    width: 100%;
    height: auto;
}

/* 结局页统计数据 - 带英文辅助标签 */
.ending-stats-compact {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: rgba(6, 10, 18, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(0, 234, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-cell:hover {
    border-color: rgba(0, 234, 255, 0.2);
}

.stat-value-compact {
    font-size: var(--ending-size-lg);
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label-compact {
    font-size: var(--ending-size-xs);
    color: #8aa7bc;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 英文辅助标签 */
.stat-en-label {
    font-size: 10px;
    color: rgba(138, 167, 188, 0.5);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* 结局页描述文本 */
.ending-description-compact {
    font-size: var(--ending-size-sm);
    color: #a0b0c0;
    text-align: center;
    line-height: 1.6;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border-left: 2px solid rgba(255, 107, 53, 0.3);
    width: 100%;
}

/* 结局页建议文本 */
.ending-suggestion-compact {
    font-size: var(--ending-size-xs);
    color: #8aa7bc;
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    width: 100%;
}

/* 结局页分享按钮 */
.share-buttons-compact {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.share-btn-compact {
    position: relative;
    background: rgba(6, 10, 18, 0.8);
    border: 1px solid rgba(0, 234, 255, 0.2);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: var(--ending-size-sm);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 160px;
    overflow: hidden;
}

.share-btn-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.share-btn-compact:hover::before {
    left: 100%;
}

.share-btn-compact:hover {
    border-color: rgba(0, 234, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-btn-compact.secondary {
    background: transparent;
    border-color: rgba(138, 167, 188, 0.2);
    color: #8aa7bc;
}

.share-btn-compact.secondary:hover {
    border-color: rgba(138, 167, 188, 0.4);
}

/* 结局页底部固定按钮栏 */
.ending-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(3, 4, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 234, 255, 0.15);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    z-index: 100;
}

/* 结局页移动端适配 */
@media (max-width: 768px) {
    .ending-content {
        padding: 1rem 1rem 4rem;
        gap: 0.6rem;
    }
    
    .ending-title-compact {
        font-size: clamp(1.4rem, 8vw, 1.8rem);
        padding: 0.4rem 0.75rem;
    }
    
    .ending-illustration-compact {
        max-width: 100%;
    }
    
    .ending-quote-compact {
        font-size: var(--ending-size-sm);
        padding: 0.75rem;
    }
    
    .stat-cell {
        padding: 0.6rem;
    }
    
    .ending-radar-compact {
        max-width: 180px;
    }
    
    .ending-panel {
        padding: 1rem;
    }
}

/* ===== 原有结局页样式保留（兼容） ===== */

/* 结局页面主容器 */
#ending-screen {
    background: #03040a;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 赛博屏幕 */
.cyber-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: #04060d;
}

/* 背景层 */
.bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            rgba(3, 6, 12, 0.45),
            rgba(3, 6, 12, 0.72)
        ),
        url("");
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.03);
}

/* 扫描线 */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0.018) 1px,
            transparent 2px,
            transparent 4px
        );
    mix-blend-mode: soft-light;
    opacity: 0.35;
}

/* HUD噪点 */
.noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.06;
}

/* 玻璃质感 */
.glass {
    position: relative;
    background: rgba(6, 10, 18, 0.62);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 234, 255, 0.28);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 30px rgba(0, 234, 255, 0.05);
}

/* 结局页面主容器 */
#ending-screen {
    background: #03040a;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 赛博屏幕 */
.cyber-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: #04060d;
}

/* 背景层 */
.bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            rgba(3, 6, 12, 0.45),
            rgba(3, 6, 12, 0.72)
        ),
        url("");
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.03);
}

/* 扫描线 */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0.018) 1px,
            transparent 2px,
            transparent 4px
        );
    mix-blend-mode: soft-light;
    opacity: 0.35;
}

/* HUD噪点 */
.noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.06;
}

/* 玻璃质感 */
.glass {
    position: relative;
    background: rgba(6, 10, 18, 0.62);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 234, 255, 0.28);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 30px rgba(0, 234, 255, 0.05);
}

.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

/* ===== 三周目专属结局页（独立） ===== */
#author-ending-screen,
#author-ending-screen * {
    box-sizing: border-box;
}

:root {
    --font-cn: "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --font-mono: "JetBrains Mono", "Share Tech Mono", "IBM Plex Mono", monospace;
}

#author-ending-screen.author-ending-screen {
    position: relative;
    background: #030812;
    overflow: hidden;
}

.author-ending-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(3, 8, 18, 0.74), rgba(2, 6, 14, 0.86)),
        url('assets/backgrounds/bg_a6_author_residue_page.webp') center/cover no-repeat;
    filter: saturate(0.95);
}

.author-ending-shell,
.author-ending-page {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding: 24px 32px 20px;
    font-family: var(--font-cn);
    display: flex;
    flex-direction: column;
    --ae-title-size: 18px;
    --ae-section-title-size: 16px;
    --ae-body-size: 13px;
    --ae-small-size: 11px;
    --ae-button-title-size: 20px;
    --ae-button-sub-size: 11px;
}

.author-ending-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 14px;
    border-bottom: 1px solid rgba(120, 180, 200, 0.18);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: rgba(210, 230, 240, 0.72);
    font-family: var(--font-mono);
}

.author-ending-topbar .top-center {
    text-align: center;
}

.author-ending-topbar .top-right {
    text-align: right;
}

.author-ending-layout {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: 28% 40% 30%;
    gap: 24px;
    align-items: stretch;
    overflow: hidden;
    max-width: 1680px;
    margin: 6px auto 10px;
}

.author-panel {
    background: rgba(4, 14, 22, 0.72);
    border: 1px solid rgba(120, 190, 220, 0.18);
    box-shadow: inset 0 0 24px rgba(0, 180, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.author-left-col,
.author-right-col,
.author-left-panel,
.author-right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.author-mid-col,
.author-center-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.author-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: rgba(236, 245, 252, 0.94);
}

.author-panel-head h3 {
    margin: 0;
    font-size: var(--ae-section-title-size);
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

#author-ending-serial {
    display: none;
}

.author-identity-body.identity-section {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 12px;
    border: 1px solid rgba(113, 157, 191, 0.2);
    border-radius: 6px;
    padding: 10px;
}

.author-identity-avatar-wrap img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(110, 173, 214, 0.26);
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.author-identity-fields {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: rgba(219, 231, 241, 0.92);
    font-size: var(--ae-body-size);
    line-height: 1.8;
}

.author-identity-fields strong {
    font-weight: 500;
    color: rgba(178, 206, 226, 0.95);
}

.author-memory-wrap.memory-section {
    margin-top: 10px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.author-memory-title {
    color: rgba(226, 241, 252, 0.92);
    font-size: 15px;
    margin-bottom: 10px;
    white-space: nowrap;
}

.author-memory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    overflow: hidden;
}

.author-memory-card {
    position: relative;
    display: block;
    border: 1px solid rgba(96, 152, 192, 0.18);
    border-radius: 6px;
    padding: 0;
    flex: 1;
    min-height: 0;
    max-height: 156px;
    background: rgba(2, 10, 18, 0.4);
    overflow: hidden;
}

.author-memory-card img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.memory-meta {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0, 10, 18, 0.48) 0%, rgba(0, 8, 16, 0.68) 72%, rgba(0, 8, 16, 0.78) 100%);
    pointer-events: none;
}

.memory-index {
    color: #ff7f5f;
    font-size: 12px;
    line-height: 1;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.memory-index::after {
    content: attr(data-title);
    color: #eef8ff;
    font-family: var(--font-cn);
    font-size: 15px;
    font-weight: 600;
}

.memory-head {
    display: none;
}

.memory-meta p {
    margin: 0;
    color: rgba(236, 246, 252, 0.9);
    font-size: 12px;
    line-height: 1.55;
    opacity: 0.78;
    max-width: 94%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.author-note-card.author-note-wrapper {
    flex: 0 0 auto;
    min-height: 0;
    max-height: calc(100% - 208px);
    overflow: hidden;
    padding: 14px 18px 12px;
}

.author-note-paper {
    width: 82%;
    max-width: 640px;
    margin: 8px auto 0;
    height: auto;
    max-height: 520px;
    aspect-ratio: 1 / 0.72;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: #1a1e25;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    overflow: hidden;
}

.author-note-figure {
    width: 92%;
    height: 92%;
    display: block;
    margin: auto;
    object-fit: contain;
    object-position: center;
}

.note-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.note-body {
    font-size: 16px;
    line-height: 1.95;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
    white-space: pre-wrap;
}

.note-sign {
    text-align: right;
    font-size: 16px;
    margin-top: 28px;
}

.note-content,
.author-note-paper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding: 0;
}

.author-ending-actions {
    flex: 0 0 178px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
    margin-top: 4px;
}

.author-ending-btn {
    width: 76%;
    max-width: 620px;
    min-width: 460px;
    height: 72px;
    border-radius: 6px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.author-ending-btn .btn-icon {
    display: none;
}

.author-ending-btn .btn-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.author-ending-btn .btn-title {
    font-family: var(--font-cn);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.author-ending-btn .btn-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.16em;
    opacity: 0.74;
    line-height: 1;
    margin-top: 5px;
}

.author-ending-btn:hover {
    transform: translateY(-2px);
}

.author-ending-btn.share-btn {
    background: rgba(0, 55, 90, 0.46);
    border: 1px solid rgba(0, 190, 255, 0.42);
    color: #6ee8ff;
}

.author-ending-btn.home-btn {
    background: rgba(70, 0, 78, 0.46);
    border: 1px solid rgba(255, 70, 220, 0.42);
    color: #ff91f5;
}

.support-main {
    flex: 0 0 auto;
}

.author-right-col .author-support-copy .lead {
    font-size: 21px;
    color: #edf8ff;
    line-height: 1.6;
    margin: 6px 0 10px;
}

.author-right-col .author-support-copy p {
    font-size: 13px;
    color: rgba(215, 231, 242, 0.86);
    line-height: 1.8;
    margin: 0 0 8px;
}

.author-qr-wrap.support-qr {
    flex: 0 0 auto;
    margin: 14px auto 0;
    text-align: center;
}

.author-qr-wrap img {
    width: min(240px, 62%);
    max-width: 240px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid rgba(145, 178, 203, 0.3);
    background: rgba(255,255,255,0.92);
}

.author-qr-wrap .qr-caption {
    margin-top: 7px;
    color: rgba(228, 242, 252, 0.92);
    font-size: 13px;
    opacity: 0.78;
}

.author-contact {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(120, 180, 200, 0.18);
}

.author-contact-title {
    font-size: 16px;
    color: rgba(237, 247, 255, 0.95);
    margin-bottom: 8px;
}

.contact-row {
    display: flex;
    gap: 8px;
    color: rgba(216, 233, 245, 0.86);
    font-size: 15px;
    line-height: 1.9;
    white-space: nowrap;
}

.contact-row em {
    font-style: normal;
    color: #f2fbff;
}

@media (max-width: 1400px) {
    .author-ending-shell,
    .author-ending-page {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    .author-ending-layout {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .author-ending-btn {
        min-width: 280px;
        width: min(92%, 520px);
    }
}

.glow-cyan {
    box-shadow:
        0 0 0 1px rgba(0, 234, 255, 0.18),
        0 0 30px rgba(0, 234, 255, 0.14);
}

.glow-pink {
    box-shadow:
        0 0 0 1px rgba(255, 46, 166, 0.18),
        0 0 30px rgba(255, 46, 166, 0.16);
}

/* 排版 */
.title-cn {
    font-weight: 800;
    color: #fff;
    text-shadow:
        0 0 12px rgba(0, 234, 255, 0.9),
        0 0 28px rgba(0, 234, 255, 0.28);
}

.label {
    color: #00eaff;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sub-label {
    color: #8aa7bc;
    font-size: 12px;
    letter-spacing: 2px;
}

.big-text {
    font-weight: 900;
    color: white;
    text-shadow:
        0 0 18px rgba(255, 46, 166, 0.45);
}

.neon-cyan {
    color: #00eaff;
    text-shadow:
        0 0 12px rgba(0, 234, 255, 0.8);
}

.neon-pink {
    color: #ff2ea6;
    text-shadow:
        0 0 12px rgba(255, 46, 166, 0.85);
}

/* ========================= DESKTOP ========================= */

.desktop-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1920px;
    margin: auto;
    padding: 40px 44px 30px;
    display: block;
}

/* TOP */
.desktop-top {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.system-report {
    color: #00eaff;
}

.system-report .cn {
    font-size: 30px;
    font-weight: 700;
}

.system-report .en {
    margin-top: 6px;
    font-size: 13px;
    letter-spacing: 2px;
}

.center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    text-align: center;
}

.center-title h1 {
    font-size: 58px;
    letter-spacing: 4px;
}

.center-title p {
    margin-top: 10px;
    color: #00eaff;
    letter-spacing: 4px;
}

.time-box {
    text-align: right;
}

.time-box .time {
    margin-top: 8px;
    font-size: 22px;
    color: #fff;
}

/* GRID */
.desktop-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.82fr;
    gap: 26px;
}

/* LEFT COLUMN */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* SAMPLE PANEL */
.sample-panel {
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-head h3 {
    font-size: 36px;
    color: #00eaff;
}

.sample-wrap {
    display: flex;
    gap: 20px;
}

.sample-card {
    position: relative;
    flex: 1;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 234, 255, 0.45);
}

.sample-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sample-card::after {
    content: "SAMPLING...";
    position: absolute;
    left: 12px;
    bottom: 10px;
    color: #00eaff;
    font-size: 14px;
    letter-spacing: 1px;
    text-shadow:
        0 0 10px rgba(0, 234, 255, 0.8);
}

/* VERDICT PANEL */
.verdict-panel {
    position: relative;
    padding: 28px;
}

.verdict-title {
    color: #00eaff;
    font-size: 18px;
    margin-bottom: 20px;
}

.identity {
    font-size: 74px;
    margin-bottom: 28px;
}

.stamp {
    position: absolute;
    right: 40px;
    top: 40px;
    transform: rotate(-13deg);
    padding: 14px 28px;
    border: 4px solid #ff2ea6;
    color: #ff2ea6;
    font-size: 62px;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow:
        0 0 18px rgba(255, 46, 166, 0.85);
    box-shadow:
        0 0 26px rgba(255, 46, 166, 0.25);
}

.warning-row {
    display: flex;
    gap: 18px;
    margin-bottom: 26px;
}

.warning-box {
    flex: 1;
    min-height: 90px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 0, 100, 0.05);
    border: 1px solid rgba(255, 46, 166, 0.35);
}

.warning-box .t {
    color: #ff74c2;
    font-size: 14px;
    margin-bottom: 8px;
}

.warning-box .v {
    font-size: 52px;
    font-weight: 900;
}

.warning-box .v.small {
    font-size: 38px;
}

.bottom-row {
    display: flex;
    gap: 22px;
}

.quote-box {
    flex: 1;
    padding: 24px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 234, 255, 0.12);
}

.quote-box h4 {
    color: #ff63bb;
    margin-bottom: 16px;
}

.quote-box p {
    font-size: 58px;
    line-height: 1.28;
    font-weight: 900;
}

.diagnosis-box {
    width: 360px;
    padding: 24px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 234, 255, 0.18);
}

.diagnosis-box h4 {
    color: #00eaff;
    margin-bottom: 16px;
}

.diagnosis-box p {
    font-size: 22px;
    line-height: 1.8;
    color: #d4efff;
}

.diagnosis-box span {
    font-size: 52px;
    font-weight: 900;
}

/* RIGHT COLUMN - STATS */
.stats-panel {
    padding: 22px 24px 28px;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 38px;
}

.stat {
    width: 140px;
    text-align: center;
}

.stat-title {
    font-size: 28px;
    margin-bottom: 6px;
    color: #fff;
}

.stat-sub {
    font-size: 12px;
    color: #8aa4b9;
    margin-bottom: 18px;
}

.stat-value {
    font-size: 54px;
    font-weight: 900;
    margin-bottom: 24px;
}

/* BATTERY */
.battery {
    position: relative;
    width: 72px;
    height: 320px;
    margin: auto;
    border-radius: 10px;
    border: 2px solid currentColor;
    overflow: hidden;
}

.battery::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 10px;
    background: currentColor;
    border-radius: 3px 3px 0 0;
}

.fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: currentColor;
    box-shadow:
        0 0 18px currentColor;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.cyan { color: #00eaff; }
.pink { color: #ff2ea6; }
.red { color: #ff4d5d; }
.purple { color: #c35cff; }

/* FOOTER */
.desktop-footer {
    display: flex;
    gap: 24px;
    margin-top: 26px;
}

.footer-btn {
    flex: 1;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    cursor: pointer;
    transition: 0.25s;
}

.footer-btn:hover {
    transform: translateY(-4px);
}

.footer-btn .icon {
    font-size: 48px;
}

.footer-btn .text {
    font-size: 42px;
    font-weight: 800;
}

.footer-btn .sub {
    margin-top: 8px;
    color: #8aa4b9;
    font-size: 13px;
}

/* BOTTOM INFO */
.bottom-info {
    display: flex;
    gap: 18px;
    margin-top: 22px;
}

.mini {
    flex: 1;
    min-height: 88px;
    padding: 18px 20px;
}

.mini .m-title {
    color: #8ca0b2;
    font-size: 14px;
    margin-bottom: 10px;
}

.mini .m-value {
    font-size: 28px;
    letter-spacing: 2px;
    color: #fff;
}

.barcode {
    margin-top: 10px;
    height: 18px;
    background:
        repeating-linear-gradient(
            to right,
            #fff 0,
            #fff 2px,
            transparent 2px,
            transparent 4px
        );
    opacity: 0.7;
}

/* ========================= MOBILE ========================= */

.mobile-layout {
    display: none;
}

@media (max-width: 900px) {
    .desktop-layout {
        display: none;
    }
    
    .mobile-layout {
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        padding: 18px;
    }
    
    .mobile-title {
        text-align: center;
        margin-top: 16px;
        margin-bottom: 20px;
    }
    
    .mobile-title h1 {
        font-size: 42px;
    }
    
    .mobile-title p {
        margin-top: 8px;
        color: #00eaff;
        letter-spacing: 2px;
    }
    
    .mobile-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .back {
        width: 58px;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 34px;
        color: #00eaff;
        cursor: pointer;
    }
    
    .share-mini {
        padding: 14px 18px;
        cursor: pointer;
    }
    
    .mobile-card {
        margin-bottom: 18px;
        padding: 18px;
    }
    
    .mobile-image {
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        margin-top: 18px;
    }
    
    .mobile-image img {
        width: 100%;
        display: block;
    }
    
    .mobile-identity {
        font-size: 56px;
        margin-top: 12px;
    }
    
    .mobile-stamp {
        margin-top: 12px;
        display: inline-block;
        transform: rotate(-10deg);
        border: 3px solid #ff2ea6;
        color: #ff2ea6;
        padding: 8px 18px;
        font-size: 42px;
        font-weight: 900;
    }
    
    .mobile-quote {
        margin-top: 18px;
        font-size: 42px;
        line-height: 1.35;
    }
    
    .mobile-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
    
    .mobile-stat {
        text-align: center;
    }
    
    .mobile-battery {
        width: 58px;
        height: 220px;
    }
    
    .mobile-footer {
        display: flex;
        gap: 14px;
        margin-top: 16px;
    }
    
    .mobile-footer .footer-btn {
        height: 90px;
    }
    
    .mobile-footer .text {
        font-size: 26px;
    }
    
    .mobile-footer .icon {
        font-size: 34px;
    }
    
    .mobile-diagnosis-text {
        font-size: 22px;
        line-height: 1.8;
        color: #d7efff;
    }
}
