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

:root {
  color-scheme: dark;
}

[hidden] {
  display: none !important;
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes flicker {
  0% {
    opacity: 0.27861;
  }
  5% {
    opacity: 0.34769;
  }
  10% {
    opacity: 0.23604;
  }
  15% {
    opacity: 0.90626;
  }
  20% {
    opacity: 0.18128;
  }
  25% {
    opacity: 0.83891;
  }
  30% {
    opacity: 0.65583;
  }
  35% {
    opacity: 0.67807;
  }
  40% {
    opacity: 0.26559;
  }
  45% {
    opacity: 0.84693;
  }
  50% {
    opacity: 0.96019;
  }
  55% {
    opacity: 0.08594;
  }
  60% {
    opacity: 0.20313;
  }
  65% {
    opacity: 0.71988;
  }
  70% {
    opacity: 0.53455;
  }
  75% {
    opacity: 0.37288;
  }
  80% {
    opacity: 0.71428;
  }
  85% {
    opacity: 0.70419;
  }
  90% {
    opacity: 0.7003;
  }
  95% {
    opacity: 0.36108;
  }
  100% {
    opacity: 0.24387;
  }
}

.crt-screen::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
}

.crt-screen::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

.convex-curve {
  border-radius: 50% / 10%;
  position: relative;
  overflow: hidden;
}

.scanline-moving {
  width: 100%;
  height: 100px;
  z-index: 3;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.1;
  position: absolute;
  bottom: 100%;
  animation: scanline 10s linear infinite;
}

.text-glow {
  text-shadow: 0 0 5px rgba(52, 211, 153, 0.8), 0 0 10px rgba(52, 211, 153, 0.5);
}

.box-glow {
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.bezel-shadow {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.knob-shadow {
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5), inset -1px -1px 2px rgba(255, 255, 255, 0.1);
}

#overlay {
  opacity: 1 !important;
}

#overlay[hidden] {
  display: none !important;
}

.crt-off .crt-screen::before,
.crt-off .crt-screen::after,
.crt-off .scanline-moving {
  display: none;
}

.crt-off .toggle-dot {
  transform: translateX(-16px);
}

.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.leaderboard-list .rank {
  opacity: 0.7;
  font-size: 0.75rem;
}

.leaderboard-list .name {
  flex: 1;
  text-align: center;
}

.leaderboard-list .score {
  font-size: 1.1rem;
}
