@font-face { 
  font-family: 'Depixel';
  src: url('public/depixel.woff2') format('woff2'),
       url('public/depixel.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  image-rendering: pixelated;
  margin: 0;
  height: 100vh;
  background: #000000;
  overflow: hidden;
  font-family: 'Depixel', sans-serif;
  position: relative;
}

.bgVid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.bgVid.show {
  opacity: 1;
  pointer-events: auto;
}

.audioControl {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#audioToggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #3a3a3a;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#ascii {
  font-family: monospace;
  font-size: 7px;
  line-height: 7px;
  color: white;
  white-space: pre;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
  text-align: left;
  transition: opacity 0.6s ease;
  opacity: 1;
}

#ascii.fade-out {
  opacity: 0;
  pointer-events: none;
}


#starField {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity 1s ease;
}

.ascii-star {
  position: absolute;
  color: white;
  font-family: monospace;
  font-size: 12px;
  opacity: 0.7;
  user-select: none;
  animation-name: twinkle, drift;
  animation-duration: 3s, 30s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  transition: transform 0.5s ease;
  animation-timing-function: ease-in-out;
  will-change: transform, opacity;
}

#volumeSlider {
  appearance: none;
  width: 100px;
  height: 6px;
  background: linear-gradient(to right, #7e7e7e, transparent);
  border-radius: 5px;
  outline: none;
  opacity: 0;
  transform: translateX(0);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-left: 36px;
}

#volumeSlider::-webkit-slider-thumb,
#volumeSlider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7e7e7e;
  cursor: pointer;
  border: none;
}

#volumeSlider.show {
  opacity: 1;
  transform: translateX(-20px);
  pointer-events: auto;
}

.menuPanel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 0.75rem;
  max-width: 300px;
  box-shadow: none;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.menuPanel.show {
  opacity: 1;
  pointer-events: all;
}

.closeBtn {
  margin-top: 0.4rem;
  align-self: center;
  background: none;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menuItem {
  margin: 0.4rem 0;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background-color: rgba(100, 100, 100, 0.2);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.menuItem:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: white;
}

.toggleVideo {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-family: 'Depixel', sans-serif;
  font-size: 16px;
  color: white;
  opacity: 0.7;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 999;
}

.toggleVideo:hover {
  transform: scale(1.1);
  opacity: 0.4;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(10px, 20px); }
}
