* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  background: #111827;
}

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

.hud {
  position: fixed;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.hud-left {
  top: 18px;
  left: 18px;
  width: min(390px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 8px;
}

.hud-right {
  top: 18px;
  right: 18px;
  width: min(330px, calc(100vw - 36px));
  padding: 14px;
  border-radius: 8px;
  display: grid;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.scoop {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(135deg, #f9a8d4, #fef3c7 55%, #38bdf8);
  box-shadow: inset 0 -8px rgba(255, 255, 255, 0.34);
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0;
}

p,
small,
span {
  color: #cbd5e1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.stats div,
.job,
.vehicle,
.world-info {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.38);
}

.stats span,
.job span,
.vehicle span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.stats strong,
.job strong,
.vehicle strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

button,
input {
  width: 100%;
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: inherit;
}

button {
  margin-top: 8px;
  color: #082f49;
  background: #67e8f9;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  background: #334155;
}

input {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.84);
  padding: 0 10px;
}

.world-info {
  display: grid;
  gap: 8px;
}

.world-info button {
  margin-top: 0;
}

.world-info > button {
  width: 100%;
}

.compass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.compass span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.compass strong {
  display: block;
  margin-top: 2px;
}

.compass button {
  width: auto;
  min-width: 130px;
  padding: 0 10px;
}

.controls {
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 9px 12px;
  border-radius: 8px;
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.minimap {
  left: 18px;
  bottom: 18px;
  width: 238px;
  padding: 8px;
  border-radius: 14px;
}

#miniMap {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 10px;
  background: #1f2937;
}

.turn-cue {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #0f172a;
  background: #fef08a;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

kbd {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #0f172a;
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
}

#message {
  position: fixed;
  z-index: 11;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 36px));
  padding: 18px;
  border-radius: 8px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

#message.show {
  opacity: 1;
}

@media (max-width: 820px) {
  .hud-left,
  .hud-right {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .hud-right {
    top: auto;
    bottom: 76px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls {
    max-width: calc(100vw - 24px);
    overflow: hidden;
  }

  .minimap {
    left: 12px;
    bottom: 12px;
    width: 170px;
  }

  #miniMap {
    width: 154px;
    height: 154px;
  }

  #message {
    top: 12px;
  }
}
