* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    Segoe UI,
    sans-serif;
}

body {
  overflow: hidden;
  background: #020617;
  color: white;
}

canvas {
  position: fixed;
  inset: 0;
}

.hud {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 100;
}

.panel {
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px 18px;
}

#hearts {
  color: #ff4d6d;
  font-size: 28px;
}

.word {
  position: absolute;
  color: white;
  font-size: 26px;
  font-weight: 700;
  text-shadow:
    0 0 5px white,
    0 0 15px #00ffff;
  user-select: none;
  z-index: 10;
}

.active {
  color: #00ff99;
  transform: scale(1.15);
  text-shadow:
    0 0 10px #00ff99,
    0 0 25px #00ff99;
}

.ship {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  z-index: 5;
}

#typed {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 10px 20px;
  font-size: 24px;
  min-width: 200px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  text-align: center;
  background: #111827;
  padding: 40px;
  border-radius: 20px;
  width: 350px;
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
}

button {
  margin-top: 20px;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  background: #06b6d4;
  color: white;
}

button:hover {
  background: #0891b2;
}

@media (max-width: 768px) {
  .ship {
    font-size: 40px;
    left: 10px;
  }

  .hud {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 10px;
  }

  .panel {
    padding: 8px 12px;
    font-size: 14px;
  }

  #hearts {
    font-size: 20px;
  }

  .word {
    font-size: 20px;
  }

  #typed {
    width: 90%;
    font-size: 20px;
    bottom: 10px;
    min-width: unset;
  }

  .modal-content {
    width: 90%;
    padding: 25px;
  }

  button {
    width: 100%;
  }
}
