* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0b0b0f;
  color: #eaeaea;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.hud {
  width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
}

.hud.hidden { visibility: hidden; }

.hud div { font-weight: 800; }

.hud button {
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #222;
  color: #fff;
  cursor: pointer;
}

.hud button:hover { background: #2b2b2b; }

.wrap {
  width: 600px;
  display: grid;
  place-items: center;
  gap: 10px;
  position: relative;
}

canvas {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #050505;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  touch-action: none;
}

.hint {
  margin: 0 0 18px;
  opacity: 0.7;
  font-size: 14px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.65);
}

.hidden { display: none; }

.card {
  width: min(460px, 92vw);
  padding: 18px;
  border-radius: 16px;
  background: #121218;
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}

.title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 6px;
  font-family: "VT323", monospace;
  letter-spacing: 1px;
}

.sub {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 14px;
}

.final {
  font-size: 18px;
  margin-bottom: 14px;
}

.menu-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.card button {
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #bd0000;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  min-width: 140px;
}

.card button:hover { filter: brightness(1.05); }

.card button.danger {
  background: #333;
}

.card button.danger:hover { background: #444; }

.tiny {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.7;
}

.ach-list {
  text-align: left;
  max-height: 340px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.25);
  margin-bottom: 14px;
}

.ach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: "VT323", monospace;
  font-size: 20px;
}

.ach-item:last-child { border-bottom: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
}

.dot.on { background: #39d98a; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(18,18,24,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 14px;
  border-radius: 12px;
  font-family: "VT323", monospace;
  font-size: 22px;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
