/* ============== 恐怖效果样式 ============== */

/* 恐怖层（默认隐藏） */
.horror-layer { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity 0.5s; }
.horror-layer.active { opacity: 1; }

/* 暗角效果 */
.vignette { position: fixed; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.7) 90%, rgba(0,0,0,0.95) 100%); pointer-events: none; z-index: 90; opacity: 0; transition: opacity 0.6s; }
.vignette.active { opacity: 1; }

/* 静态噪点 */
.static-noise { position: fixed; inset: 0; pointer-events: none; z-index: 91; opacity: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: noise 0.4s steps(3) infinite; }
.static-noise.active { opacity: 1; }
@keyframes noise { 0% { transform: translate(0,0); } 33% { transform: translate(-2px,1px); } 66% { transform: translate(1px,-2px); } 100% { transform: translate(0,0); } }

/* Glitch 闪烁 */
.glitch-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 92; opacity: 0; }
.glitch-overlay.active { opacity: 1; animation: glitchFlash 0.3s steps(2) 3; }
@keyframes glitchFlash { 0% { background: rgba(255,0,0,0); } 25% { background: rgba(168,50,50,0.15); } 50% { background: rgba(0,255,255,0.08); } 75% { background: rgba(168,50,50,0.18); } 100% { background: rgba(0,0,0,0); } }

/* 文字 Glitch */
.glitch-text { position: relative; display: inline-block; }
.glitch-text.glitching { animation: textShake 0.15s infinite; }
.glitch-text.glitching::before,
.glitch-text.glitching::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; }
.glitch-text.glitching::before { color: #f44; animation: glitchTop 0.2s infinite linear alternate; clip-path: inset(0 0 60% 0); }
.glitch-text.glitching::after { color: #4ff; animation: glitchBottom 0.25s infinite linear alternate; clip-path: inset(60% 0 0 0); }
@keyframes textShake { 0%,100% { transform: translate(0); } 25% { transform: translate(-1px,1px); } 50% { transform: translate(1px,-1px); } 75% { transform: translate(-1px,-1px); } }
@keyframes glitchTop { from { transform: translate(0); } to { transform: translate(-3px,-1px); } }
@keyframes glitchBottom { from { transform: translate(0); } to { transform: translate(3px,1px); } }

/* 血色文字闪烁 */
body.blood-mode .site-main { filter: contrast(1.05) brightness(0.92); }
body.blood-mode .page-title,
body.blood-mode .news-article h1,
body.blood-mode h2,
body.blood-mode h3 { animation: bloodFlicker 4s infinite; }
@keyframes bloodFlicker { 0%, 90%, 100% { color: inherit; } 92%, 94% { color: #8a0000; } 93% { color: #f00; } 95% { color: inherit; } }

/* 隐藏文字（需选中才能看到） */
.blood-text { color: rgba(168,50,50,0.04); user-select: text; transition: color 0.4s; }
.blood-text:hover, .blood-text:focus { color: rgba(168,50,50,0.85); }
.blood-text::selection { color: #a83232; background: rgba(168,50,50,0.1); }
.blood-text::-moz-selection { color: #a83232; background: rgba(168,50,50,0.1); }

/* 微小隐藏文字（文字谷 - 几乎看不见） */
.ghost-text { font-size: 1px; color: rgba(0,0,0,0.02); user-select: text; line-height: 1; }
.ghost-text::selection { font-size: 11px; color: var(--danger); background: rgba(168,50,50,0.08); }
.ghost-text::-moz-selection { font-size: 11px; color: var(--danger); background: rgba(168,50,50,0.08); }

/* 出现模糊人影（CSS动画） */
.shadow-figure { position: fixed; bottom: -200px; left: 30%; width: 120px; height: 220px; background: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 50%, transparent 80%); pointer-events: none; z-index: 89; opacity: 0; transition: opacity 1.5s, bottom 8s ease-in; }
.shadow-figure.active { opacity: 1; bottom: 40px; }

/* 文字扭曲 */
.distort-text { animation: distort 0.3s ease; }
@keyframes distort { 0%, 100% { transform: skewX(0); } 30% { transform: skewX(5deg); } 60% { transform: skewX(-5deg); } }

/* 心跳声指示器（仅视觉，音频由JS播放） */
.heartbeat-pulse { position: fixed; top: 50%; left: 50%; width: 100px; height: 100px; border: 2px solid #a83232; border-radius: 50%; transform: translate(-50%, -50%) scale(0); opacity: 0; z-index: 95; pointer-events: none; }
.heartbeat-pulse.active { animation: heartPulse 1.5s ease-out; }
@keyframes heartPulse { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; } }

/* 突然黑屏 */
.blackout { position: fixed; inset: 0; background: #000; z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.blackout.active { opacity: 1; pointer-events: all; }

/* 红字闪烁的恐怖标题 */
.horror-title { color: #8a0000; text-shadow: 0 0 8px rgba(168,50,50,0.4); animation: horrorTitle 3s ease-in-out infinite; }
@keyframes horrorTitle { 0%, 100% { text-shadow: 0 0 8px rgba(168,50,50,0.4); } 50% { text-shadow: 0 0 14px rgba(168,50,50,0.7); } }

/* 已被发现的提示 */
.caught-warning { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.92); color: #f44; padding: 24px 36px; border: 1px solid #f44; border-radius: 4px; font-family: "Courier New", monospace; font-size: 14px; z-index: 600; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.caught-warning.active { opacity: 1; }
