/* ========== 故障艺术系统 ========== */

/* CRT显示器闪烁效果 */
@keyframes crtFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
    51% { opacity: 0.99; }
    52% { opacity: 0.97; }
}

/* 电压不稳波纹效果 */
@keyframes voltageRipple {
    0% { transform: scaleY(1); filter: brightness(1); }
    25% { transform: scaleY(1.01); filter: brightness(1.05); }
    50% { transform: scaleY(0.99); filter: brightness(0.95); }
    75% { transform: scaleY(1.02); filter: brightness(1.08); }
    100% { transform: scaleY(1); filter: brightness(1); }
}

/* 像素崩解效果 */
@keyframes pixelDisintegrate {
    0% { 
        filter: blur(0px);
        transform: scale(1);
        opacity: 1;
    }
    50% {
        filter: blur(2px);
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        filter: blur(5px);
        transform: scale(1.1);
        opacity: 0;
    }
}

/* RGB通道错位 - 高级故障效果 */
.glitch-text {
    position: relative;
    color: #00FFA3;
    text-shadow: 
        2px 0 #FF1A7F,
        -2px 0 #7B61FF,
        0 0 10px rgba(0, 255, 163, 0.8);
    animation: glitchRGB 0.3s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #FF1A7F;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 #7B61FF;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitchRGB {
    0%, 100% { 
        text-shadow: 
            2px 0 #FF1A7F,
            -2px 0 #7B61FF,
            0 0 10px rgba(0, 255, 163, 0.8);
    }
    25% {
        text-shadow: 
            -2px 0 #FF1A7F,
            2px 0 #7B61FF,
            0 0 10px rgba(0, 255, 163, 0.8);
    }
    50% {
        text-shadow: 
            0 2px #FF1A7F,
            0 -2px #7B61FF,
            0 0 10px rgba(0, 255, 163, 0.8);
    }
    75% {
        text-shadow: 
            0 -2px #FF1A7F,
            0 2px #7B61FF,
            0 0 10px rgba(0, 255, 163, 0.8);
    }
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(54px, 9999px, 77px, 0); }
    40% { clip: rect(28px, 9999px, 91px, 0); }
    60% { clip: rect(42px, 9999px, 73px, 0); }
    80% { clip: rect(38px, 9999px, 99px, 0); }
    100% { clip: rect(17px, 9999px, 85px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(41px, 9999px, 74px, 0); }
    40% { clip: rect(79px, 9999px, 85px, 0); }
    60% { clip: rect(16px, 9999px, 55px, 0); }
    80% { clip: rect(36px, 9999px, 87px, 0); }
    100% { clip: rect(68px, 9999px, 97px, 0); }
}

/* 文字呼吸感 - 被电击般抽搐 */
.text-breathe {
    animation: textBreathe 0.5s infinite;
}

@keyframes textBreathe {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.02) rotate(0.5deg);
        filter: brightness(1.1);
    }
    50% {
        transform: scale(0.98) rotate(-0.5deg);
        filter: brightness(0.9);
    }
    75% {
        transform: scale(1.01) rotate(0.3deg);
        filter: brightness(1.05);
    }
}

/* 老电视关机收缩波纹 */
@keyframes tvShutdown {
    0% {
        transform: scaleY(1);
        opacity: 1;
    }
    50% {
        transform: scaleY(0.1);
        opacity: 0.5;
    }
    100% {
        transform: scaleY(0);
        opacity: 0;
    }
}

/* 数据分解美学 - 良心值剥落 */
.data-corrupt {
    position: relative;
    overflow: hidden;
}

.data-corrupt::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 26, 127, 0.1) 25%,
        transparent 50%,
        rgba(0, 255, 163, 0.1) 75%,
        transparent 100%
    );
    animation: dataCorrupt 2s infinite;
    pointer-events: none;
}

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

/* 代码雨效果 */
.code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.3;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #00FFA3;
    overflow: hidden;
}

.code-rain span {
    position: absolute;
    animation: codeFall linear infinite;
    text-shadow: 0 0 5px rgba(0, 255, 163, 0.8);
}

@keyframes codeFall {
    0% {
        transform: translateY(-100px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 神经漫游效果 - 攻壳机动队风格 */
.neural-wander {
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 163, 0.1), transparent);
    animation: neuralPulse 3s infinite;
}

@keyframes neuralPulse {
    0%, 100% {
        background: radial-gradient(circle at 50% 50%, rgba(0, 255, 163, 0.1), transparent);
    }
    50% {
        background: radial-gradient(circle at 50% 50%, rgba(255, 26, 127, 0.15), transparent);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* ========== 字体系统：三态人格 ========== */
/* 窒息态：微信体2.0 */
.font-suffocate {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    letter-spacing: -0.05em;
    line-height: 1.0;
    font-weight: 700;
    transform: scaleX(1.15); /* 加粗15% */
}

/* 爆发态：暴走体 */
.font-explode {
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 丰收态：钞能力体 */
.font-harvest {
    font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
    font-weight: 900;
    letter-spacing: 0.05em;
}

/* 老虎机数字字体 */
.font-slot-machine {
    font-family: 'Courier New', monospace;
    font-weight: 900;
    letter-spacing: 0.1em;
    font-variant-numeric: tabular-nums;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
}

.screen.active {
    display: block;
}

/* ========== 首屏：窒息感制造机 ========== */
/* 色彩系统：窒息灰 + 微信红 */
#screen-1 {
    background: #2A2D3A; /* 深夜办公室冷灰 */
    position: relative;
    transition: background 0.5s ease;
    animation: crtFlicker 0.15s infinite; /* CRT闪烁 */
    z-index: 1;
}

/* 情绪污染机制：停留>5秒时渗入荧光青 */
#screen-1.emotion-polluted {
    background: linear-gradient(135deg, #2A2D3A 99%, #00FFA3 1%);
    animation: crtFlicker 0.15s infinite, voltageRipple 2s infinite;
    z-index: 1;
}

/* 《搏击俱乐部》界面商品货架化 */
#screen-1.commodified {
    background: repeating-linear-gradient(
        0deg,
        #2A2D3A,
        #2A2D3A 100px,
        #1E2025 100px,
        #1E2025 102px
    );
    animation: shelfDistort 0.5s infinite;
    z-index: 1;
}

@keyframes shelfDistort {
    0%, 100% { 
        transform: perspective(1000px) rotateX(0deg);
        filter: hue-rotate(0deg);
    }
    50% { 
        transform: perspective(1000px) rotateX(2deg);
        filter: hue-rotate(5deg);
    }
}

.wechat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1a1d28; /* 更深的背景 */
    position: relative;
    z-index: 10;
}

/* 《网络谜踪》窗口窒息感 - 聊天框挤占90%屏幕 */
.wechat-container.window-suffocation .messages-container {
    height: 90%;
    overflow: hidden;
}

.wechat-container.window-suffocation::before {
    content: '房贷计算器';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
    animation: windowPeek 2s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wechat-container.window-suffocation::after {
    content: '外卖订单(¥32.5)';
    position: absolute;
    bottom: 80px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.95);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    z-index: 1;
    animation: windowPeek 3s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes windowPeek {
    0%, 100% { 
        opacity: 0.85;
        transform: translateX(0);
    }
    50% { 
        opacity: 1;
        transform: translateX(-3px);
    }
}

.wechat-header {
    background: #000000; /* 纯黑背景 */
    color: white;
    padding: 15px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 2001;
}

.time-display {
    font-size: 24px;
    color: #FFFFFF !important;
    font-weight: 900;
    animation: none;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 1),
        0 2px 4px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 2002;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

@keyframes timePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); } /* 模拟血压升高 */
}

.typing-indicator {
    font-size: 18px;
    color: #FFFFFF !important;
    font-weight: 900;
    animation: none;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 1),
        0 2px 4px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 2002;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes typing {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.messages-container {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    position: relative;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.5); /* 添加深色背景 */
}

.message {
    display: flex;
    flex-direction: column;
    animation: none;
    position: relative;
    z-index: 1600;
    opacity: 0;
    visibility: hidden;
}

@keyframes messageSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.boss-message {
    align-items: flex-start;
}

.message-bubble {
    background: rgba(0, 0, 0, 0.95) !important; /* 纯黑背景 */
    color: #FFFFFF !important;
    padding: 16px 20px;
    border-radius: 12px;
    max-width: 80%;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    animation: none;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.05em;
    font-weight: 900;
    font-size: 22px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    overflow: visible;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 1);
    z-index: 1700;
    line-height: 1.6;
}

/* 《搏击俱乐部》物品异化效果 - 消息气泡商品化 */
.message-bubble::after {
    content: '¥0';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    opacity: 0;
    animation: priceTagFadeIn 3s ease-in forwards;
    animation-delay: 2s;
    box-shadow: 0 2px 10px rgba(255, 68, 68, 0.8);
}

@keyframes priceTagFadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-45deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(5deg);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg);
    }
}

/* 微信字体+血丝故障效果 */
.message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 68, 68, 0.3),
        transparent
    );
    animation: bloodStreak 3s infinite;
    z-index: -1;
}

@keyframes bloodStreak {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes bubbleBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); } /* 模拟心跳式呼吸 */
}

@keyframes messageShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

.message-time {
    font-size: 20px;
    color: #FFFFFF !important;
    font-weight: 900;
    margin-top: 8px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 1),
        0 2px 4px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 1700;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#current-time {
    font-size: 300%;
    color: #FFFFFF !important;
    font-weight: 900;
    animation: none;
    text-shadow: 
        0 0 50px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 1),
        0 4px 8px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 1800;
    opacity: 1 !important;
}

@keyframes timeExplode {
    0% { transform: scale(1); }
    50% { transform: scale(2); }
    100% { transform: scale(1); }
}

.duck-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000000; /* 纯黑背景 */
    padding: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2000;
}

.duck-flat {
    font-size: 4em;
    transition: transform 0.3s;
    animation: duckFloat 2s infinite ease-in-out;
    display: inline-block;
    line-height: 1;
}

@keyframes duckFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.05); }
}

.conscience-bar {
    width: 100%;
    max-width: 300px;
}

.conscience-label {
    font-size: 20px;
    color: #FFFFFF !important;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 1),
        0 2px 4px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 2001;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 14px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.conscience-progress {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.conscience-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FF9800, #F44336);
    width: 100%;
    transition: width 0.5s ease, background 0.5s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* 数据分解美学 - 良心值剥落 */
.conscience-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 26, 127, 0.1) 2px,
        rgba(255, 26, 127, 0.1) 4px
    );
    animation: dataCorrupt 2s infinite;
    pointer-events: none;
}

/* 良心值颜色变化 */
.conscience-fill.low {
    background: linear-gradient(90deg, #F44336, #D32F2F);
    animation: pixelDisintegrate 2s infinite;
}

/* 《心理测量者》色彩人格分裂 - 良心值归零时爆炸 */
.conscience-fill.exploded {
    background: linear-gradient(90deg, 
        #FF1A7F 0%, 
        #FF00FF 25%, 
        #00FFA3 50%, 
        #FFD700 75%, 
        #FF1A7F 100%
    );
    animation: colorSplit 0.3s infinite, conscienceExplode 0.5s ease-out;
    box-shadow: 
        0 0 20px rgba(255, 26, 127, 1),
        0 0 40px rgba(0, 255, 163, 0.8);
}

@keyframes colorSplit {
    0% { filter: hue-rotate(0deg) brightness(1); }
    25% { filter: hue-rotate(90deg) brightness(1.5); }
    50% { filter: hue-rotate(180deg) brightness(2); }
    75% { filter: hue-rotate(270deg) brightness(1.5); }
    100% { filter: hue-rotate(360deg) brightness(1); }
}

@keyframes conscienceExplode {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.conscience-fill.medium {
    background: linear-gradient(90deg, #FF9800, #F57C00);
}

/* 良心值文字剥落效果 */
.conscience-label.low {
    color: #FF6B6B;
    animation: textCorrode 2s infinite, textBreathe 0.5s infinite;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
    position: relative;
}

.conscience-label.low::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: #FF1A7F;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    animation: glitchRGB 0.3s infinite;
}

@keyframes textCorrode {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(1px); }
}

.curse-btn {
    background: linear-gradient(135deg, #FF1A7F, #FF4444); /* 暴怒粉到微信红 */
    color: #FFFFFF !important;
    border: 3px solid rgba(255, 255, 255, 0.5);
    padding: 18px 45px;
    border-radius: 25px;
    font-size: 28px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(255, 26, 127, 0.8), 
        0 0 40px rgba(255, 68, 68, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: none;
    position: relative;
    overflow: hidden;
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: transform 0.1s;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 255, 255, 1),
        0 4px 8px rgba(0, 0, 0, 1);
    z-index: 2001;
    opacity: 1 !important;
}

/* 《黑镜》荧光蓝社畜皮肤 - 冷光情感剥离 */
.curse-btn.neon-blue-skin {
    background: linear-gradient(135deg, #00B8D4, #0091EA);
    box-shadow: 
        0 4px 15px rgba(0, 184, 212, 0.8), 
        0 0 30px rgba(0, 145, 234, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: neonPulse 1.5s infinite;
    color: #E0F7FA;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes neonPulse {
    0%, 100% { 
        box-shadow: 
            0 4px 15px rgba(0, 184, 212, 0.8), 
            0 0 30px rgba(0, 145, 234, 0.6),
            inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 6px 20px rgba(0, 184, 212, 1), 
            0 0 50px rgba(0, 145, 234, 0.9),
            inset 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

.curse-btn:active {
    transform: scale(1.2); /* 点击时放大120% */
    animation: curseBtnShake 0.3s;
}

@keyframes curseBtnShake {
    0%, 100% { transform: scale(1.2) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-2deg); }
    75% { transform: scale(1.2) rotate(2deg); }
}

.curse-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: curseBtnShine 2s infinite;
}

@keyframes curseBtnPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6); }
}

@keyframes curseBtnShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.curse-btn.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.curse-btn:not(.hidden) {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* ========== 中屏：抽象能量爆发场 ========== */
/* 色彩系统：故障荧光三原色爆炸 */
#screen-2 {
    background: #000000; /* 吞噬现实的黑 */
    position: relative;
    overflow: hidden;
}

/* RGB通道错位闪烁效果 */
#screen-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 255, 163, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 26, 127, 0.1) 0%, transparent 50%),
        linear-gradient(270deg, rgba(123, 97, 255, 0.1) 0%, transparent 50%);
    animation: rgbShift 0.1s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes rgbShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    75% { transform: translate(2px, 2px); }
    100% { transform: translate(0, 0); }
}

.chaos-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#glitch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 事件流滚动 */
.events-stream {
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}

/* 《你好世界》信息洪水效果 - 热搜词条像砖块砸来 */
.event-item {
    color: #00FFA3; /* 赛博青 */
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    font-weight: 900;
    text-shadow: 
        0 0 10px rgba(0, 255, 163, 0.8),
        2px 0 #FF1A7F, /* 红色错位 */
        -2px 0 #7B61FF; /* 蓝色错位 */
    animation: eventScroll 15s linear infinite, glitchText 0.3s infinite;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.event-item.brick-fall {
    animation: brickFall 2s ease-out, eventScroll 15s linear infinite;
    transform-origin: top center;
}

@keyframes brickFall {
    0% {
        transform: translateY(-100px) rotate(-15deg);
        opacity: 0;
    }
    30% {
        transform: translateY(0) rotate(5deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(-2deg);
    }
    70% {
        transform: translateY(0) rotate(1deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes glitchText {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

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

.duck-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8em;
    z-index: 10;
    transition: transform 0.1s;
    filter: drop-shadow(0 0 20px #00ff00);
}

/* 《你好世界》弹幕盾牌效果 */
.duck-3d.shield-active {
    filter: 
        drop-shadow(0 0 30px #00FFA3) 
        drop-shadow(0 0 60px #7B61FF);
    animation: shieldPulse 0.5s ease-in-out;
}

@keyframes shieldPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.curse-counter {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    color: #00FFA3; /* 赛博青 */
    font-size: 24px;
    font-weight: 900;
    z-index: 10;
    text-shadow: 
        0 0 20px rgba(0, 255, 163, 0.8),
        0 0 40px rgba(0, 255, 163, 0.4);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

/* 嘴臭值可视化进度条 */
.curse-value {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid #00FFA3;
    box-shadow: 0 0 20px rgba(0, 255, 163, 0.5);
    animation: curseValueGlow 2s infinite;
}

.curse-value.high {
    border-color: #FF1A7F;
    box-shadow: 0 0 30px rgba(255, 26, 127, 0.8);
    animation: curseValuePulse 0.5s infinite; /* 频率2Hz */
}

@keyframes curseValueGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 163, 0.5); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 163, 0.8); }
}

@keyframes curseValuePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 26, 127, 0.8);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(255, 26, 127, 1);
    }
}

.danmaku-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.danmaku-item {
    position: absolute;
    color: #7B61FF; /* 神经紫，弱存在感 */
    font-size: 14px;
    white-space: nowrap;
    font-family: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 0 5px rgba(123, 97, 255, 0.5);
    animation: danmakuMove 10s linear, textBreathe 0.5s infinite;
    transform: rotate(calc(var(--rotation, 0) * 1deg));
}

@keyframes danmakuMove {
    0% { transform: translateX(100vw) rotate(calc(var(--rotation, 0) * 1deg)); }
    100% { transform: translateX(-100%) rotate(calc(var(--rotation, 0) * 1deg)); }
}

/* 高票弹幕：暴怒粉，边缘发光 */
.danmaku-item.high-vote {
    color: #FF1A7F;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(255, 26, 127, 0.8),
        2px 0 #00FFA3, /* 青色错位 */
        -2px 0 #7B61FF; /* 紫色错位 */
    animation: danmakuMove 10s linear, glitchText 0.3s infinite;
}

/* 《黑镜》弹幕玻璃牢笼效果 - 高票弹幕压迫感 */
.danmaku-item.high-vote.glass-impact {
    animation: danmakuMove 10s linear, glassShatter 0.5s ease-out;
    filter: drop-shadow(0 0 20px rgba(255, 26, 127, 1));
}

@keyframes glassShatter {
    0% { 
        transform: translateX(0) scale(1);
    }
    20% {
        transform: translateX(-10px) scale(1.3);
        filter: brightness(2);
    }
    40% {
        transform: translateX(5px) scale(0.9);
    }
    60% {
        transform: translateX(-3px) scale(1.1);
    }
    100% {
        transform: translateX(0) scale(1);
    }
}

/* 你的弹幕：赛博青，带粒子尾迹 */
.danmaku-item.yours {
    color: #00FFA3;
    font-size: 16px;
    font-weight: 900;
    text-shadow: 
        0 0 15px rgba(0, 255, 163, 1),
        0 0 30px rgba(0, 255, 163, 0.5);
    animation: danmakuMove 10s linear, particleTrail 0.5s infinite, textBreathe 0.3s infinite;
    position: relative;
}

.danmaku-item.yours::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: #FF1A7F;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    animation: glitchRGB 0.2s infinite;
    z-index: -1;
}

@keyframes particleTrail {
    0%, 100% { filter: drop-shadow(0 0 5px #00FFA3); }
    50% { filter: drop-shadow(0 0 15px #00FFA3) drop-shadow(0 0 25px #00FFA3); }
}

.danmaku-item.golden {
    color: #FFD700;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 1),
        2px 0 #00FFA3,
        -2px 0 #FF1A7F;
    z-index: 15;
    animation: danmakuMove 10s linear, glitchText 0.1s infinite;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ========== 尾屏：社交货币收割机 ========== */
/* 色彩系统：金币渐变 */
#screen-3 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    position: relative;
    overflow-y: auto;
}

#coins-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.harvest-container {
    position: relative;
    z-index: 10;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.poster-section {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}

.poster-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    animation: panelRise 1s ease-out;
}

@keyframes panelRise {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.poster-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.poster-content {
    margin-bottom: 20px;
}

.poster-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.stat-item {
    font-size: 16px;
    font-weight: 900;
    color: #FFD700;
    font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item span {
    font-family: 'Courier New', monospace; /* 老虎机字体 */
    font-variant-numeric: tabular-nums;
    animation: coinGlow 1s infinite alternate;
}

@keyframes coinGlow {
    0% { 
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
    100% { 
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
        transform: scale(1.05);
    }
}

.poster-events,
.poster-danmaku {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.save-poster-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    animation: saveBtnBlink 2s infinite;
}

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

.rewards-dashboard {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.reward-label {
    font-weight: 600;
    color: #333;
}

.reward-value {
    color: #00C853; /* 成功绿，仅用于收益数字 */
    font-weight: 900;
    font-family: 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    animation: rewardPulse 0.3s infinite;
}

@keyframes rewardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.play-again-section {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.play-again-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}

.play-again-btn:hover {
    transform: scale(1.05);
}

.duck-mouth {
    font-size: 4em;
    position: relative;
    animation: duckBlink 3s infinite;
}

@keyframes duckBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.qr-code {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.3em;
    opacity: 0.3;
    transition: opacity 0.3s, transform 0.3s;
}

.play-again-btn:hover .qr-code {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.btn-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.btn-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-align: center;
    max-width: 200px;
}

.btn-hint.hidden {
    display: none;
}

.start-game-link {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 900;
    font-size: 18px;
    font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.3),
        0 0 30px rgba(255, 215, 0, 0.5);
    transition: all 0.3s;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.start-game-link::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: linkShine 2s infinite;
}

@keyframes linkShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.start-game-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.4),
        0 0 40px rgba(255, 215, 0, 0.8);
}

/* ========== 防跳出机制 ========== */
.exit-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.exit-blocker.hidden {
    display: none;
}

.duck-claw {
    font-size: 5em;
    animation: clawShake 0.5s infinite;
}

@keyframes clawShake {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.blocker-text {
    color: white;
    font-size: 18px;
    text-align: center;
    padding: 0 20px;
}

#remaining-quota {
    color: #ffd700;
    font-weight: 700;
}

/* 《宇宙探索编辑部》结局渐显动画 */
@keyframes fadeInSlow {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 屏幕震动效果 */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5px, 5px); }
    20% { transform: translate(5px, -5px); }
    30% { transform: translate(-5px, -5px); }
    40% { transform: translate(5px, 5px); }
    50% { transform: translate(-5px, 5px); }
    60% { transform: translate(5px, -5px); }
    70% { transform: translate(-5px, -5px); }
    80% { transform: translate(5px, 5px); }
    90% { transform: translate(-5px, 5px); }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .message-bubble {
        max-width: 85%;
    }
    
    .duck-3d {
        font-size: 5em;
    }
    
    .curse-counter {
        font-size: 18px;
    }
    
    .poster-panel {
        padding: 20px;
    }
}

