* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.game-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #0d0d2b 0%, #1a1a3e 50%, #0d0d2b 100%);
}

.game-header {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  z-index: 10;
}

.score-panel {
  display: flex;
  gap: 16px;
  align-items: center;
}

.score-item {
  text-align: center;
}

.score-label {
  font-size: 11px;
  color: #8888aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-value {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
}

.high-score .score-value {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.control-buttons {
  display: flex;
  gap: 6px;
}

.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-home {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.2);
}

.canvas-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}

canvas {
  display: block;
  background: transparent;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 20;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.3s;
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-title {
  font-size: 36px;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(100, 200, 255, 0.8);
}

.overlay-subtitle {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 24px;
}

.overlay-score {
  font-size: 22px;
  color: #ffd700;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.overlay-btn {
  padding: 12px 36px;
  font-size: 18px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  transition: all 0.2s;
  margin: 6px;
}

.overlay-btn-primary {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.overlay-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.overlay-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.overlay-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 12px 24px;
  border-radius: 12px;
  display: none;
  z-index: 15;
  backdrop-filter: blur(4px);
}

.mobile-controls {
  padding: 6px;
  text-align: center;
}

.mobile-hint {
  font-size: 12px;
  color: #666;
}

.shots-indicator {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 5;
}

.shot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s;
}

.shot-dot.used {
  background: rgba(255, 100, 100, 0.8);
}

@media (max-width: 480px) {
  .game-header {
    padding: 4px 8px;
  }
  .score-panel {
    gap: 10px;
  }
  .score-label {
    font-size: 10px;
  }
  .score-value {
    font-size: 15px;
  }
  .btn {
    padding: 4px 8px;
    font-size: 12px;
  }
  .overlay-title {
    font-size: 28px;
  }
}
