html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #37393e;
}

body.game-started {
  padding: 0;
}

body.game-started #myTest,
body.game-started #myCanvas {
  margin: 0;
}

#rmLandingOverlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.86)),
    url("/spritedata/loadscreen.png") center center / cover no-repeat;
  color: #ffffff;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
}

#rmLandingOverlay[hidden] {
  display: none;
}

.rm-landing-card {
  width: min(900px, 95vw);
  padding: 34px 28px;
  border: 3px solid #40e0d0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #111111;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
}

.rm-landing-card img {
  width: 80%;
  max-width: 520px;
  height: auto;
  margin-bottom: 14px;
}

.rm-landing-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: 1px;
}

.rm-landing-card p {
  max-width: 760px;
  margin: 10px auto 24px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.rm-landing-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.rm-play-button,
.rm-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #000000;
  border-radius: 12px;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease;
}

.rm-play-button {
  padding: 24px 72px;
  background: #40e0d0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 1px;
}

.rm-info-button {
  padding: 18px 34px;
  font-size: 22px;
}

.rm-play-button:hover,
.rm-info-button:hover {
  color: #176d66;
  transform: scale(1.04);
}

#rmGameMenuButton {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 999998;
  display: none;
  padding: 10px 15px;
  border: 2px solid #000000;
  border-radius: 8px;
  background: rgba(64, 224, 208, 0.94);
  color: #000000;
  font: 700 14px Arial, sans-serif;
  cursor: pointer;
}

body.game-started #rmGameMenuButton {
  display: block;
}

#rmGameMenuPanel {
  position: fixed;
  right: 14px;
  bottom: 58px;
  z-index: 999998;
  display: none;
  width: 240px;
  padding: 10px;
  border: 2px solid #40e0d0;
  border-radius: 10px;
  background: rgba(31, 33, 38, 0.96);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
  font-family: Arial, sans-serif;
}

#rmGameMenuPanel.open {
  display: block;
}

.rm-menu-title {
  margin: 8px 0 5px;
  color: #40e0d0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.rm-menu-action {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 9px 10px;
  border: 1px solid #000000;
  border-radius: 6px;
  background: #ffffff;
  color: #000000;
  text-align: left;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.rm-menu-action:hover {
  background: #40e0d0;
}

#rmMobileKeyboardInput {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 999997;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0.01;
}

#chatBox {
  top: 20px;
  left: 20px;
  width: 480px;
  height: 64px;
  display: none;
}

#myCanvas {
  cursor: none;
  z-index: -1;
  background: #27292e url("/spritedata/loadscreen.png");
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

@media (max-width: 768px) {
  .rm-landing-card {
    padding: 26px 16px;
  }

  .rm-play-button,
  .rm-info-button {
    width: 100%;
  }

  #rmGameMenuPanel {
    right: 10px;
    left: 10px;
    bottom: 60px;
    width: auto;
  }
}
