@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Spectral:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300,0,0");

html, body {
  margin: 0;
  height: 100%;
  background: #00020a;
  overflow: hidden;
}

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

.hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  font: 13px/1.4 "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  color: rgba(210, 230, 255, 0.83);
  background:
    linear-gradient(150deg, rgba(4, 10, 32, 0.82), rgba(2, 5, 20, 0.72)),
    radial-gradient(circle at 10% 20%, rgba(50, 100, 220, 0.12), transparent 45%);
  padding: 12px 13px;
  border: 0.5px solid rgba(90, 150, 255, 0.26);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: min(620px, calc(100vw - 28px));
  transition: width 260ms ease, padding 220ms ease, border-color 180ms ease;
}

.hud.is-collapsed {
  width: min(380px, calc(100vw - 28px));
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.hud-toggle {
  border: 0;
  background: transparent;
  color: rgba(190, 215, 255, 0.88);
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, background-color 150ms ease, transform 120ms ease;
}

.hud-toggle:hover {
  color: rgba(220, 240, 255, 0.98);
  background: rgba(20, 45, 110, 0.22);
}

.hud-toggle:active {
  transform: translateY(1px);
}

.hud-toggle.is-active {
  color: rgba(160, 200, 255, 1);
  background: rgba(20, 55, 130, 0.40);
}

.hud-toggle.is-recording {
  color: rgba(255, 100, 90, 1);
  background: rgba(100, 15, 10, 0.45);
  animation: rec-blink 1.6s ease-in-out infinite;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
  font-size: 20px;
  line-height: 1;
}

.hud .title {
  font-weight: 700;
  color: rgba(220, 240, 255, 0.97);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hud .description {
  margin-top: 10px;
  margin-bottom: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 150, 255, 0.18);
  font: 400 13px/1.46 "Spectral", "Iowan Old Style", serif;
  color: rgba(200, 222, 255, 0.86);
  max-height: 23em;
  opacity: 1;
  overflow: hidden;
  transition: max-height 220ms ease, opacity 180ms ease, margin 220ms ease, padding 220ms ease;
}

.hud .description a {
  color: inherit;
  text-decoration: none;
  font-weight: 400;
}

.hud .description a:hover,
.hud .description a:focus-visible {
  color: rgba(230, 245, 255, 0.98);
  font-weight: 600;
}

.hud .description a:active {
  color: rgba(255, 255, 255, 1);
}

.hud.is-collapsed .description {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 2px;
  padding-top: 0;
  border-top-color: transparent;
  opacity: 0;
}

.hud b {
  color: rgba(230, 245, 255, 0.96);
  font-weight: 400;
}

.dim { color: rgba(140, 175, 230, 0.65); }

#stats {
  font-size: 12px;
  line-height: 1.36;
}

@media (max-width: 560px) {
  .hud {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .hud.is-collapsed {
    width: auto;
  }

  .hud .description {
    font-size: 12px;
    line-height: 1.42;
  }

  #stats {
    font-size: 11px;
    line-height: 1.32;
  }
}
