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

body {
  background: #000;
  color: #ffffff;
  font-family: "VT323", monospace;
  font-size: 24px;
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#play-btn-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
#play-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: "VT323", monospace;
  font-size: 24px;
  text-align: center;
  cursor: default;
  animation: revealTextFast 1.5s forwards;
  display: inline-block;
  position: relative;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes revealTextFast {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes revealText {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes revealTriangle {
  0% {
    clip-path: inset(0 0 100% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes spin {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  20% {
    opacity: 0.2;
  }
  40%,
  60% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0.2;
  }
}

#player-container {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 640px;
  height: 360px;
  opacity: 0;
  visibility: hidden;
  z-index: -1;
}

#status {
  position: fixed;
  top: 20px;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 80%;
  text-align: center;
  color: #ffffff;
  font-family: "VT323", monospace;
  font-size: 30px;
  text-shadow: 0 0 10px #ffffff;
  animation: flicker 3s infinite ease-in-out;
  white-space: normal;
  overflow-wrap: break-word;
  display: none;
  z-index: 3;
}
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
  }
}

#volume-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
  background-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  outline: none;
  display: none;
  animation: fadeIn 1s forwards 6s;
  z-index: 4;
  background-image: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8"?><svg fill="%23ffffff" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H15V3H16V4H17V5H18V6H19V8H20V14H19V16H18V17H17V18H16V19H15V20H13V18H14V17H15V16H16V15H17V13H18V9H17V7H16V6H15V5H14V4H13V2M14 7V8H15V10H16V12H15V14H14V15H13V7H14M2 8H6V7H7V6H8V5H9V4H10V3H11V19H10V18H9V17H8V16H7V15H6V14H2V8M4 10V12H7V13H8V14H9V8H8V9H7V10H4Z"/></svg>');
  filter: drop-shadow(0 0 5px #ffffff);
}
#volume-toggle[style*="display: block"] {
  display: block !important;
}

#share-x {
  position: fixed;
  top: 20px;
  right: 20px;
  display: none;
  width: 16px;
  height: 16px;
  cursor: pointer;
  animation: fadeIn 1s forwards 6s;
  z-index: 4;
}
#share-x svg {
  filter: drop-shadow(0 0 5px #ffffff);
}
#share-x:hover svg {
  filter: drop-shadow(0 0 8px #ffffff);
}

.prev-btn,
.next-btn {
  width: 54px;
  height: 54px;
  background-size: cover;
  border: none;
  cursor: pointer;
  background-color: transparent;
}
.prev-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 8L12 14V2Z" fill="%23ffffff"/><path d="M8 2L2 8L8 14V2Z" fill="%23ffffff"/></svg>');
}
.next-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 2L14 8L4 14V2Z" fill="%23ffffff"/><path d="M8 2L14 8L8 14V2Z" fill="%23ffffff"/></svg>');
}
.random-btn,
.fullscreen-btn {
  width: 25px;
  height: 25px;
  background-size: cover;
  border: none;
  cursor: pointer;
  background-color: transparent;
}
.random-btn {
  background-image: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 1H12V3H10.5858L7 6.58579L3.41421 3H0V5H2.58579L5.58579 8L2.58579 11H0V13H3.41421L11.4142 5H12V7H13L16 4L13 1Z" fill="%23ffffff"/><path d="M12 9H13L16 12L13 15H12V13H10.5858L8.41421 10.8284L9.82843 9.41421L11.4142 11H12V9Z" fill="%23ffffff"/></svg>');
}
.fullscreen-btn {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4-8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7-9.5 8.9-8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1 3.1 3.1-8.2 0-11.3l-42.4-42.4z"/></svg>');
}
.play-pause-btn {
  width: 108px;
  height: 108px;
  background-size: cover;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

#control-buttons {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

#volume-container {
  position: fixed;
  top: 54px;
  left: 20px;
  display: none;
  z-index: 10;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6),
    inset 0 0 6px rgba(255, 255, 255, 0.2);
  padding: 10px 12px;
  border-radius: 0;
  min-width: 64px;
  pointer-events: auto;
}

#vol-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.vol-track {
  position: relative;
  width: 8px;
  height: 160px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.35);
}
.vol-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.vol-thumb {
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  border: none;
  border-radius: 0;
  image-rendering: pixelated;
  transform: translate(-50%, -7px);
  outline: none;
  cursor: pointer;
}
.vol-thumb:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.vol-readout {
  font-size: 14px;
  color: #ffffff;
  opacity: 0.8;
}

#loading-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: none;
}
#loading {
  position: relative;
  width: 64px;
  height: 64px;
  animation: spin 1.5s linear infinite;
}
#loading span {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  image-rendering: pixelated;
  top: 50%;
  left: 50%;
  transform-origin: center;
  animation: pulse 1.5s ease-in-out infinite;
}
#loading span:nth-child(1) {
  transform: rotate(0deg) translate(28px);
  animation-delay: 0s;
}
#loading span:nth-child(2) {
  transform: rotate(45deg) translate(28px);
  animation-delay: 0.2s;
}
#loading span:nth-child(3) {
  transform: rotate(90deg) translate(28px);
  animation-delay: 0.4s;
}
#loading span:nth-child(4) {
  transform: rotate(135deg) translate(28px);
  animation-delay: 0.6s;
}
#loading span:nth-child(5) {
  transform: rotate(180deg) translate(28px);
  animation-delay: 0.8s;
}
#loading span:nth-child(6) {
  transform: rotate(225deg) translate(28px);
  animation-delay: 1s;
}
#loading span:nth-child(7) {
  transform: rotate(270deg) translate(28px);
  animation-delay: 1.2s;
}
#loading span:nth-child(8) {
  transform: rotate(315deg) translate(28px);
  animation-delay: 1.4s;
}

#video-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: fill;
  z-index: 0;
  display: none;
  transform: scale(0);
  transform-origin: center center;
}
@keyframes expand {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.2) 0px,
      rgba(0, 0, 0, 0.2) 1px,
      rgba(0, 0, 0, 0) 3px,
      rgba(0, 0, 0, 0) 4px
    ),
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.35) 100%
    );
  mix-blend-mode: normal;
  animation: crt-scan-move 6s linear infinite,
    crt-flicker 2.2s steps(2, end) infinite;
  will-change: background-position, opacity;
}

#crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  animation: crt-beam 5.5s linear infinite;
}

#crt-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      to right,
      rgba(0, 255, 0, 0.03),
      rgba(0, 255, 0, 0) 33%
    ),
    linear-gradient(to right, rgba(255, 0, 0, 0.03), rgba(255, 0, 0, 0) 66%),
    linear-gradient(to right, rgba(0, 0, 255, 0.03), rgba(0, 0, 255, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: crt-flicker 3s steps(3, end) infinite;
}

@keyframes crt-scan-move {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 100%, 0 0;
  }
}
@keyframes crt-flicker {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 0.8;
  }
}
@keyframes crt-beam {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  10% {
    opacity: 0.08;
    transform: translateY(-50%);
  }
  50% {
    opacity: 0;
    transform: translateY(0%);
  }
  100% {
    opacity: 0;
    transform: translateY(100%);
  }
}

#station-panel-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  display: none;
}
#station-toggle {
  width: 0;
  height: 0;
  border-bottom: 30px solid #ffffff;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  margin: 0 auto;
  cursor: pointer;
  image-rendering: pixelated;
}
#station-panel {
  display: none;
  background: rgba(0, 255, 255, 0.1);
  border-top: 2px solid #ffffff;
  gap: 10px;
  padding: 10px 20px;
  box-sizing: border-box;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  align-items: center;
  place-content: center;
  justify-content: center;
  align-content: center;
}
#station-panel.open {
  display: grid;
}

.station-btn {
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: "VT323", monospace;
  font-size: 18px;
  padding: 10px;
  margin: 5px;
  cursor: pointer;
  text-shadow: 0 0 5px #ffffff;
  image-rendering: pixelated;
  width: 100%;
  max-width: 200px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}
.station-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
  #play-btn {
    font-size: 20px;
  }
  #status {
    font-size: 27px;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  .prev-btn,
  .next-btn {
    width: 42px;
    height: 42px;
  }
  .random-btn,
  .fullscreen-btn {
    width: 20px;
    height: 20px;
  }
  .play-pause-btn {
    width: 84px;
    height: 84px;
  }
  #volume-toggle {
    width: 21px;
    height: 21px;
  }
  #share-x {
    width: 14px;
    height: 14px;
  }
  #volume-container {
    top: 51px;
    left: 20px;
    padding: 12px 14px;
    min-width: 64px;
  }
  .vol-track {
    height: 180px;
  }
  #control-buttons {
    gap: 15px;
  }
}
