html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #050810;
  font-family: "Courier New", monospace;
  color: #d8c89a;
}
canvas {
  display: block;
}

#topRight {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  gap: 4px;
}
#topRight button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #d8c89a;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#topRight button:hover {
  opacity: 1;
}
#topRight button.active {
  opacity: 1;
  color: #ffdd00;
}
#topRight button svg {
  display: block;
}

#muteBtn .icon-off {
  display: none;
}
#muteBtn.muted .icon-on {
  display: none;
}
#muteBtn.muted .icon-off {
  display: block;
}

#playPauseBtn .icon-play {
  display: none;
}
#playPauseBtn.paused .icon-pause {
  display: none;
}
#playPauseBtn.paused .icon-play {
  display: block;
}

#playOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at center,
    rgba(20, 40, 60, 0.85),
    rgba(5, 8, 16, 0.98)
  );
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: opacity 0.8s ease;
}
#playOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}
#playBtn {
  text-align: center;
}
#playBtn .pulse {
  width: 80px;
  height: 80px;
  border: 2px solid #e8d5a0;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  animation: pulse 1.6s ease-in-out infinite;
}
#playBtn .pulse::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 56%;
  transform: translate(-50%, -50%);
  border-left: 22px solid #e8d5a0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 213, 160, 0.4);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(232, 213, 160, 0);
  }
}
#status {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 60px));
  z-index: 50;
  color: #d8c89a;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  text-align: center;
}
#status.show {
  opacity: 0.7;
}

/* ---- debug timeline ---- */
#debug-timeline {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(60vw, 600px);
  pointer-events: none;
}
#debug-tl-track {
  height: 4px;
  background: rgba(255, 221, 0, 0.18);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  pointer-events: all;
}
#debug-tl-track:hover {
  background: rgba(255, 221, 0, 0.32);
}
#debug-tl-fill {
  height: 100%;
  background: #ffdd00;
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}
#debug-tl-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 10px;
  background: #ffdd00;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 4px rgba(255, 221, 0, 0.6);
}
#debug-tl-label {
  text-align: center;
  font-size: 9px;
  color: #ffdd00;
  letter-spacing: 0.3em;
  margin-top: 6px;
  opacity: 0.55;
  text-transform: uppercase;
}
