body {
  margin: 0;
  overflow: hidden;
  background: #06203c;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

#title,
#shop,
#map,
#prompt,
#muteHint,
#openMap {
  position: fixed;
  z-index: 10;
}

#title,
#shop,
#map {
  background: #0c2238cc;
  border: 1px solid rgba(111, 207, 87, 0.28);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#title {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: min(88vw, 520px);
  padding: 40px 36px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(111, 207, 87, 0.12), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, rgba(244, 121, 31, 0.14), rgba(12, 34, 56, 0.88));
}

#title h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 0 24px rgba(111, 207, 87, 0.18),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

#title h1::before,
#title h1::after {
  display: inline-block;
  font-size: 0.8em;
}

#title h1::before {
  content: "▸ ";
  color: #6fcf57;
}

#title h1::after {
  content: " ◂";
  color: #f4791f;
}

.tag {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
}

.howto {
  margin: 4px 0 2px;
  max-width: 420px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.74);
}

.howto b {
  color: #6fcf57;
}

.loop {
  margin: 6px 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(244, 121, 31, 0.85);
}

button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(12, 34, 56, 0.7);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

button:hover {
  transform: translateY(-2px);
  background: rgba(21, 54, 85, 0.88);
  border-color: rgba(111, 207, 87, 0.45);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}

button:active {
  transform: translateY(0);
}

#play {
  min-width: 180px;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#shop,
#map {
  top: 24px;
  width: min(340px, calc(100vw - 32px));
  padding: 18px;
}

#shop {
  left: 24px;
}

#map {
  right: 24px;
}

#shop h2,
#map h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#shopStats {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.86);
}

#shopControls,
#spotList {
  display: grid;
  gap: 10px;
}

#shopControls button,
#spotList button,
#closeMap,
#openMap {
  padding: 11px 14px;
  text-align: left;
}

#dive,
#closeMap,
#openMap {
  text-align: center;
  font-weight: 700;
}

#dive {
  margin-top: 8px;
  border-color: rgba(111, 207, 87, 0.38);
}

#spotList button {
  width: 100%;
}

.disabled,
.locked {
  opacity: 0.45;
  cursor: default;
  background: rgba(110, 124, 138, 0.42);
  border-color: rgba(173, 181, 189, 0.26);
  box-shadow: none;
}

.disabled:hover,
.locked:hover {
  transform: none;
  background: rgba(110, 124, 138, 0.42);
  border-color: rgba(173, 181, 189, 0.26);
}

.locked::after {
  content: "  🔒";
}

#openMap {
  right: 24px;
  bottom: 24px;
  min-width: 132px;
}

#prompt {
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(12, 34, 56, 0.82);
  border: 1px solid rgba(244, 121, 31, 0.32);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  letter-spacing: 0.04em;
}

#muteHint {
  right: 24px;
  top: calc(100% - 58px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(4, 18, 32, 0.52);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  #shop,
  #map {
    top: 16px;
    width: min(100vw - 24px, 360px);
    padding: 16px;
  }

  #shop {
    left: 12px;
  }

  #map {
    right: 12px;
    top: auto;
    bottom: 84px;
  }

  #openMap,
  #muteHint {
    right: 12px;
  }

  #openMap {
    bottom: 12px;
  }

  #muteHint {
    top: 12px;
  }

  .tag {
    letter-spacing: 0.28em;
  }
}
