#pano {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #05090e;
}

.game-shade {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 13, 0.62), transparent 22%, transparent 62%, rgba(2, 8, 13, 0.42)),
    radial-gradient(circle at 0% 0%, rgba(29, 233, 182, 0.1), transparent 22rem);
}

.game-hud {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 14px;
  pointer-events: none;
}

.hud-left,
.hud-center,
.hud-right {
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
}

.hud-center {
  justify-content: center;
}

.hud-right {
  justify-content: flex-end;
}

.hud-pill,
.hud-card {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
}

.hud-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  font-weight: 900;
}

.hud-pill span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timer-pill {
  min-width: 122px;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}

.audio-toggle {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
}

.audio-toggle.active {
  color: #05100d;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--success));
  box-shadow: 0 14px 34px rgba(29, 233, 182, 0.2);
}

.timer-danger {
  color: var(--danger) !important;
  animation: timerPulse 0.75s infinite alternate;
}

@keyframes timerPulse {
  from {
    box-shadow: 0 0 0 rgba(255, 77, 94, 0);
  }

  to {
    box-shadow: 0 0 34px rgba(255, 77, 94, 0.42);
  }
}

#guess-map-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 420px;
  height: 342px;
  z-index: 20;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: width 200ms ease, height 200ms ease, transform 200ms ease, right 200ms ease, bottom 200ms ease, border-radius 200ms ease;
}

#guess-map-panel:hover {
  width: 520px;
  height: 405px;
}

#guess-map-panel.map-expanded,
#guess-map-panel.map-expanded:hover {
  right: 50%;
  bottom: 50%;
  width: min(1120px, calc(100vw - 52px));
  height: min(760px, calc(100vh - 116px));
  z-index: 82;
  transform: translate(50%, 50%);
  border-radius: 28px;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.72);
}

#guess-map {
  width: 100%;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  background: #0a1018;
}

#guess-map-panel:hover #guess-map {
  height: 320px;
}

#guess-map-panel.map-expanded #guess-map,
#guess-map-panel.map-expanded:hover #guess-map {
  height: calc(100% - 72px);
  border-radius: 20px;
}

.game-body.guess-map-open .game-shade {
  background:
    linear-gradient(180deg, rgba(2, 8, 13, 0.76), rgba(2, 8, 13, 0.38)),
    radial-gradient(circle at 50% 50%, rgba(29, 233, 182, 0.12), transparent 30rem);
}

.map-expand-button {
  position: absolute;
  inset: 10px 10px 72px;
  z-index: 4;
  display: grid;
  place-items: end center;
  padding: 0 0 18px;
  border: 0;
  color: var(--text);
  font-size: 0;
  font-weight: 1000;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.54));
  cursor: pointer;
}

.map-expand-button::after {
  content: "Open full map";
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(7, 16, 22, 0.84);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.4);
}

#guess-map-panel.map-expanded .map-expand-button {
  display: none;
}

.map-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-weight: 900;
  background: rgba(7, 16, 22, 0.86);
  cursor: pointer;
  display: none;
}

#guess-map-panel.map-expanded .map-close-button {
  display: inline-flex;
  align-items: center;
}

.map-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.map-actions .btn {
  min-height: 50px;
}

.game-back {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 21;
}

.round-intro,
.handoff {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: rgba(1, 5, 9, 0.66);
  backdrop-filter: blur(12px);
}

.round-intro-card,
.handoff-card {
  width: min(480px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.round-intro strong {
  display: block;
  color: var(--primary);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
}

.hint-panel {
  position: fixed;
  left: 24px;
  bottom: 88px;
  z-index: 20;
  width: min(360px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hint-panel p {
  margin: 0;
  line-height: 1.5;
}

#result-map {
  width: 100%;
  height: 360px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0a1018;
}

.duel-hud {
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
}

.hp-card {
  min-width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
}

.hp-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-weight: 900;
}

.hp-value {
  color: var(--primary);
}

.hp-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.hp-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), var(--primary));
  transition: width 450ms ease;
}

.hp-fill.danger-zone {
  background: linear-gradient(90deg, var(--danger), var(--warning));
}

.duel-status {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%);
  min-width: min(560px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  color: var(--text);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.damage-pop {
  display: inline-block;
  color: var(--danger);
  font-weight: 1000;
  animation: damagePop 520ms ease both;
}

@keyframes damagePop {
  0% {
    transform: scale(0.72);
    opacity: 0;
  }

  55% {
    transform: scale(1.18);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}
