@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  font-family: Manrope, sans-serif;
  color: #eef4ec;
  background: #11251c;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  background: radial-gradient(
    circle at 50% 35%,
    #31543b 0%,
    #152d21 46%,
    #09150f 100%
  );
}
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: 22px 28px;
}
.panel {
  pointer-events: auto;
  border: 1px solid rgba(211, 230, 197, 0.18);
  border-radius: 12px;
  background: rgba(10, 25, 17, 0.76);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}
.topbar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 17px;
}
.brand {
  color: #dcebd4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}
.brand b {
  color: #b7d965;
}
.connection,
.login-status {
  color: #a5bc9a;
  font:
    11px "DM Mono",
    monospace;
}
.connection {
  margin-left: auto;
}
.connection::before {
  content: "●";
  color: #e3a44d;
  margin-right: 7px;
}
.login-status {
  opacity: 0.78;
}
.button {
  border: 1px solid #b7d965;
  border-radius: 6px;
  padding: 9px 13px;
  color: #162419;
  background: #b7d965;
  cursor: pointer;
  font:
    600 11px Manrope,
    sans-serif;
  text-decoration: none;
}
.button:hover {
  background: #d2ed8c;
}
.button.small {
  padding: 7px 11px;
}
.welcome {
  position: absolute;
  top: 112px;
  left: 28px;
  padding: 19px 21px;
  min-width: 285px;
}
.eyebrow {
  margin: 0 0 7px;
  color: #b7d965;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.18em;
}
h1 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.welcome p:not(.eyebrow) {
  color: #b2c4ad;
  font-size: 12px;
  margin: 7px 0 0;
}
.controls {
  border-top: 1px solid rgba(211, 230, 197, 0.12);
  margin-top: 15px;
  padding-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #9caf96;
  font:
    10px "DM Mono",
    monospace;
}
kbd {
  display: inline-block;
  min-width: 54px;
  margin-right: 6px;
  padding: 3px 5px;
  border: 1px solid rgba(211, 230, 197, 0.26);
  border-radius: 4px;
  color: #d7e8ca;
  text-align: center;
  font:
    10px "DM Mono",
    monospace;
}
.worlds {
  position: absolute;
  top: 112px;
  right: 28px;
  width: 236px;
  padding: 16px;
}
.status-card {
  position: absolute;
  right: 28px;
  bottom: 53px;
  width: 236px;
  padding: 16px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  color: #9bb893;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.13em;
}
.panel-title i {
  color: #b7d965;
  font-style: normal;
}
select,
input {
  width: 100%;
  border: 1px solid rgba(211, 230, 197, 0.2);
  border-radius: 6px;
  padding: 9px 10px;
  color: #dcebd4;
  background: rgba(0, 0, 0, 0.2);
  outline: none;
  font:
    11px Manrope,
    sans-serif;
}
select:focus,
input:focus {
  border-color: #b7d965;
}
.world-form {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.world-form input {
  min-width: 0;
}
.world-form .button {
  padding: 8px 10px;
}
.hint {
  color: #789076;
  font:
    10px "DM Mono",
    monospace;
  line-height: 1.5;
  margin: 12px 0 0;
}
.stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(211, 230, 197, 0.1);
  color: #829a82;
  font:
    10px "DM Mono",
    monospace;
}
.stat b {
  color: #d3e5c9;
  font-weight: 500;
}
.boss-bar {
  height: 5px;
  border-radius: 5px;
  margin-top: 13px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.boss-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #b7d965, #e9b45b);
  transition: width 120ms linear;
}
.player-health {
  position: absolute;
  left: 50%;
  pointer-events: none;
  bottom: 68px;
  display: grid;
  gap: 9px;
  width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  transform: translateX(-50%);
}
.player-health[hidden] {
  display: none;
}
.player-health-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9bb893;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.13em;
}
.player-health-heading b {
  color: #d3e5c9;
  font-weight: 500;
  letter-spacing: normal;
}
.player-health-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}
.player-health-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b7d965, #e9b45b);
  transition: width 120ms linear;
}
.player-health-state {
  color: #f0a76d;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.14em;
}
.footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  color: rgba(215, 232, 202, 0.48);
  text-align: center;
  font:
    10px "DM Mono",
    monospace;
  letter-spacing: 0.05em;
}
.footer span {
  color: #b7d965;
  padding: 0 7px;
}
@media (min-width: 681px) and (max-width: 1024px) {
  .player-health {
    bottom: 250px;
  }
}
@media (min-width: 681px) and (max-width: 1024px) and (max-height: 665px) {
  .welcome {
    width: calc(50vw - 200px);
    min-width: 0;
  }
  .welcome .controls {
    display: none;
  }
}
@media (min-width: 681px) and (max-width: 847px) and (max-height: 700px) {
  .player-health {
    width: min(320px, calc(100vw - 528px));
  }
}
@media (max-width: 680px) {
  .hud {
    padding: 12px;
  }
  .welcome {
    top: 80px;
    left: 12px;
    min-width: 0;
    width: calc(100% - 24px);
  }
  .worlds {
    display: none;
  }
  .status-card {
    right: 12px;
    bottom: 42px;
    width: 190px;
  }
  .player-health {
    bottom: 228px;
    width: min(320px, calc(100vw - 24px));
  }
  .login-status {
    display: none;
  }
  .footer {
    bottom: 12px;
    font-size: 8px;
  }
}
@media (min-width: 600px) and (max-width: 680px) and (max-height: 590px) {
  .welcome {
    width: calc(50vw - 176px);
  }
}
@media (max-width: 680px) and (max-height: 610px) {
  .welcome {
    padding: 16px 21px;
  }
  .welcome .eyebrow,
  .welcome .controls {
    display: none;
  }
}
@media (max-width: 680px) and (max-height: 480px) {
  .welcome {
    top: 68px;
    width: calc(100% - 24px);
    padding: 8px 12px;
  }
  .welcome h1 {
    display: none;
  }
  .welcome p:not(.eyebrow) {
    margin: 0;
  }
}
@media (max-width: 1024px) and (max-height: 410px) {
  .welcome .eyebrow,
  .welcome h1,
  .welcome .controls {
    display: none;
  }
  .welcome p:not(.eyebrow) {
    margin: 0;
  }
}
@media (max-width: 680px) and (max-height: 410px) {
  .welcome {
    top: 68px;
    width: calc(100% - 24px);
    padding: 8px 12px;
  }
  .player-health {
    left: 12px;
    bottom: 42px;
    transform: none;
    width: min(320px, calc(100vw - 230px));
  }
}
@media (max-width: 559px) and (max-height: 410px) {
  .status-card {
    display: none;
  }
  .player-health {
    left: 50%;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 24px));
  }
}
@media (min-width: 560px) and (max-width: 680px) and (max-height: 410px) {
  .player-health {
    left: 50%;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 404px));
  }
}
@media (min-width: 681px) and (max-width: 1024px) and (max-height: 410px) {
  .welcome {
    top: 78px;
    left: 28px;
    width: min(320px, calc(100vw - 320px));
    padding: 6px 12px;
  }
  .player-health {
    bottom: 42px;
    width: min(320px, calc(100vw - 528px));
  }
}
