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

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}

.hidden {
  display: none !important;
}

.start-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 40px));
  padding: 22px;
  background: rgba(17, 28, 41, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.start-panel h1 {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1;
}

.player-name-line {
  margin: 0 0 14px;
  color: #b9d5e8;
  font-size: 14px;
}

.player-name-line strong {
  color: #fff;
}

.player-name-line a {
  margin-left: 4px;
  color: #cfefff;
  text-decoration: none;
  white-space: nowrap;
}

.lobby-status {
  min-height: 20px;
  margin: 0 0 12px;
  color: #d8ecf8;
  font-size: 14px;
  line-height: 1.4;
}

.start-panel button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: #60d16d;
  color: #122016;
  font-weight: 800;
  cursor: pointer;
}

.start-panel a {
  display: inline-block;
  margin-top: 14px;
  color: #cfefff;
  text-decoration: none;
  font-size: 14px;
}

.hud {
  pointer-events: none;
}

.esc-hint {
  position: fixed;
  left: 18px;
  top: 14px;
  margin: 0;
  padding: 7px 10px;
  background: rgba(10, 15, 23, 0.62);
  border-radius: 6px;
  color: #d8ecf8;
  font-size: 13px;
  font-weight: 800;
}

.size-readout {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  min-width: 180px;
  padding: 10px 18px;
  background: rgba(8, 12, 18, 0.68);
  border-radius: 6px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.stamina {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  width: min(220px, calc(100vw - 48px));
  height: 8px;
  overflow: hidden;
  background: rgba(8, 12, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.stamina-fill {
  width: 100%;
  height: 100%;
  background: #60d16d;
  transition: width 100ms linear, background 160ms ease, opacity 160ms ease;
}

.stamina.stamina-locked .stamina-fill {
  background: #f0b84c;
  opacity: 0.68;
}

.wallet {
  position: fixed;
  right: 18px;
  top: 16px;
  padding: 8px 12px;
  background: rgba(8, 12, 18, 0.66);
  border-radius: 6px;
  font-weight: 700;
}

.leaderboard {
  position: fixed;
  right: 18px;
  top: 58px;
  width: 250px;
  padding: 12px;
  background: rgba(8, 12, 18, 0.66);
  border-radius: 8px;
}

.leaderboard-title {
  margin-bottom: 8px;
  color: #b9d5e8;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.leaderboard ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
}

.pause-menu {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 14, 0.54);
  pointer-events: auto;
}

.gl-pause-card {
  width: min(420px, calc(100vw - 40px));
  padding: 22px;
  background: rgba(17, 28, 41, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.gl-pause-card h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1;
}

.pause-controls {
  margin: 0 0 18px;
  color: #b9d5e8;
  font-size: 14px;
  line-height: 1.45;
}

.gl-pause-actions {
  display: flex;
  gap: 10px;
}

.gl-btn {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #60d16d;
  color: #122016;
  font-weight: 800;
  cursor: pointer;
}

.gl-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #eaf6ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.eat-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(117, 16, 23, 0.22);
  color: #fff;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.8);
  font-size: 44px;
  font-weight: 900;
}

.eat-overlay strong {
  display: block;
  margin-top: 8px;
  font-size: 86px;
}

@media (max-width: 700px) {
  .leaderboard {
    width: 190px;
    right: 10px;
  }

  .size-readout {
    font-size: 20px;
  }

  .eat-overlay {
    font-size: 32px;
  }

  .gl-pause-actions {
    flex-direction: column;
  }
}
