* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d1020;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f0f0f5;
}

#game {
  display: block;
  cursor: crosshair;
}

#hud {
  position: fixed;
  top: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 22px;
  font-weight: 600;
  text-shadow: 0 2px 6px #000;
  pointer-events: none;
  z-index: 5;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 18, 0.85);
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.panel {
  background: #1a1f3a;
  border: 1px solid #333a66;
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.panel h1 {
  margin-bottom: 16px;
  font-size: 28px;
}

.panel p {
  margin-bottom: 12px;
  line-height: 1.5;
  color: #c2c6e0;
}

.panel label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 600;
}

.panel select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #333a66;
  background: #0d1020;
  color: #f0f0f5;
  font-size: 16px;
  margin-bottom: 20px;
}

.panel button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4a6cff, #7a3cff);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.panel button + button {
  margin-top: 12px;
}

.panel button:hover {
  filter: brightness(1.1);
}

.panel button:active {
  transform: scale(0.97);
}

#homeBtn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4a6cff, #7a3cff);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

#homeBtn:hover {
  filter: brightness(1.12);
  box-shadow: 0 10px 28px rgba(74, 108, 255, 0.5);
}

#homeBtn:active {
  transform: scale(0.93);
}

#resultText {
  font-size: 20px;
  color: #ffd866;
}
