@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600;700&family=Press+Start+2P&display=swap');

:root {
  /* Indigo void palette, matched to artem1srun.w4ttz.lol */
  --bg-void: #0a0714;
  --bg-deep: #120b22;
  --bg-panel: #1a1030;
  --bg-elevated: #221741;
  --bg-input: #0d0820;

  --purple-900: #2a1a4a;
  --purple-700: #4c2a7a;
  --purple-500: #7b3fa0;
  --purple-400: #9d4edd;
  --purple-300: #c77dff;
  --purple-200: #e0aaff;

  --holo-cyan: #00e5ff;
  --holo-glow: #7df9ff;
  --holo-soft: #a8f0ff;

  --text-primary: #e0aaff;
  --text-bright: #f0d9ff;
  --text-dim: #9d7ab8;
  --text-faint: #5a4278;

  --success: #7df9ff;
  --danger: #ff4d6d;
  --warning: #ffb347;

  --bg-dark: var(--bg-void);
  --panel-bg: rgba(18, 11, 34, 0.7);
  --border-glow: 0 0 14px rgba(0, 229, 255, 0.18);
}

/* Backgrounds: grid, scanlines, CRT glow, particles */
.grid-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(157, 78, 221, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 78, 221, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}
@keyframes gridScroll {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 2px,
    rgba(0, 0, 0, 0.35) 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanlines 0.1s linear infinite;
}
@keyframes scanlines {
  0%   { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.crt-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(157, 78, 221, 0.06) 0%,
    rgba(0, 229, 255, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* CRT glass corner softens */
.crt-dome { display: none !important; }
.crt-dome-band { display: none !important; }
.corner-tl { display: none !important; }
.corner-tr { display: none !important; }
.corner-bl { display: none !important; }
.corner-br { display: none !important; }
#crt-dome-shade {
  inset: 0;
  background:
    radial-gradient(circle 210px at 0% 0%, rgba(0, 0, 0, 0.30), transparent 100%),
    radial-gradient(circle 210px at 100% 0%, rgba(0, 0, 0, 0.30), transparent 100%),
    radial-gradient(circle 210px at 0% 100%, rgba(0, 0, 0, 0.30), transparent 100%),
    radial-gradient(circle 210px at 100% 100%, rgba(0, 0, 0, 0.30), transparent 100%);
}
@media (min-width: 1024px) {
  .crt-dome { display: none !important; }
}
@supports not (backdrop-filter: blur(1px)) {
  .crt-dome-band { display: none !important; }
}

/* Ambient particles */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.particle {
  position: absolute;
  top: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--purple-200);
  box-shadow: 0 0 8px 1px var(--purple-300), 0 0 18px 3px rgba(157, 78, 221, 0.45);
  animation: floatParticle linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}
.particle.cyan {
  background: var(--holo-glow);
  box-shadow: 0 0 10px 1px var(--holo-cyan), 0 0 22px 4px rgba(0, 229, 255, 0.5);
}
@keyframes floatParticle {
  0%   { opacity: 0; transform: translateY(112vh) scale(0.4); }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-9vh) scale(1.15); }
}

/* Frame and Corner Ornaments */
.page-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border: 3px solid transparent;
  border-image: linear-gradient(
    135deg,
    var(--holo-cyan) 0%,
    var(--holo-glow) 14%,
    var(--purple-700) 42%,
    var(--purple-300) 68%,
    var(--purple-400) 85%,
    var(--holo-cyan) 100%
  ) 1;
}
.page-frame-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(0, 229, 255, 0.07), transparent 55%),
    radial-gradient(120% 70% at 100% 100%, rgba(199, 125, 255, 0.08), transparent 55%),
    radial-gradient(100% 60% at 100% 0%, rgba(0, 229, 255, 0.04), transparent 60%),
    radial-gradient(100% 60% at 0% 100%, rgba(199, 125, 255, 0.05), transparent 60%);
  box-shadow:
    inset 0 0 24px rgba(0, 229, 255, 0.12),
    inset 0 0 72px rgba(157, 78, 221, 0.09);
}
.corner-glyph { display: none !important; }
.corner-glyph.left { display: none !important; }
.corner-glyph.right { display: none !important; }
@keyframes glyphGlow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
@media (max-width: 640px) and (orientation: portrait) {
  .corner-glyph { display: none !important; }
}

/* Alive Theme Containers */
.alive-box {
  background: var(--panel-bg);
  border: 1px solid rgba(157, 78, 221, 0.28);
  box-shadow:
    0 0 2px rgba(0, 229, 255, 0.45),
    0 0 18px rgba(0, 229, 255, 0.16),
    0 0 42px rgba(0, 229, 255, 0.08),
    0 0 60px rgba(157, 78, 221, 0.14),
    inset 0 0 22px rgba(0, 229, 255, 0.07);
  backdrop-filter: blur(10px);
}

.retro-title {
  font-family: 'Press Start 2P', monospace;
  color: var(--holo-cyan);
  text-shadow: 0 0 8px var(--holo-cyan), 0 0 18px rgba(0, 229, 255, 0.45);
}

.btn-alive {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.55);
  color: var(--holo-cyan);
  transition: all 0.15s ease-in-out;
  font-weight: 600;
}
.btn-alive:hover, .btn-alive:active {
  background: var(--holo-cyan);
  color: #06121a;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.55);
  transform: translateY(-1px);
}

.version-glow {
  background-color: rgba(8, 47, 73, 0.8) !important;
  border: 1px solid rgba(0, 229, 255, 0.65) !important;
  color: var(--holo-glow) !important;
  text-shadow:
    0 0 6px rgba(0, 229, 255, 0.9),
    0 0 14px rgba(157, 78, 221, 0.6);
  box-shadow:
    0 0 2px rgba(0, 229, 255, 0.7),
    0 0 12px rgba(0, 229, 255, 0.35),
    inset 0 0 12px rgba(0, 229, 255, 0.14);
  transition: box-shadow 0.2s ease, text-shadow 0.2s ease;
}
.version-glow:hover {
  box-shadow:
    0 0 3px rgba(0, 229, 255, 0.95),
    0 0 22px rgba(0, 229, 255, 0.55),
    inset 0 0 16px rgba(0, 229, 255, 0.22);
  text-shadow:
    0 0 8px rgba(0, 229, 255, 1),
    0 0 20px rgba(199, 125, 255, 0.65);
}

header, main {
  position: relative;
  z-index: 3;
}


html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    overflow: hidden;
    color: #fff;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* 禁用文本选择 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* 禁用触摸时的高亮 */
    -webkit-tap-highlight-color: transparent;
    /* 禁用拖拽 */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* 禁用所有元素的选择和拖拽 - 使用!important确保优先级 */
* {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
}

/* 特别针对文本元素 */
div, span, p, h1, h2, h3, h4, h5, h6, button, a, label {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 禁用图片拖拽 */
img {
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: none;
}

/* 确保按钮可以点击但不能选择文本 */
button {
    pointer-events: auto;
    cursor: pointer;
}

/* 预加载动画 */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out;
}

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

.preloader-content {
    text-align: center;
    max-width: 500px;
    padding: 20px;
}

.preloader-logo {
    font-size: 3vw;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000,
        2px 2px 4px #000;
    margin-bottom: 40px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    line-height: 1.3;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 30px #ff0000,
            2px 2px 4px #000;
    }
    50% {
        text-shadow: 
            0 0 20px #ff0000,
            0 0 30px #ff0000,
            0 0 40px #ff0000,
            0 0 50px #ff0000,
            2px 2px 4px #000;
    }
}

.preloader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #cc0000;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: #990000;
    animation-duration: 0.9s;
}

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

.preloader-text {
    font-size: 1.5vw;
    color: #fff;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
    letter-spacing: 0.3em;
}

.loading-dots::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.preloader-progress {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #ff0000;
}

.preloader-percentage {
    font-size: 1.2vw;
    color: #888;
    font-family: 'Courier New', monospace;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
    font-family: 'Courier New', monospace;
    z-index: 1000;
    animation: pulse 1.5s infinite;
}

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

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* 游戏画面 */
#game-screen {
    width: 100%;
    height: 100%;
    position: relative;
    display: none;
    overflow: hidden;
    background: #000;
}

#game-screen.active {
    display: block;
}

#current-scene {
    position: absolute;
    height: 100%;
    width: 150%;
    object-fit: cover;
    left: 0;
    top: 0;
    transition: left 0.05s linear;
    display: block;
}

/* 热区 */
#hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hotspot {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s;
}

.hotspot:hover {
    opacity: 0.8;
}

/* UI 覆盖层 */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 左上角 UI */
#top-left-ui {
    position: absolute;
    top: 2vh;
    left: 2vw;
    color: white;
    text-shadow: 2px 2px 4px #000;
}

#time-display {
    font-size: 2.5vw;
    margin-bottom: 0.5vh;
}

#night-display {
    font-size: 1.5vw;
    color: #ccc;
}

/* 右下角 UI */
#bottom-right-ui {
    position: absolute;
    bottom: 2vh;
    right: 2vw;
    color: white;
    text-shadow: 2px 2px 4px #000;
}

#oxygen-display {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 2vw;
    font-weight: bold;
}

#oxygen-display .vent-icon {
    margin-right: 1vw;
}

#power-value {
    margin: 0;
}

.percent-sign {
    margin-left: 0.1vw;
    margin-right: 0;
}

.oxygen-unit {
    margin-left: 1.2vw;
    display: inline-flex;
    align-items: baseline;
}

#oxygen-display sub {
    font-size: 1vw;
    vertical-align: sub;
    line-height: 0;
}

.vent-icon {
    width: 3vw;
    height: 3vw;
    object-fit: contain;
    transition: none; /* 禁用默认过渡，使用animation */
    animation: spin-fast 0.333s linear infinite; /* 默认快速旋转（通风口开启）- 1秒3圈 */
}

/* 风扇旋转动画 - 快速（通风口开启） */
@keyframes spin-fast {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 风扇旋转动画 - 慢速（减速中） */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 风扇停止状态 */
.vent-icon.stopped {
    animation: none;
}

/* 风扇减速状态 */
.vent-icon.slowing {
    animation: spin-slow 3s linear infinite;
}

/* 风扇加速状态 */
.vent-icon.speeding-up {
    animation: spin-slow 3s linear infinite;
}
    animation: spin 0.8s linear infinite;
}

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

/* 游戏按钮 */
.game-button {
    position: absolute;
    width: 8vw;
    height: 8vh;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-button:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.game-button .button-hint {
    opacity: 0;
    color: white;
    font-size: 1.2vw;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    transition: opacity 0.3s;
    pointer-events: none;
}

.game-button:hover .button-hint {
    opacity: 1;
}

/* 左下角：控制面板按钮 */
#control-panel-btn {
    bottom: 2vh;
    left: 2vw;
}

/* 右侧中间：摄像头按钮 */
#camera-btn {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 15vh;
    width: 5vw;
}

/* 摄像头面板 - 从右往左滑入 + 缩放效果 */
#camera-panel {
    position: absolute;
    top: 5vh;
    right: 7vw;
    width: 70vw;
    height: calc(70vw * 0.75); /* 保持4:3宽高比 */
    max-height: 80vh; /* 但不超过80vh */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    transform: translateX(calc(100% + 7vw)) scale(0.5);
    transform-origin: right center;
    transition: transform 0.4s ease-in-out;
    border: 3px solid #444;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    overflow: hidden; /* 防止EP图片溢出到摄像头面板外 */
}

#camera-panel.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

#camera-panel.closing {
    transform: translateX(calc(100% + 7vw)) scale(0.5);
    opacity: 0;
}

#camera-panel.transitioning {
    background-image: none !important;
}

/* 当前摄像头标签 */
#current-cam-label {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px #000;
    z-index: 1;
}

/* 角色图层容器 */
#character-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#character-overlay img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s;
}

#character-overlay img.visible {
    opacity: 1;
}

/* 摄像头切换静态噪点 */
#camera-static-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    display: none;
}

#camera-static-video.active {
    display: block;
    opacity: 0.8;
}

/* 摄像头故障标识 */
#camera-error-label {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 48px;
    font-weight: bold;
    color: #f00;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px #000;
    z-index: 3;
    display: none;
}

#camera-error-label.active {
    display: block;
    /* 移除闪烁动画 */
}

/* 地图容器 - 移到左下角 */
#camera-grid {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 28vw;
    max-width: 380px;
    z-index: 1;
}

.camera-hotspot {
    position: absolute;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.camera-hotspot:hover {
    transform: scale(1.05);
}

/* 选中的摄像头绿色闪烁动画 */
.camera-selected {
    animation: greenPulse 1s ease-in-out infinite;
}

@keyframes greenPulse {
    0%, 100% {
        background: rgba(0, 255, 0, 0.6);
    }
    50% {
        background: rgba(0, 255, 0, 0.2);
    }
}

/* ELECTROCUTE 按钮（霍金电击） - 只在cam6显示 */
#shock-hawking-btn {
    position: absolute;
    bottom: 100px;
    right: 25px;
    width: 280px;
    padding: 20px 0;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-family: Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 4px;
    z-index: 1;
    text-align: center;
    display: none; /* 默认隐藏 */
    box-sizing: border-box;
}

#shock-hawking-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#shock-hawking-btn:active {
    transform: scale(0.95);
}

/* PLAY SOUND 按钮 */
#play-sound-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 280px;
    padding: 20px 0;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-family: Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 4px;
    z-index: 1;
    text-align: center;
    box-sizing: border-box;
}

#play-sound-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 摄像头关闭按钮 - 手机端显示 */
#close-camera {
    display: none;
}

/* 主菜单 */
#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/menubackground.png') center/cover;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 5%;
    z-index: 100;
}

#main-menu > h1 {
    margin-top: -10vh; /* 整体上移 */
}

/* 星星图标 - 放在中间偏上位置 */
#star-icon {
    position: absolute;
    top: 15vh;
    left: 50%;
    transform: translateX(-50%);
    width: 5vw;
    max-width: 80px;
    height: auto;
    z-index: 103;
    animation: star-glow 2s ease-in-out infinite;
}

/* 第二颗星星 - 在第一颗下面 */
#star-icon-2 {
    position: absolute;
    top: 22vh; /* 比第一颗低7vh */
    left: 50%;
    transform: translateX(-50%);
    width: 5vw;
    max-width: 80px;
    height: auto;
    z-index: 103;
    animation: star-glow 2s ease-in-out infinite 0.5s; /* 延迟0.5s，产生交替闪烁效果 */
}

/* 第三颗星星 - 在第二颗下面 (20/20/20通关) */
#star-icon-3 {
    position: absolute;
    top: 29vh; /* 比第二颗低7vh */
    left: 50%;
    transform: translateX(-50%);
    width: 5vw;
    max-width: 80px;
    height: auto;
    z-index: 103;
    animation: star-glow 2s ease-in-out infinite 1s; /* 延迟1s，产生交替闪烁效果 */
}

@keyframes star-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
        transform: translateX(-50%) scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
        transform: translateX(-50%) scale(1.05);
    }
}

/* Golden 霍金闪烁动画 */
@keyframes golden-flicker {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    20% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    40% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    60% {
        opacity: 0.8;
    }
    70% {
        opacity: 1;
    }
    80% {
        opacity: 0.6;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* 静态雪花效果 - 使用 canvas */
#static-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 101;
    opacity: 0.5; /* 增强透明度，从 0.25 改成 0.5 */
    mix-blend-mode: screen; /* 改用 screen 模式，更明显 */
}

#main-menu > h1,
#main-menu > button,
#main-menu > img {
    position: relative;
    z-index: 102;
}

#main-menu h1 {
    font-size: 5vw;
    margin-bottom: 5vh;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.2;
}

/* 音量按钮 */
#volume-btn {
    position: fixed;
    top: 2vh;
    right: 2vw;
    padding: 15px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 102; /* 在白噪声(101)上面，但低于其他UI(103) */
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 3px;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
}

#volume-btn:hover {
    transform: scale(1.05);
    text-shadow: 4px 4px 12px rgba(0, 0, 0, 1);
}

/* 音量设置面板 */
#volume-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.98);
    border: 2px solid #666;
    border-radius: 0;
    padding: 20px;
    z-index: 105; /* 面板要在最上面 */
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

#volume-panel h3 {
    color: #ff0000;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 0;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        2px 2px 4px #000;
}

.volume-item {
    margin-bottom: 15px;
}

.volume-item label {
    color: #ff0000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 
        0 0 5px #ff0000,
        0 0 10px #ff0000;
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider-container input[type="range"] {
    flex: 1;
    height: 3px;
    background: #333;
    outline: none;
    border-radius: 0;
    cursor: pointer;
    border: 1px solid #555;
}

.volume-slider-container input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 0;
    cursor: pointer;
    border: 1px solid #888;
}

.volume-slider-container input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 0;
    cursor: pointer;
    border: 1px solid #888;
}

.volume-percent {
    color: #777;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    min-width: 45px;
    text-align: right;
}

#close-volume-panel {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: #222;
    color: #888;
    border: 1px solid #555;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 2px;
}

#close-volume-panel:hover {
    background: #333;
    color: #aaa;
    border-color: #777;
}

#main-menu button {
    width: 20vw;
    min-width: 200px;
    padding: 1.5vh 2vw;
    margin: 1.5vh 0;
    font-size: 1.8vw;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 3px;
    white-space: nowrap;
}

#main-menu button::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.2s;
}

#main-menu button:hover::before,
#main-menu button:focus::before {
    opacity: 1;
}

#main-menu button:hover {
    transform: translateX(10px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* 特殊夜晚按钮 */
#special-night-btn {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* 恐怖脸闪烁效果 - 不再需要，改用背景图切换 */
.copyright {
    position: absolute;
    bottom: 2vh;
    left: 2vw;
    font-size: 1.2vw;
    color: #888;
    font-family: 'Courier New', monospace;
    z-index: 102;
}

.reset-hint {
    position: absolute;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8vw;
    color: #888;
    font-family: 'Courier New', monospace;
    z-index: 102;
}

.version {
    position: absolute;
    bottom: 2vh;
    right: 8vw;
    font-size: 1.8vw;
    color: #ccc;
    font-family: 'Courier New', monospace;
    z-index: 102;
    font-weight: bold;
}

/* 游戏结束 */
#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    overflow: hidden;
}

/* 雪花视频背景 */
#game-over-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
}

/* 游戏结束内容层 */
#game-over-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game-over h2 {
    font-size: 8vw;
    margin-bottom: 2vh;
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000,
        3px 3px 6px #000;
    font-weight: bold;
    letter-spacing: 0.1em;
}

#game-over-subtitle {
    font-size: 1.8vw;
    margin-bottom: 4vh;
    color: #ff0000;
    font-style: italic;
    text-align: center;
    padding: 0 2vw;
    text-shadow: 
        0 0 5px #ff0000,
        0 0 10px #ff0000,
        2px 2px 4px #000;
    font-weight: bold;
}

#game-over button {
    width: 20vw;
    min-width: 200px;
    padding: 1.5vh 2vw;
    margin: 1vh 0;
    font-size: 1.5vw;
    background: #333;
    border: 2px solid #666;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

#game-over button:hover {
    background: #555;
    border-color: #fff;
}

/* 游戏教程提示 */
#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#tutorial-content {
    background: rgba(30, 30, 30, 0.95);
    border: 3px solid #666;
    padding: 4vh 5vw;
    max-width: 60vw;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

#tutorial-content h2 {
    font-size: 3vw;
    margin-bottom: 3vh;
    color: #fff;
    text-shadow: 2px 2px 4px #000;
    letter-spacing: 0.1em;
}

#tutorial-content p {
    font-size: 1.4vw;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 3vh;
    text-align: left;
}

#tutorial-got-it {
    width: 15vw;
    min-width: 150px;
    padding: 1.5vh 3vw;
    font-size: 1.8vw;
    background: #555;
    border: 2px solid #888;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    letter-spacing: 0.2em;
}

#tutorial-got-it:hover {
    background: #777;
    border-color: #fff;
    transform: scale(1.05);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}


/* 闪烁效果 */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.flicker {
    animation: flicker 0.1s infinite;
}

/* 警告闪烁动画 */
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 加载点动画 */
@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.loading-dots {
    animation: loadingDots 1s infinite;
}

/* 过场动画 */
#cutscene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    cursor: pointer;
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

#cutscene.fade-in {
    opacity: 1;
}

#cutscene.fade-out {
    opacity: 0;
}

#cutscene img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cutscene-hint {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.5vw;
    font-family: 'Courier New', monospace;
    animation: pulse 1.5s infinite;
}

/* 每晚开始场景 */
#night-intro {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#night-intro.fade-in {
    opacity: 1;
}

#night-intro.fade-out {
    opacity: 0;
}

#night-intro-text {
    font-size: 8vw;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.5vw;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    z-index: 1;
}

/* 电眼闪烁动画 (Night 6) */
@keyframes lightning-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

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

@keyframes lightning-bolt {
    0%, 100% { 
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scaleY(0.5);
    }
    10%, 20% { 
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scaleY(1);
    }
    30% { 
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scaleY(0.8);
    }
}

.lightning-eye-effect {
    animation: lightning-flicker 0.1s infinite;
}

/* Mobile Portrait */
@media (max-width: 768px) and (orientation: portrait) {
    /* Preloader mobile styles */
    .preloader-logo {
        font-size: 6vw;
    }
    
    .preloader-text {
        font-size: 3.5vw;
    }
    
    .preloader-percentage {
        font-size: 3vw;
    }
    
    /* Increase touch target sizes */
    .control-panel-button,
    .camera-button {
        min-width: 60px !important;
        min-height: 60px !important;
    }
    
    /* Adjust UI text sizes for mobile */
    #top-left-ui {
        top: 1vh;
        left: 2vw;
    }
    
    #time-display {
        font-size: 4vw;
    }
    
    #night-display {
        font-size: 3vw;
    }
    
    #bottom-right-ui {
        bottom: 1vh;
        right: 2vw;
    }
    
    #oxygen-display {
        font-size: 4vw;
    }
    
    .vent-icon {
        width: 5vw;
        height: 5vw;
    }
    
    /* Camera panel adjustments */
    #camera-panel {
        width: 90vw;
        height: 70vh;
        right: 5vw;
        top: 10vh;
    }
    
    #current-cam-label {
        font-size: 18px;
        top: 10px;
        left: 10px;
    }
    
    #camera-error-label {
        font-size: 36px;
        top: 10px;
        right: 15px;
    }
    
    #camera-grid {
        width: 40vw;
        max-width: none;
        bottom: 10px;
        left: 10px;
    }
    
    #play-sound-btn {
        width: 180px;
        padding: 10px 0;
        font-size: 14px;
        bottom: 15px;
        right: 15px;
        letter-spacing: 2px;
    }
    
    #shock-hawking-btn {
        width: 180px;
        padding: 10px 0;
        font-size: 14px;
        bottom: 70px;
        right: 15px;
        letter-spacing: 2px;
    }
    
    /* Control panel popup */
    #control-panel-popup {
        width: 85vw !important;
        left: 7.5vw !important;
        top: 15vh !important;
        min-height: 50vh !important;
        font-size: 3.5vw !important;
    }
    
    #control-panel-popup h3 {
        font-size: 4vw !important;
    }
    
    .control-row input {
        font-size: 3vw !important;
    }
    
    /* Main menu - 修复移动端按钮点击问题 */
    #main-menu {
        padding-left: 8%;
        padding-right: 8%;
        align-items: center;
    }
    
    #star-icon {
        width: 12vw;
        max-width: 60px;
        top: 10vh;
    }
    
    #star-icon-2 {
        width: 12vw;
        max-width: 60px;
        top: 18vh; /* 比第一颗低8vh */
    }
    
    #star-icon-3 {
        width: 12vw;
        max-width: 60px;
        top: 26vh; /* 比第二颗低8vh */
    }
    
    #main-menu h1 {
        font-size: 10vw;
        margin-bottom: 8vh;
        text-align: center;
        width: 100%;
    }
    
    #main-menu button {
        font-size: 5vw;
        width: 70vw;
        max-width: 400px;
        padding: 3vh 6vw;
        margin: 2vh 0;
        text-align: center;
        min-height: 60px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
        position: relative;
        z-index: 103;
    }
    
    #main-menu button::before {
        content: '';
        opacity: 0;
    }
    
    #main-menu button:hover::before,
    #main-menu button:focus::before {
        opacity: 0;
    }
    
    #main-menu button:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.98);
    }
    
    .copyright {
        font-size: 2.5vw;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
    }
    
    .reset-hint {
        font-size: 2.5vw;
    }
    
    .version {
        font-size: 2.5vw;
    }
    
    /* Game over screen */
    #game-over h2 {
        font-size: 12vw;
    }
    
    #game-over-subtitle {
        font-size: 3.5vw;
    }
    
    #game-over button {
        font-size: 4vw;
        width: 60vw;
        padding: 2vh 4vw;
    }
    
    /* Tutorial */
    #tutorial-content {
        max-width: 85vw;
        padding: 3vh 4vw;
    }
    
    #tutorial-content h2 {
        font-size: 5vw;
    }
    
    #tutorial-content p {
        font-size: 3.5vw;
    }
    
    #tutorial-got-it {
        font-size: 4vw;
        width: 40vw;
        padding: 2vh 4vw;
    }
    
    /* Night intro */
    #night-intro-text {
        font-size: 12vw;
    }
    
    .cutscene-hint {
        font-size: 3.5vw;
    }
}

/* Mobile Landscape - 横屏优化 */
@media (max-width: 926px) and (orientation: landscape) {
    /* Preloader mobile styles */
    .preloader-logo {
        font-size: 4vh;
    }
    
    .preloader-text {
        font-size: 2vh;
    }
    
    .preloader-percentage {
        font-size: 2vh;
    }
    
    /* 横屏时增大摄像头按钮并确保可见 */
    #camera-btn {
        width: 70px !important;
        height: 60vh !important;
        min-width: 70px !important;
        min-height: 200px !important;
        background: rgba(0, 0, 0, 0.95) !important;
        border: 3px solid rgba(255, 255, 255, 0.7) !important;
        border-right: none !important;
        z-index: 25 !important;
        top: 30vh !important;
        transform: translateY(0) !important;
    }
    
    #camera-btn .camera-arrow {
        font-size: 20px !important;
    }
    
    #camera-btn div[style*="CAMERA"] {
        font-size: 14px !important;
    }
    
    /* UI adjustments for landscape */
    #top-left-ui {
        top: 1vh;
        left: 1vw;
    }
    
    #time-display {
        font-size: 3vh;
    }
    
    #night-display {
        font-size: 2vh;
    }
    
    #bottom-right-ui {
        bottom: 1vh;
        right: 1vw;
    }
    
    #oxygen-display {
        font-size: 3vh;
    }
    
    .vent-icon {
        width: 4vh;
        height: 4vh;
    }
    
    /* Camera panel - 横屏时不占满屏幕，留出右侧空间 */
    #camera-panel {
        width: calc(100vw - 70px);
        height: 100vh;
        right: 70px;
        top: 0;
        border: none;
        border-right: 3px solid #444;
    }
    
    #current-cam-label {
        font-size: 2.5vh;
        top: 1vh;
        left: 1vw;
    }
    
    #camera-error-label {
        font-size: 5vh;
        top: 1vh;
        right: 2vw;
    }
    
    /* Camera grid - 横屏时缩小并移到左下角 */
    #camera-grid {
        width: 25vw;
        max-width: 280px;
        bottom: 1vh;
        left: 1vw;
    }
    
    /* 横屏时调整按钮布局 */
    #play-sound-btn {
        width: 180px;
        padding: 2vh 0;
        font-size: 2.5vh;
        bottom: 2vh;
        right: 2vw;
        letter-spacing: 2px;
    }
    
    #shock-hawking-btn {
        width: 180px;
        padding: 2vh 0;
        font-size: 2.5vh;
        bottom: 10vh;
        right: 2vw;
        letter-spacing: 2px;
    }
    
    /* Main menu landscape */
    #main-menu {
        padding-left: 5%;
        align-items: flex-start;
    }
    
    #main-menu h1 {
        font-size: 6vh;
        margin-bottom: 3vh;
        text-align: left;
    }
    
    #main-menu button {
        font-size: 2.5vh;
        width: 30vw;
        min-width: 200px;
        padding: 1.5vh 3vw;
        margin: 1vh 0;
        min-height: 50px;
    }
    
    .copyright,
    .reset-hint,
    .version {
        font-size: 1.5vh;
    }
    
    /* Game over screen landscape */
    #game-over h2 {
        font-size: 8vh;
    }
    
    #game-over-subtitle {
        font-size: 2vh;
    }
    
    #game-over button {
        font-size: 2.5vh;
        width: 30vw;
        padding: 1.5vh 3vw;
        min-height: 50px;
    }
    
    /* Tutorial - 横屏时大幅缩小 */
    #tutorial-content {
        max-width: 70vw;
        max-height: 85vh;
        padding: 2vh 3vw;
        overflow-y: auto;
    }
    
    #tutorial-content h2 {
        font-size: 2.5vh;
        margin-bottom: 1.5vh;
    }
    
    #tutorial-content p {
        font-size: 1.6vh;
        line-height: 1.5;
        margin-bottom: 2vh;
    }
    
    #tutorial-got-it {
        font-size: 2vh;
        width: 20vw;
        min-width: 120px;
        padding: 1.5vh 3vw;
        min-height: 45px;
    }
    
    /* Night intro landscape */
    #night-intro-text {
        font-size: 8vh;
    }
    
    .cutscene-hint {
        font-size: 2vh;
    }
    
    /* Volume button landscape */
    #volume-btn {
        font-size: 2vh;
        padding: 1vh 2vw;
        top: 1vh;
        right: 1vw;
    }
    
    /* Volume panel landscape - 优化高度防止溢出 */
    #volume-panel {
        padding: 2vh 3vw;
        min-width: 300px;
        max-width: 70vw;
        max-height: 85vh;
    }
    
    #volume-panel h3 {
        font-size: 2vh;
        margin-bottom: 1.5vh;
    }
    
    .volume-item {
        margin-bottom: 1.5vh;
    }
    
    .volume-item label {
        font-size: 1.5vh;
        margin-bottom: 0.5vh;
    }
    
    .volume-percent {
        font-size: 1.5vh;
    }
    
    #close-volume-panel {
        font-size: 1.8vh;
        padding: 1vh;
        margin-top: 1.5vh;
    }
}

/* Prevent text selection on touch devices */
@media (hover: none) and (pointer: coarse) {
    * {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    input, textarea {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    .hotspot:active,
    .control-panel-button:active,
    .camera-button:active,
    button:active {
        opacity: 0.7;
        transform: scale(0.95);
    }
}


/* ==================== Custom Night Menu ==================== */
#custom-night-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2vh;
}

#custom-night-menu h1 {
    font-size: 5vw;
    color: #fff;
    margin-bottom: 4vh;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.custom-night-controls {
    display: flex;
    flex-direction: column;
    gap: 3vh;
    width: 60%;
    max-width: 800px;
    margin-bottom: 4vh;
}

.ai-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 20, 20, 0.8);
    padding: 2vh 3vw;
    border-radius: 10px;
    border: 2px solid rgba(100, 100, 100, 0.3);
    transition: all 0.3s;
}

.ai-control:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(150, 150, 150, 0.5);
}

.ai-name {
    font-size: 2vw;
    font-weight: bold;
    color: #fff;
    min-width: 150px;
}

.ai-slider-container {
    display: flex;
    align-items: center;
    gap: 1vw;
    flex: 1;
    margin: 0 2vw;
}

.ai-btn-minus,
.ai-btn-plus {
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    background: rgba(50, 50, 50, 0.8);
    border: 2px solid rgba(100, 100, 100, 0.5);
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

.ai-btn-minus:hover,
.ai-btn-plus:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(150, 150, 150, 0.7);
    transform: scale(1.1);
}

.ai-btn-minus:active,
.ai-btn-plus:active {
    transform: scale(0.95);
}

.ai-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(80, 80, 80, 0.6);
    border-radius: 5px;
    outline: none;
}

.ai-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
    transition: all 0.2s;
}

.ai-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(220, 220, 220, 0.8);
}

.ai-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
    transition: all 0.2s;
}

.ai-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(220, 220, 220, 0.8);
}

.ai-value {
    font-size: 2.5vw;
    font-weight: bold;
    color: #fff;
    min-width: 60px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.custom-night-buttons {
    display: flex;
    gap: 2vw;
}

.custom-night-buttons button {
    padding: 1.5vh 3vw;
    font-size: 1.5vw;
    font-weight: bold;
    background: rgba(50, 50, 50, 0.8);
    border: 2px solid rgba(100, 100, 100, 0.5);
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    min-width: 150px;
}

.custom-night-buttons button:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(150, 150, 150, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.custom-night-buttons button:active {
    transform: translateY(0);
}

/* Mobile 适配 */
@media (max-width: 768px) {
    #custom-night-menu h1 {
        font-size: 8vw;
    }
    
    .custom-night-controls {
        width: 90%;
    }
    
    .ai-control {
        flex-direction: column;
        gap: 1vh;
        padding: 2vh;
    }
    
    .ai-name {
        font-size: 5vw;
        min-width: auto;
    }
    
    .ai-slider-container {
        width: 100%;
        margin: 0;
    }
    
    .ai-value {
        font-size: 6vw;
    }
    
    .custom-night-buttons {
        flex-direction: column;
        width: 80%;
    }
    
    .custom-night-buttons button {
        font-size: 4vw;
        width: 100%;
    }
}



/* ============================================================
   ARTEM1SRUN AESTHETICS EXTENSION FOR FIVE NIGHTS AT EPSTEIN'S
   ============================================================ */
body {
    background-color: var(--bg-void) !important;
    color: var(--text-primary) !important;
    font-family: 'Courier New', 'Fira Code', monospace !important;
}

#game-container {
    border: 1px solid rgba(157, 78, 221, 0.35);
    box-shadow: 
        0 0 20px rgba(0, 229, 255, 0.2),
        inset 0 0 20px rgba(157, 78, 221, 0.15);
    border-radius: 8px;
    background: #000;
}

#preloader {
    background: radial-gradient(circle at center, #1a1030 0%, #0a0714 80%) !important;
}

.preloader-logo {
    font-family: 'Press Start 2P', monospace !important;
    color: var(--holo-cyan) !important;
    font-size: clamp(20px, 3.5vw, 42px) !important;
    text-shadow: 
        0 0 12px var(--holo-cyan),
        0 0 25px var(--purple-400),
        0 0 45px rgba(255, 77, 109, 0.6) !important;
    letter-spacing: 3px;
    line-height: 1.3;
}

.spinner-ring {
    border-top-color: var(--holo-cyan) !important;
    border-right-color: var(--purple-400) !important;
    filter: drop-shadow(0 0 8px var(--holo-cyan));
}

.preloader-text {
    font-family: 'Press Start 2P', monospace !important;
    color: var(--holo-glow) !important;
    font-size: clamp(10px, 1.4vw, 16px) !important;
    text-shadow: 0 0 10px var(--holo-cyan) !important;
}

.preloader-progress {
    background: rgba(10, 7, 20, 0.9) !important;
    border: 1px solid var(--purple-400) !important;
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.4) !important;
}

.progress-bar {
    background: linear-gradient(90deg, var(--holo-cyan), var(--purple-400)) !important;
    box-shadow: 0 0 14px var(--holo-cyan) !important;
}

.preloader-percentage {
    font-family: 'Press Start 2P', monospace !important;
    color: var(--holo-cyan) !important;
}

#main-menu h1 {
    font-family: 'Press Start 2P', monospace !important;
    font-size: clamp(24px, 4.2vw, 56px) !important;
    color: var(--holo-cyan) !important;
    text-shadow: 
        0 0 10px var(--holo-cyan),
        0 0 22px var(--purple-400),
        0 0 40px rgba(0, 229, 255, 0.5) !important;
    line-height: 1.35 !important;
    letter-spacing: 2px !important;
}

#main-menu button {
    font-family: 'Press Start 2P', monospace !important;
    font-size: clamp(11px, 1.3vw, 17px) !important;
    color: var(--text-bright) !important;
    background: rgba(18, 11, 34, 0.65) !important;
    border: 1px solid rgba(0, 229, 255, 0.4) !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    margin: 8px 0 !important;
    box-shadow: 
        0 0 12px rgba(0, 229, 255, 0.15),
        inset 0 0 10px rgba(157, 78, 221, 0.12) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#main-menu button:hover {
    background: var(--holo-cyan) !important;
    color: #06121a !important;
    border-color: var(--holo-glow) !important;
    box-shadow: 
        0 0 24px rgba(0, 229, 255, 0.7),
        0 0 40px rgba(157, 78, 221, 0.5) !important;
    transform: translateX(12px) scale(1.03) !important;
    text-shadow: none !important;
}

#special-night-btn {
    border-color: rgba(255, 179, 71, 0.6) !important;
    color: var(--warning) !important;
}
#special-night-btn:hover {
    background: var(--warning) !important;
    color: #06121a !important;
    box-shadow: 0 0 24px rgba(255, 179, 71, 0.8) !important;
}

#volume-panel, #custom-night-menu, #tutorial-overlay, #game-over-content {
    background: rgba(18, 11, 34, 0.94) !important;
    border: 1px solid rgba(0, 229, 255, 0.55) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 0 35px rgba(0, 229, 255, 0.25),
        0 0 60px rgba(157, 78, 221, 0.2),
        inset 0 0 24px rgba(0, 229, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    color: var(--text-bright) !important;
}

#volume-panel h3, #custom-night-menu h1, #tutorial-overlay h2 {
    font-family: 'Press Start 2P', monospace !important;
    color: var(--holo-cyan) !important;
    text-shadow: 0 0 10px var(--holo-cyan) !important;
    font-size: clamp(14px, 2vw, 22px) !important;
}

.volume-item label, .ai-name {
    font-family: 'Fira Code', monospace !important;
    font-weight: 700 !important;
    color: var(--purple-200) !important;
    text-shadow: 0 0 6px rgba(157, 78, 221, 0.5) !important;
}

input[type="range"] {
    accent-color: var(--holo-cyan) !important;
}

#close-volume-panel, #start-custom-night, #back-to-menu, #tutorial-got-it, #restart, #main-menu-btn {
    font-family: 'Press Start 2P', monospace !important;
    font-size: 11px !important;
    background: rgba(0, 229, 255, 0.1) !important;
    border: 1px solid var(--holo-cyan) !important;
    color: var(--holo-cyan) !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) !important;
}

#close-volume-panel:hover, #start-custom-night:hover, #back-to-menu:hover, #tutorial-got-it:hover, #restart:hover, #main-menu-btn:hover {
    background: var(--holo-cyan) !important;
    color: #06121a !important;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.6) !important;
}

.ai-control {
    background: rgba(26, 16, 48, 0.85) !important;
    border: 1px solid rgba(157, 78, 221, 0.45) !important;
    border-radius: 8px !important;
}
.ai-btn-minus, .ai-btn-plus {
    background: rgba(0, 229, 255, 0.12) !important;
    border: 1px solid var(--holo-cyan) !important;
    color: var(--holo-cyan) !important;
    border-radius: 4px !important;
}
.ai-btn-minus:hover, .ai-btn-plus:hover {
    background: var(--holo-cyan) !important;
    color: #000 !important;
}

#top-left-ui, #bottom-right-ui {
    font-family: 'Press Start 2P', monospace !important;
    color: var(--holo-cyan) !important;
    text-shadow: 0 0 8px var(--holo-cyan) !important;
}

#shock-hawking-btn, #play-sound-btn {
    font-family: 'Press Start 2P', monospace !important;
    font-size: 10px !important;
    background: rgba(18, 11, 34, 0.85) !important;
    border: 1px solid var(--holo-cyan) !important;
    color: var(--holo-cyan) !important;
    border-radius: 6px !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.25) !important;
}

#shock-hawking-btn:hover, #play-sound-btn:hover {
    background: var(--holo-cyan) !important;
    color: #06121a !important;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.7) !important;
}

.version {
    font-family: 'Fira Code', monospace !important;
    color: var(--holo-glow) !important;
    text-shadow: 0 0 6px var(--holo-cyan) !important;
}
