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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #9ec8e8;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #fff;
  user-select: none;
}

#app, #app canvas { display: block; width: 100%; height: 100%; }

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#money {
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffd23f;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#title {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  letter-spacing: 8px;
  text-transform: lowercase;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: fade 6s ease forwards;
}

@keyframes fade { 0%,60% { opacity: 1; } 100% { opacity: 0; } }

#prompt {
  position: absolute;
  bottom: 27%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 19px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  background: rgba(10,14,20,0.55);
  border: 1px solid rgba(255,255,255,0.22);
  text-shadow: 0 2px 6px #000;
  min-height: 0;
}

#prompt:empty { display: none; }

#help {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 12.5px;
  line-height: 1.65;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(10,14,20,0.42);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(3px);
  opacity: 0.9;
}

#help .row { display: flex; gap: 10px; }
#help .k {
  display: inline-block;
  min-width: 74px;
  font-weight: 700;
  color: #ffe27a;
  letter-spacing: 1px;
}

#cluster {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 320px;
  height: 150px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

#clusterCanvas { display: block; width: 320px; height: 150px; }

#tuner {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(6, 9, 14, 0.85);
  color: #e8e8e8;
}

#tuner.hidden { display: none; }

#tuner h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 5px;
  margin-bottom: 8px;
}

#tuner button {
  font: inherit;
  font-size: 15px;
  padding: 9px 26px;
  min-width: 230px;
  cursor: pointer;
  background: #e6e6e6;
  color: #111;
  border: 1px solid #999;
  border-radius: 4px;
}
#tuner button:hover { background: #fff; }

#hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(10,14,20,0.6);
  font-size: 14px;
  display: none;
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #101317;
  color: #e8e8e8;
  transition: opacity 0.3s ease;
}

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

#overlay h1 {
  font-size: 42px;
  font-weight: 600;
}

#overlay button {
  font: inherit;
  font-size: 15px;
  padding: 8px 26px;
  cursor: pointer;
  background: #e6e6e6;
  color: #111;
  border: 1px solid #999;
  border-radius: 4px;
}
#overlay button:hover { background: #fff; }

.opts { display: flex; gap: 10px; }
.opts button { font-size: 12px; padding: 5px 12px; }
