@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap");

:root {
  --accent: #ffffff;
  --accent-soft: rgba(0, 0, 0, 0.88);
  --accent-glow: rgba(255, 255, 255, 0.56);
  --title-glow: 0px;
  --title-glow-strong: 0px;
  --title-brightness: 1;
  --glass: rgba(16, 16, 16, 0.74);
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #000;
  color: #fff;
  cursor: none;
  font-family: "VT323", monospace;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease, visibility 0.9s ease, transform 0.9s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.35);
}

.preloader-circle {
  width: 60px;
  height: 60px;
  border: 6px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
}

.wrapper {
  min-height: 100vh;
}

.background video {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transform: translateZ(0);
}

.background::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  pointer-events: none;
}

.container,
.page-wrapper {
  width: 100%;
  min-height: 100vh;
}

.page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transform: translateY(-8vh);
}

.page-info {
  width: min(100%, 1180px);
  text-align: center;
}

.page-info-play {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--accent);
  line-height: 0.82;
  text-shadow: 3px 3px 0 var(--accent-soft);
  cursor: pointer;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
  animation: playFloat 0.95s ease-in-out infinite alternate;
}

.enter-main {
  font-size: clamp(70px, 13vw, 158px);
}

.enter-sub {
  font: 500 clamp(13px, 2vw, 18px) Arial, sans-serif;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.82);
}

.page-info-play:hover {
  transform: translateY(-4px) scale(1.02);
}

.page-info-play.is-playing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-16px) scale(0.86);
}

.page-info-title {
  color: var(--accent);
  font-size: clamp(72px, 14vw, 170px);
  line-height: 0.84;
  min-height: 0.9em;
  text-shadow:
    3px 3px 0 var(--accent-soft),
    0 0 var(--title-glow) var(--accent-glow),
    0 0 var(--title-glow-strong) var(--accent-glow);
  filter: brightness(var(--title-brightness));
  opacity: 0;
  visibility: hidden;
  transform: scale(0.2);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    visibility 0.32s ease,
    filter 0.12s ease,
    text-shadow 0.12s ease;
}

.page-info-title.title-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.page-info-social {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 30px;
  opacity: 0;
  visibility: hidden;
  transform: rotateY(38deg) translateY(90px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s ease;
}

.page-info-social.social-visible {
  opacity: 1;
  visibility: visible;
  transform: rotateY(0deg) translateY(0);
}

.page-info-social-item {
  color: var(--accent);
  font-size: clamp(34px, 5vw, 52px);
  text-decoration: none;
  text-shadow: 3px 3px 0 var(--accent-soft);
  transition: color 0.24s ease, transform 0.24s ease, text-shadow 0.24s ease;
}

.page-info-social-item:hover {
  color: var(--accent);
  text-shadow:
    3px 3px 0 #000,
    0 0 18px var(--accent-glow);
  transform: translateY(-6px);
}

.page-copyright {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 4;
  color: var(--accent);
  font-size: 20px;
  text-shadow: 2px 2px 0 var(--accent-soft);
}

.volume-control {
  position: fixed;
  top: 25px;
  left: 25px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: var(--glass);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity 0.36s ease, transform 0.36s ease;
}

.volume-control.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.volume-control.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.hide-interface-button,
.theme-button {
  position: fixed;
  top: 25px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: var(--glass);
  color: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  opacity: 0;
  transform: translateY(-20px);
  cursor: pointer;
  transition: opacity 0.36s ease, transform 0.36s ease, border-color 0.24s ease;
}

.hide-interface-button {
  right: 25px;
}

.theme-button {
  top: auto;
  right: 25px;
  bottom: 25px;
}

.hide-interface-button i,
.theme-button i {
  width: auto;
  font-size: 17px;
  text-align: center;
  color: var(--accent);
  text-shadow: 2px 2px 0 #000;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.hide-interface-button.visible,
.theme-button.visible {
  opacity: 1;
  transform: translateY(0);
}

.hide-interface-button.hidden,
.theme-button.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.hide-interface-button:hover,
.theme-button:hover {
  border-color: rgba(255, 255, 255, 0.38);
}

.volume-icon {
  width: 16px;
  min-width: 16px;
  font-size: 16px;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

#volume-slider-container {
  position: relative;
  width: 140px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  touch-action: none;
}

#volume-slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 70%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #bdbdbd);
  box-shadow: 0 0 13px var(--accent-glow);
}

#volume-slider-handle {
  position: absolute;
  top: 50%;
  left: 70%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.18s ease;
}

#volume-slider-container:hover #volume-slider-handle {
  transform: translate(-50%, -50%) scale(1.18);
}

.presentation-mode .page-info,
.presentation-mode .volume-control,
.presentation-mode .theme-button,
.presentation-mode .audio-visualizer,
.presentation-mode .page-copyright {
  opacity: 0 !important;
  pointer-events: none !important;
}

.presentation-mode .hide-interface-button {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.audio-visualizer {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 12;
  display: flex;
  align-items: end;
  gap: 5px;
  height: 54px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.36s ease, transform 0.36s ease;
}

.audio-visualizer.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.audio-visualizer.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
}

.audio-visualizer span {
  width: 5px;
  height: 12px;
  min-height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transform-origin: bottom;
}

.cursor-dot,
.cursor-ring,
.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 22px var(--accent-glow);
}

.cursor-trail {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.title-flicker {
  animation: titleFlicker 0.56s steps(1, end);
}

.title-sliced {
  filter: drop-shadow(5px 0 0 rgba(255, 255, 255, 0.24));
}

.title-blur {
  animation: titleBlur 0.52s ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes playFloat {
  to {
    transform: translateY(12px);
  }
}

@keyframes shiftGlow {
  0%,
  100% {
    box-shadow:
      0 0 16px rgba(255, 255, 255, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  50% {
    box-shadow:
      0 0 28px rgba(255, 255, 255, 0.54),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@keyframes titleFlicker {
  0%,
  12%,
  28%,
  45%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  14%,
  30% {
    opacity: 0.32;
    transform: scale(1.015) translateX(-3px);
  }

  47% {
    opacity: 0.68;
    transform: scale(0.99) translateX(4px);
  }
}

@keyframes titleBlur {
  0% {
    filter: blur(0);
    opacity: 1;
  }

  45% {
    filter: blur(6px);
    opacity: 0.74;
  }

  100% {
    filter: blur(0);
    opacity: 1;
  }
}

@media (max-width: 932px), (pointer: coarse) {
  body {
    cursor: auto;
  }

  .background video {
    object-fit: cover;
  }

  .cursor-dot,
  .cursor-ring,
  .cursor-trail {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-info-social {
    gap: 18px;
    margin-top: 24px;
  }

  .volume-control {
    top: 15px;
    left: 15px;
    padding: 10px 14px;
  }

  .hide-interface-button {
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
  }

  .theme-button {
    right: 15px;
    bottom: 15px;
    width: 42px;
    height: 42px;
  }

  #volume-slider-container {
    width: 100px;
  }
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 16px;
  }

  .page-info-social {
    gap: 15px;
  }

  .volume-control {
    padding: 8px 12px;
  }

  .hide-interface-button {
    width: 40px;
    height: 40px;
  }

  .theme-button {
    width: 40px;
    height: 40px;
  }

  #volume-slider-container {
    width: 84px;
  }
}
