* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; font-family: Arial, sans-serif; }
#game-container { width: 100%; height: 100%; position: relative; }
#game-canvas { width: 100%; height: 100%; display: block; }

/* HUD - 科幻风格 */
#hud { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }

/* 准星 - 科幻动态风格 */
#crosshair { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  width: 40px; 
  height: 40px;
}
#crosshair::before, #crosshair::after { 
  content: ''; 
  position: absolute; 
  background: rgba(0,255,255,0.9);
  box-shadow: 0 0 10px rgba(0,255,255,0.8), 0 0 20px rgba(0,255,255,0.4);
  transition: all 0.1s;
}
#crosshair::before { width: 2px; height: 12px; left: 19px; top: 0; }
#crosshair::after { width: 12px; height: 2px; top: 19px; left: 0; }
#crosshair .cross-h1 { position: absolute; width: 2px; height: 12px; left: 19px; bottom: 0; background: rgba(0,255,255,0.9); box-shadow: 0 0 10px rgba(0,255,255,0.8); }
#crosshair .cross-v1 { position: absolute; width: 12px; height: 2px; top: 19px; right: 0; background: rgba(0,255,255,0.9); box-shadow: 0 0 10px rgba(0,255,255,0.8); }
#crosshair .cross-dot { position: absolute; width: 4px; height: 4px; top: 18px; left: 18px; background: #0ff; border-radius: 50%; box-shadow: 0 0 8px #0ff; }

/* 状态栏 - 全息投影风格 */
#status-bar { 
  position: absolute; 
  bottom: 20px; 
  left: 20px; 
  display: flex; 
  gap: 15px;
  filter: drop-shadow(0 0 10px rgba(0,255,255,0.3));
}
.status-item { 
  background: linear-gradient(135deg, rgba(0,20,40,0.85) 0%, rgba(0,40,60,0.75) 100%);
  padding: 12px 18px; 
  border-radius: 8px; 
  color: #fff; 
  font-size: 14px;
  border: 1px solid rgba(0,255,255,0.4);
  box-shadow: inset 0 0 20px rgba(0,255,255,0.1), 0 0 15px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.status-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,255,0.8), transparent);
}
.status-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,255,0.1), transparent);
  animation: scanline 3s infinite;
}
@keyframes scanline {
  0% { left: -100%; }
  100% { left: 100%; }
}

#health-bar, #ammo-bar { display: flex; align-items: center; gap: 10px; }
.bar-bg { 
  width: 150px; 
  height: 18px; 
  background: rgba(0,0,0,0.5); 
  border-radius: 3px; 
  overflow: hidden;
  border: 1px solid rgba(0,255,255,0.3);
  position: relative;
}
.bar-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0,0,0,0.3) 10px, rgba(0,0,0,0.3) 11px);
}
#health-fill { 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, #ff2222, #ff4444, #ff6666); 
  transition: width 0.3s;
  box-shadow: 0 0 15px rgba(255,50,50,0.6), inset 0 0 10px rgba(255,255,255,0.2);
  position: relative;
}
#health-fill.low {
  background: linear-gradient(90deg, #ff0000, #ff2222);
  animation: healthPulse 0.5s infinite;
}
@keyframes healthPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255,0,0,0.6); }
  50% { box-shadow: 0 0 25px rgba(255,0,0,0.9); }
}
#ammo-count { 
  font-size: 20px; 
  font-weight: bold;
  color: #0ff;
  text-shadow: 0 0 10px rgba(0,255,255,0.8);
  font-family: 'Courier New', monospace;
}

/* 提示信息 */
#message { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #fff; padding: 15px 30px; border-radius: 8px; font-size: 16px; display: none; }
#interaction-hint { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #fff; padding: 10px 20px; border-radius: 5px; font-size: 14px; display: none; }

/* 语音状态 */
#voice-status { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.6); padding: 10px 15px; border-radius: 5px; color: #fff; font-size: 14px; display: flex; align-items: center; gap: 10px; }
#voice-indicator { width: 12px; height: 12px; border-radius: 50%; background: #666; }
#voice-indicator.listening { background: #4CAF50; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* 语音识别文字显示 */
#speech-display { position: absolute; top: 70px; right: 20px; max-width: 300px; background: rgba(0,0,0,0.7); padding: 12px 16px; border-radius: 8px; color: #fff; font-size: 14px; display: none; border-left: 3px solid #4CAF50; }
#speech-display.active { display: block; }
#speech-text { line-height: 1.5; }
#speech-text .label { color: #4CAF50; font-weight: bold; margin-bottom: 5px; display: block; }
#speech-text .content { color: #fff; }
#speech-text .npc-reply { color: #ffcc00; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.2); }

/* 小地图 - 全息风格 */
#minimap { 
  position: absolute; 
  top: 20px; 
  left: 20px; 
  width: 160px; 
  height: 160px; 
  background: linear-gradient(135deg, rgba(0,20,40,0.9) 0%, rgba(0,40,60,0.8) 100%);
  border: 2px solid rgba(0,255,255,0.5); 
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,255,255,0.3), inset 0 0 30px rgba(0,255,255,0.1);
  overflow: hidden;
}
#minimap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(0deg, transparent 49%, rgba(0,255,255,0.1) 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, rgba(0,255,255,0.1) 50%, transparent 51%);
  background-size: 20px 20px;
  pointer-events: none;
}
#minimap::after {
  content: 'TACTICAL MAP';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: rgba(0,255,255,0.6);
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}
#minimap-canvas { width: 100%; height: 100%; }

/* 队友状态 - 科幻风格 */
#team-status { position: absolute; top: 190px; left: 20px; display: flex; flex-direction: column; gap: 8px; }
.teammate-status { 
  background: linear-gradient(90deg, rgba(0,40,60,0.85) 0%, rgba(0,20,40,0.6) 100%);
  padding: 10px 15px; 
  border-radius: 5px; 
  color: #fff; 
  font-size: 12px; 
  display: flex; 
  align-items: center; 
  gap: 10px;
  border-left: 3px solid #0f0;
  box-shadow: 0 0 10px rgba(0,255,0,0.2);
}
.teammate-icon { 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  background: #0f0;
  box-shadow: 0 0 8px #0f0;
  animation: pulse 2s infinite;
}

/* 移动端控制器 */
.mobile-controls { display: none; position: fixed; z-index: 200; pointer-events: none; }
.mobile-controls.active { display: block; }

#joystick-move { position: fixed; left: 30px; bottom: 120px; width: 140px; height: 140px; background: rgba(255,255,255,0.15); border: 4px solid rgba(255,255,255,0.4); border-radius: 50%; pointer-events: auto; }
#joystick-move-thumb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(255,255,255,0.5); border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

#joystick-look { position: fixed; right: 160px; bottom: 120px; width: 140px; height: 140px; background: rgba(255,255,255,0.15); border: 4px solid rgba(255,255,255,0.4); border-radius: 50%; pointer-events: auto; }
#joystick-look-thumb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(255,255,255,0.5); border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

.ctrl-btn { position: fixed; width: 75px; height: 75px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.2); color: #fff; font-size: 13px; font-weight: bold; display: flex; align-items: center; justify-content: center; user-select: none; pointer-events: auto; text-shadow: 1px 1px 2px #000; }
.ctrl-btn:active, .ctrl-btn.pressed { background: rgba(255,255,255,0.5); transform: scale(0.95); }

#btn-fire { right: 30px; bottom: 140px; width: 100px; height: 100px; background: rgba(255,60,60,0.4); border-color: rgba(255,60,60,0.8); font-size: 16px; }
#btn-aim { right: 140px; bottom: 200px; background: rgba(60,140,255,0.4); border-color: rgba(60,140,255,0.8); }
#btn-jump { right: 30px; bottom: 260px; background: rgba(60,255,60,0.4); border-color: rgba(60,255,60,0.8); }
#btn-reload { right: 140px; bottom: 90px; background: rgba(255,180,60,0.4); border-color: rgba(255,180,60,0.8); }
#btn-voice { left: 30px; top: 180px; width: 80px; height: 80px; background: rgba(140,60,255,0.4); border-color: rgba(140,60,255,0.8); }
#btn-interact { left: 30px; bottom: 280px; background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.6); }
#btn-drone { left: 120px; bottom: 280px; background: rgba(0,200,255,0.4); border-color: rgba(0,200,255,0.8); }
#btn-sprint { right: 30px; bottom: 380px; background: rgba(255,150,0,0.4); border-color: rgba(255,150,0,0.8); }

/* 加载界面 - 超酷炫风格 */
#loading { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: #000 url('../assets/models/000.jpg') center center / cover no-repeat;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  z-index: 1000;
  overflow: hidden;
}
#loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
@keyframes rotateBg {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 50% 50%, transparent 0%, #000 70%);
  pointer-events: none;
}
#loading h1 { 
  position: relative;
  z-index: 10;
  color: #fff; 
  margin-bottom: 15px; 
  font-size: 62px;
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 15px;
  background: linear-gradient(90deg, #0ff, #fff, #0af, #fff, #0ff);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shineText 3s linear infinite, glowPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(0,255,255,1)) drop-shadow(0 0 60px rgba(0,200,255,0.8));
}
@keyframes shineText {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(0,255,255,1)) drop-shadow(0 0 60px rgba(0,200,255,0.8)); }
  50% { filter: drop-shadow(0 0 50px rgba(0,255,255,1)) drop-shadow(0 0 100px rgba(0,200,255,1)); }
}
#loading .subtitle {
  position: relative;
  z-index: 10;
  color: #0ff;
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 50px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 20px rgba(0,255,255,0.8);
  overflow: hidden;
  animation: typewriter 2s steps(30) forwards, blink 0.5s step-end infinite alternate;
  white-space: nowrap;
  border-right: 2px solid #0ff;
}
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}
#loading-bar { 
  position: relative;
  z-index: 10;
  width: 400px; 
  height: 4px; 
  background: rgba(0,255,255,0.1); 
  border-radius: 2px; 
  overflow: visible;
  box-shadow: 0 0 20px rgba(0,255,255,0.3);
}
#loading-fill { 
  width: 0%; 
  height: 100%; 
  background: linear-gradient(90deg, #0ff, #0af); 
  transition: width 0.3s;
  box-shadow: 0 0 20px #0ff, 0 0 40px #0af;
  position: relative;
  border-radius: 2px;
}
#loading-fill::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 20px #0ff, 0 0 40px #0ff;
}
#loading-text { 
  position: relative;
  z-index: 10;
  color: rgba(0,255,255,0.8); 
  margin-top: 25px; 
  font-size: 12px;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* 粒子效果 */
#loading .particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}
#loading .particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #0ff;
  border-radius: 50%;
  box-shadow: 0 0 10px #0ff;
  animation: floatUp 4s linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* 开始界面 - 超酷炫风格 */
#start-screen { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: #000 url('../assets/models/000.jpg') center center / cover no-repeat;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-start;
  padding-top: 15%;
  z-index: 900;
  overflow: hidden;
}
#start-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
#start-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, #000 70%);
  pointer-events: none;
}
#start-screen h1 { 
  position: relative;
  z-index: 10;
  color: #fff; 
  font-size: 80px; 
  margin-bottom: 10px; 
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 12px;
  background: linear-gradient(90deg, #0ff, #fff, #f0f, #fff, #0ff);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shineText 4s linear infinite, titleBounce 3s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(0,255,255,1)) drop-shadow(0 0 80px rgba(255,0,255,0.5));
}
@keyframes titleBounce {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.03) translateY(-10px); }
}
#start-screen .subtitle {
  position: relative;
  z-index: 10;
  color: #0ff;
  font-size: 24px;
  letter-spacing: 6px;
  margin-bottom: 30px;
  margin-top: -20px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 30px rgba(0,255,255,1);
  animation: flicker 3s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 30px rgba(0,255,255,1); }
  92% { opacity: 1; }
  93% { opacity: 0.8; text-shadow: 0 0 50px rgba(0,255,255,1); }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}
#start-screen .desc { 
  position: relative;
  z-index: 10;
  color: rgba(255,255,255,0.5); 
  margin-bottom: 60px; 
  font-size: 14px;
}
#start-screen p { 
  position: relative;
  z-index: 10;
}
#start-btn { 
  position: absolute;
  bottom: 20%;
  z-index: 10;
  padding: 20px 80px; 
  font-size: 22px; 
  background: transparent;
  border: 2px solid #0ff; 
  color: #0ff; 
  border-radius: 50px; 
  cursor: pointer; 
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 8px;
  font-weight: bold;
  font-family: 'Arial Black', sans-serif;
  overflow: hidden;
  animation: borderGlow 2s ease-in-out infinite;
}
@keyframes borderGlow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(0,255,255,0.5), inset 0 0 20px rgba(0,255,255,0.1);
    border-color: #0ff;
  }
  50% { 
    box-shadow: 0 0 40px rgba(0,255,255,0.8), 0 0 80px rgba(0,255,255,0.4), inset 0 0 30px rgba(0,255,255,0.2);
    border-color: #fff;
  }
}
#start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,255,0.4), transparent);
  transition: left 0.5s;
}
#start-btn:hover::before {
  left: 100%;
}
#start-btn:hover { 
  background: rgba(0,255,255,0.2);
  color: #fff;
  text-shadow: 0 0 20px #0ff;
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(0,255,255,1), inset 0 0 40px rgba(0,255,255,0.3);
}

/* 电路线条装饰 */
#start-screen .circuit-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.3;
}
#start-screen .circuit-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, #0ff, transparent);
  height: 1px;
  animation: circuitFlow 3s linear infinite;
}
@keyframes circuitFlow {
  0% { transform: translateX(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100vw); opacity: 0; }
}

/* 死亡界面 - 超酷炫风格 */
#death-screen { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: #000;
  display: none; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  z-index: 800;
  overflow: hidden;
}
#death-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(100,0,0,0.8) 0%, #000 70%);
  animation: deathPulse 1s ease-in-out infinite;
}
@keyframes deathPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}
#death-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,0,0,0.03) 2px,
    rgba(255,0,0,0.03) 4px
  );
  pointer-events: none;
  animation: scanlines 0.1s linear infinite;
}
@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}
#death-screen h1 { 
  position: relative;
  z-index: 10;
  color: #f00; 
  font-size: 90px; 
  margin-bottom: 20px;
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 25px;
  text-shadow: 
    0 0 20px #f00,
    0 0 40px #f00,
    0 0 80px #f00;
  animation: deathGlitch 0.3s infinite;
}
@keyframes deathGlitch {
  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); }
}
#death-screen p { 
  position: relative;
  z-index: 10;
  color: #aaa; 
  margin-bottom: 40px; 
  font-size: 18px; 
}
#respawn-btn { 
  position: relative;
  z-index: 10;
  padding: 18px 60px; 
  font-size: 18px; 
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5); 
  color: #fff; 
  border-radius: 30px; 
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-family: 'Arial Black', sans-serif;
  transition: all 0.3s;
}
#respawn-btn:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 40px rgba(255,255,255,0.8);
}
