@font-face {
  font-family: "KabelFace";
  src: url("../assets/fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

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

html, body, #app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: "KabelFace", "Arial Black", sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

#app { position: relative; }

#video-layer,
#world-layer,
#glitch-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#world-layer { z-index: 2; }
#glitch-layer { z-index: 8; pointer-events: none; }
#video-layer { z-index: 0; }

#hud {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

#rec {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E41E25;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

#counter {
  font-size: 13px;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  font-weight: 900;
}

#logo {
  position: absolute;
  left: 50%;
  bottom: 6.8%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  height: calc(min(92vw, 560px) * 0.25);
  z-index: 4;
  opacity: 0.5;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
  cursor: pointer;
}

#logo svg,
#logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#eq-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
}

#hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18%;
  z-index: 6;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.28em;
  opacity: 0.55;
  text-shadow: 0 2px 10px #000;
  animation: pulse 1.8s steps(2, end) infinite;
}

#gate { display: none; }
.hidden { display: none !important; }

@keyframes pulse {
  0% { opacity: 0.15; }
  100% { opacity: 0.7; }
}

@media (min-width: 900px) {
  #counter { font-size: 16px; }
}
