:root {
  --bg-0: #06141f;
  --bg-1: #0b2535;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  font-family: "Cinzel Decorative", serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 127, 62, 0.2) 0%, rgba(255, 127, 62, 0) 40%),
    radial-gradient(circle at 85% 80%, rgba(58, 214, 196, 0.16) 0%, rgba(58, 214, 196, 0) 45%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1));
}

.hud,
.hud * {
  font-family: "Cinzel Decorative", serif !important;
}

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

.sound-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(190, 232, 255, 0.45);
  background: rgba(10, 24, 35, 0.45);
  color: rgba(233, 249, 255, 0.95);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-family: "Cinzel Decorative", serif;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.sound-toggle:hover {
  background: rgba(16, 34, 48, 0.62);
}

.sound-toggle:active {
  transform: scale(0.95);
}

.sound-toggle.is-muted {
  background: rgba(43, 23, 26, 0.46);
  border-color: rgba(255, 196, 196, 0.45);
  color: rgba(255, 220, 220, 0.96);
}

.corner-logo {
  position: fixed;
  top: 16px;
  left: 72px;
  z-index: 4;
  height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: rgba(237, 250, 255, 0.92);
  font-family: "Cinzel Decorative", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.hud-hidden .corner-logo {
  opacity: 1;
  transform: translateX(0);
}

.hud {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(92vw, 360px);
  height: fit-content;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(184, 231, 255, 0.28);
  background: rgba(4, 12, 20, 0.5);
  backdrop-filter: blur(10px);
  color: rgba(234, 244, 255, 0.95);
  font-family: "Cinzel Decorative", serif;
  font-size: 14px;
  text-align: center;
  pointer-events: auto;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hud.is-hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.hud-tip {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(228, 248, 255, 0.96);
  text-transform: uppercase;
}

.hud-logo {
  margin: 0;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: rgba(245, 250, 255, 0.97);
  text-shadow: 0 2px 10px rgba(106, 198, 255, 0.2);
}

.hud-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  pointer-events: auto;
  cursor: pointer;
  letter-spacing: 0.04em;
  color: rgba(226, 246, 255, 0.95);
}

.hud-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  pointer-events: auto;
}

.hud-check {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(200, 240, 255, 0.55);
  background: rgba(198, 236, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hud-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 2px solid rgba(232, 249, 255, 0.95);
  border-bottom: 2px solid rgba(232, 249, 255, 0.95);
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.hud-toggle input:checked + .hud-check::after {
  transform: rotate(45deg) scale(1);
}

.hud-toggle-text {
  font-size: 13px;
  text-transform: uppercase;
}
