body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: white;
  overflow: hidden;
  background-color: black;
}

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  backdrop-filter: blur(5px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #4CAF50;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #4CAF50;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top: 6px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-caption {
  color: white;
  font-family: monospace;
  font-size: 14px;
  opacity: 0.8;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bg-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.bg-container::after {
  content: "";
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -32%);
  width: 70vw;
  height: 70vh;
  background: radial-gradient(circle, var(--after-glow-color, rgba(255,255,255,0.2)) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.background-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100.7%;
  height: 100.7%;
  object-fit: cover;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.sky-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
}

.sky-bg, .sky-fallback {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.5) brightness(0.25) contrast(1) drop-shadow(0 0 0 white);
  pointer-events: none;
}

.sky-fallback {
  display: none;
}

.projection {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  mix-blend-mode: multiply;
  z-index: 2;
  opacity: 0.3;
  animation: projectorFlicker 3s infinite ease-in-out;
  filter: grayscale(1) brightness(1.9) contrast(1.2) drop-shadow(0 0 0 white);
}

.projection-container {
  position: absolute;
  top: 15%;
  left: 28%;
  width: 45vw;
  height: 45vh;
  z-index: 2;
  pointer-events: none; /* Let clicks pass through */
  overflow: hidden;
}

.color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: color;
  opacity: 0.3;
  transition: background-color 0.5s ease;
  overflow: hidden;
  pointer-events: none;
  mask-image: url('assets/animals/orangutan.webm');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
}

a {
  color: white;
  text-decoration: none;
}

@keyframes projectorFlicker {
  0%, 100% {
    opacity: 0.4;
  }
  25% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.42;
  }
  75% {
    opacity: 0.38;
  }
}

#score-popup {
  position: absolute;
  top: 30%;
  left: 28%;
  width: 45vw;
  height: 45vh;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  text-align: center;
  opacity: 0.9;
  mix-blend-mode: screen;
}

#score-label-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.score-label-line {
  font-size: 50px;
  font-family: monospace, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  opacity: 0.6;
  color: white;
  animation: flicker 1s infinite alternate;
}

#score-value {
  font-size: 100px;
  font-weight: bold;
  font-family: monospace, sans-serif;
  margin: 0;
  padding: 0;
  display: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.7),
    0 0 15px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(255, 255, 255, 0.5);
  animation: flicker 1.5s infinite alternate;
}

#score-qr {
  display: none;
  width: 80%;
  max-width: 250px;
  height: auto;
  margin-top: -10%;
  opacity: 0.75;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
  transition: opacity 0.1s ease-in-out;
  animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
  0% {
    opacity: 0.4;
    text-shadow:
      0 0 5px rgba(255, 255, 255, 0.4),
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 15px rgba(255, 255, 255, 0.6);
  }
  100% {
    opacity: 0.9;
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 15px rgba(255, 255, 255, 0.9),
      0 0 30px rgba(255, 255, 255, 1);
  }
}