* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  touch-action: none;
  cursor: grab;
}

html.dragging,
body.dragging {
  cursor: grabbing;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

#brand {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  color: #39ff6a;
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 300;
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1;
  letter-spacing: 0.08em;
  font-variant-numeric: slashed-zero;
  font-feature-settings: "zero" 1;
  text-shadow:
    0 0 1px #39ff6a,
    0 0 4px rgba(57, 255, 106, 0.9),
    0 0 10px rgba(57, 255, 106, 0.65);
}

#brand-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: cursorBlink 1s steps(1) infinite;
}

#brand-cursor[hidden] {
  display: none;
}

@keyframes cursorBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

#social {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 56px);
  pointer-events: none;
}

#social[hidden] {
  display: none;
}

#social:not([hidden]) {
  pointer-events: none;
}

.social-btn {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: clamp(64px, 12vw, 96px);
  height: clamp(64px, 12vw, 96px);
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(57, 255, 106, 0.18);
  color: #39ff6a;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 0 8px rgba(57, 255, 106, 0.55));
}

.social-btn svg {
  width: 58%;
  height: 58%;
  display: block;
  filter: drop-shadow(0 0 6px rgba(57, 255, 106, 0.85));
}

.social-btn:hover,
.social-btn:focus-visible {
  outline: none;
  transform: scale(1.06);
  border-color: rgba(57, 255, 106, 0.45);
  filter: drop-shadow(0 0 14px rgba(57, 255, 106, 0.8));
}

#term-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 10;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  padding: 0 clamp(12px, 4vw, 48px);
  pointer-events: none;
  opacity: 0;
  animation: termFadeIn 1.8s ease forwards;
  animation-delay: 0.9s;
}

#term-nav a,
#other-btn {
  pointer-events: auto;
  color: #000;
  font: 700 clamp(15px, 2.6vw, 28px) / 1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  /* red glow shaped to the glyphs */
  text-shadow:
    0 0 2px #ff1a1a,
    0 0 6px #ff0000,
    0 0 12px rgba(255, 0, 0, 0.95),
    0 0 22px rgba(255, 0, 0, 0.75),
    0 0 36px rgba(255, 40, 40, 0.45);
  filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.55));
  transition: text-shadow 0.15s ease, filter 0.15s ease;
}

#term-nav a:hover,
#term-nav a:focus-visible,
#other-btn:hover,
#other-btn:focus-visible {
  outline: none;
  text-shadow:
    0 0 2px #ff3b3b,
    0 0 8px #ff0000,
    0 0 16px rgba(255, 0, 0, 1),
    0 0 28px rgba(255, 0, 0, 0.85),
    0 0 44px rgba(255, 50, 50, 0.55);
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.7));
}

#other-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(72px, env(safe-area-inset-bottom, 0px) + 64px);
  z-index: 16;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#other-panel[hidden] {
  display: none;
}

#test-browser {
  pointer-events: auto;
  color: #39ff6a;
  font: 500 clamp(14px, 2.2vw, 20px) / 1.2 "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* text-only glow, no backdrop bloom */
  text-shadow:
    0 0 1px #39ff6a,
    0 0 4px rgba(57, 255, 106, 0.75),
    0 0 8px rgba(57, 255, 106, 0.4);
}

@keyframes termFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 520px) {
  #term-nav {
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 8px;
  }

  #term-nav a,
  #other-btn {
    font-size: clamp(11px, 3.2vw, 15px);
  }
}
