/* css/space-game.css — міні-гра «Космічний мисливець» */

#space-game.space-screen {
  padding: 14px 12px;
}

.space-card {
  max-width: 430px;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sg-stage {
  position: relative;
  width: 100%;
  height: min(68vh, 560px);
  min-height: 320px;
  background: #0b0a24;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#spaceCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* HUD */
.sg-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: linear-gradient(rgba(8, 7, 28, 0.85), rgba(8, 7, 28, 0));
  pointer-events: none;
  z-index: 3;
}

.sg-hud-item {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sg-hud-label {
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9d97c4;
}

.sg-hud-item b {
  font-size: 16px;
  color: #fff;
}

.sg-hud-target {
  align-items: center;
  text-align: center;
}

.sg-hud-target b {
  color: #8ff0c0;
  font-size: 15px;
}

.sg-hud-item:last-child b {
  color: #ff6b81;
  letter-spacing: 1px;
}

/* Пауза */
.sg-pause {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(20, 18, 50, 0.75);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;
}

.sg-pause:active {
  transform: scale(0.94);
}

/* Оверлей (стартовий екран, пауза, результат) */
.sg-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 5, 22, 0.82);
  backdrop-filter: blur(4px);
}

.sg-panel {
  width: 100%;
  max-width: 340px;
  padding: 20px 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(38, 32, 88, 0.96), rgba(14, 12, 40, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.sg-panel-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
}

.sg-panel-text {
  margin: 0 0 16px;
  color: #c7c2e4;
  font-size: 13px;
  line-height: 1.45;
}

.sg-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sg-panel-actions .btn {
  width: 100%;
  margin: 0;
}

.space-back {
  margin: 10px 12px 14px;
}
