:root {
  --text-main: #f0f0f0;
  --text-soft: #c5c5c5;
  --panel: rgba(8, 8, 10, 0.35);
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "UnifrakturCook", cursive;
  color: var(--text-main);
  background: #000;
  overflow: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: saturate(0.58) contrast(1.06) brightness(0.36) blur(2.4px);
  transition: opacity 2200ms ease, filter 2600ms ease;
}

body.entered .bg-video {
  opacity: 1;
  filter: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 24%),
    radial-gradient(circle at center, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.88) 74%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.9));
  backdrop-filter: blur(3.3px);
  transition: opacity 2400ms ease;
}

body.entered .overlay {
  opacity: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(92vw, 360px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.35rem;
  padding-top: clamp(72px, 13vh, 132px);
}

.username {
  position: relative;
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.2rem, 2.3vw, 1.7rem);
  font-weight: 700;
  color: #f7f7f7;
  letter-spacing: 0.03em;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.72),
    0 0 8px rgba(255, 255, 255, 0.24);
  line-height: 1;
  animation: cctv-flicker 3.2s steps(1, end) infinite;
}

.start-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.start-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-gate-title {
  margin: 0;
  font-family: inherit;
  color: #f4f4f4;
  transform: translateY(-4vh);
  font-size: clamp(0.52rem, 0.95vw, 0.64rem);
  letter-spacing: 0.18em;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

body.pre-enter .hero,
body.pre-enter .view-counter {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
}

body.entered .hero,
body.entered .view-counter {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: ui-pop-in 300ms ease-out;
}

.typed-description {
  min-height: 1.45em;
  margin: 0;
  font-family: inherit;
  font-size: clamp(0.78rem, 1.5vw, 0.98rem);
  color: #d5d5d5;
  opacity: 0.92;
  letter-spacing: 0.045em;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.12);
}

.typed-description::after {
  content: "_";
  margin-left: 0.2rem;
  opacity: 0.72;
  animation: blink 0.8s infinite;
}

.typed-description .desc-link {
  position: relative;
  font-family: inherit;
  color: #e7f4ff;
  font-weight: 700;
  text-decoration: none;
  text-shadow:
    0 0 4px rgba(160, 212, 255, 0.9),
    0 0 12px rgba(120, 196, 255, 0.65);
  animation: desc-link-flicker 1.8s steps(1, end) infinite;
}

.typed-description .desc-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(100, 190, 255, 0), rgba(175, 225, 255, 0.95), rgba(100, 190, 255, 0));
  animation: desc-link-scan 1.2s linear infinite;
}

.typed-description .desc-link:hover,
.typed-description .desc-link:focus-visible {
  color: #f5fbff;
  filter: brightness(1.1);
}

.typed-description .desc-link:focus-visible {
  outline: 1px solid rgba(190, 230, 255, 0.85);
  outline-offset: 3px;
  border-radius: 3px;
}

.rotating-wrap {
  margin-top: 0.22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.82rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.rot-link:hover,
.rot-link:focus-visible {
  transform: translateY(-1px) scale(1.07);
  filter: brightness(1.12);
}

.rot-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
}

.rotating {
  width: clamp(26px, 3.2vw, 38px);
  height: auto;
  display: block;
  user-select: none;
  pointer-events: auto;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.rotating-left {
  animation: none;
}

.rotating-right {
  animation: none;
}

.view-counter {
  position: fixed;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f2f2f2;
  font-family: inherit;
  font-size: 0.78rem;
  opacity: 0.88;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.85);
}

.eye-icon {
  width: 12px;
  height: 12px;
  fill: #f4f4f4;
  opacity: 0.82;
}

@keyframes spin-left {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-right {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes cctv-flicker {
  0%,
  100% {
    opacity: 1;
    filter: contrast(1.06) brightness(1.02);
  }

  8% {
    opacity: 0.95;
  }

  12% {
    opacity: 0.82;
    filter: contrast(1.16) brightness(1.07);
  }

  13% {
    opacity: 1;
  }

  49% {
    opacity: 0.96;
  }

  50% {
    opacity: 0.84;
    filter: contrast(1.2) brightness(1.1);
  }

  52% {
    opacity: 1;
  }
}

@keyframes desc-link-scan {
  0% {
    transform: translateX(-12%);
    opacity: 0.45;
  }

  50% {
    transform: translateX(10%);
    opacity: 1;
  }

  100% {
    transform: translateX(-12%);
    opacity: 0.45;
  }
}

@keyframes desc-link-flicker {
  0%,
  100% {
    opacity: 1;
  }

  12% {
    opacity: 0.84;
  }

  13% {
    opacity: 1;
  }

  56% {
    opacity: 0.88;
  }

  57% {
    opacity: 1;
  }
}

@keyframes ui-pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .hero {
    width: min(94vw, 300px);
    padding-top: 88px;
  }

  .rotating-wrap {
    gap: 0.7rem;
  }

  .view-counter {
    left: 10px;
    bottom: 10px;
  }
}
