* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: 'Courier New', monospace;
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-container {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 600px;
}

#gameCanvas {
  background-color: #000;
  border: 4px solid #3a5;
  border-top: none;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
  width: 100%;
}

.score-board {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px;
  background-color: #222;
  border: 4px solid #3a5;
  border-bottom: none;
  margin-bottom: 0;
  font-size: 16px;
  color: #ff7;
  width: 100%;
}

.score {
  padding: 5px;
  font-weight: bold;
  text-shadow: 2px 2px 0 #000;
  flex: 1 0 auto;
  text-align: center;
  margin: 0 5px;
}

#kills {
  color: #f55;
}

#dodges {
  color: #5af;
}

#avoids {
  color: #5f5;
}

#lives {
  color: #5ff;
}

#intercepts {
  color: #ff0;
}

/* 状态条样式 */
.stats-container {
  width: 100%;
  padding: 10px;
  background-color: #222;
  border: 4px solid #3a5;
  border-top: none;
  border-bottom: 4px solid #3a5;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bar-label {
  width: 70px;
  text-align: right;
  font-weight: bold;
  font-size: 14px;
  padding-right: 10px;
}

.bar-outer {
  flex: 1;
  height: 15px;
  background-color: #333;
  border: 2px solid #444;
  border-radius: 7px;
  overflow: hidden;
}

.bar-inner {
  height: 100%;
  transition: width 0.3s ease-out;
}

.health-bar {
  background: linear-gradient(to right, #3f3, #6f6);
  box-shadow: 0 0 5px #3f3;
}

.shield-bar {
  background: linear-gradient(to right, #5af, #5ff);
  box-shadow: 0 0 5px #5ff;
}

.bar-text {
  width: 50px;
  text-align: left;
  padding-left: 10px;
  font-size: 14px;
}

#orientation-message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  font-size: 24px;
  padding-top: 50%;
  z-index: 1000;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-container {
    width: 100%;
  }
  
  .score-board {
    flex-direction: row;
    flex-wrap: wrap;
    font-size: 14px;
  }
  
  .score {
    flex: 1 0 33%;
    text-align: center;
    margin: 5px 0;
  }
  
  .bar-container {
    flex-wrap: wrap;
  }
  
  .bar-label {
    width: 60px;
    font-size: 12px;
  }
  
  .bar-text {
    width: 40px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }
  
  .score-board, .stats-container {
    padding: 5px;
    font-size: 12px;
    border-width: 2px;
  }
  
  #gameCanvas {
    border-width: 2px;
  }
  
  .bar-outer {
    height: 12px;
    border-width: 1px;
  }
}

/* 横屏检测 */
@media (max-height: 450px) and (orientation: portrait) {
  #orientation-message {
    display: block;
  }
  
  #gameCanvas, .score-board, .stats-container {
    display: none;
  }
} 