body {
  margin: 0;
  padding: 0;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  background: url("TitleScreen.png") no-repeat center center fixed;
  background-size: cover;
  color: rgb(255, 255, 255);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Title Screen Layout */
#title-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

#title-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

#title-screen h1 {
  font-size: 3rem;
  color: #fff;
  animation: sparkle 2s infinite;
  margin: 0;
}

#title-screen h1 span {
  color: #ff0095;
  text-shadow: 0 0 10px #ffffff;
}

.subtitle {
  font-size: 1.2rem;
  margin: 1rem 0;
  font-style: italic;
  text-align: center;
}

button {
  background-color: #c300ff;
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  margin: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-family: "Press Start 2P", system-ui;
}

button:hover {
  background-color: #ff9ff3;
  transform: scale(1.1);
}

@keyframes sparkle {
  0% { text-shadow: 0 0 10px #ff0088; }
  50% { text-shadow: 0 0 30px #ffffff; }
  100% { text-shadow: 0 0 10px #ff0088; }
}

/* 🎬 Mockumentary Section */
#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 1s ease;
}

#intro-video {
  width: 100%;
  height: auto;
  max-height: 90vh;
}

#skip-button {
  margin-top: 1rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  background-color: #ff70e0;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}
#mute-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #ff70e0;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-family: "Press Start 2P", system-ui;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 10px;
  z-index: 1000;
}

#skip-button:hover {
  background-color: #ff9ff3;
}

/* Utility classes */
.hidden {
  display: none;
}

.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}
/* Initial Play Screen */
#play-screen {
  position: fixed;
  top: 0;
  left: 0;
  background-color: #a669ba;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#play-screen button {
  background-color: #ff70e0;
  color: white;
  font-family: "Press Start 2P", system-ui;
}

/* Overlay styles for Credits and How-To */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.overlay.hidden {
  display: none;
  opacity: 0;
}

.overlay-content {
  background-color: #1f0033;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  color: #fff;
  max-width: 90%;
  width: 600px;
  font-family: "Press Start 2P", system-ui;
}

.overlay-content h2 {
  font-size: 1.5rem;
  color: #ff00cc;
  margin-bottom: 1rem;
}

.close-btn {
  margin-top: 2rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  background-color: #ff70e0;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}

.close-btn:hover {
  background-color: #ff9ff3;
}

/* Tower screen styles */
#tower-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

#tower-video {
  width: 100%;
  height: 56vw;
  max-width: 900px;
  max-height: 56vw;
  object-fit: contain;
}

#tower-skip {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ff70e0;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10000;
  border-radius: 8px;
  transition: background 0.3s;
}

#tower-skip:hover {
  background: #ff9ff3;
}

#tower-mute-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #ff70e0;
  border: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 10000;
  border-radius: 8px;
  transition: background 0.3s;
}

#tower-mute-toggle:hover {
  background: #ff9ff3;
}


/* Webcam Prompt Screen */
#webcam-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:url("glitter.jpeg");
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  text-align: center;
  opacity: 1;
  transition: opacity 1s ease;
}

.webcam-box {
  background: #ff0088;
  padding: 40px;
  border-radius: 16px;
  border: 2px solid white;
  max-width: 500px;
}

#enable-webcam {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: white;
  color: black;
  transition: background 0.3s ease;
}

#enable-webcam:hover {
  background: #ddd;
}

#score-counter {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #ff70e0;
  font-weight: bold;
  z-index: 1000;
}


/* make sure it applies to both the ID and the class */
#countdown-overlay,
.countdown-overlay {
  /* full viewport */
  position: fixed;
  inset: 0;

  /* flex centering */
  display: flex;
  flex-direction: column;    /* ← stack children vertically */
  justify-content: center;   /* ← center along the main (vertical) axis */
  align-items: center;       /* ← center along the cross (horizontal) axis */

  background: transparent;
  color: #ff70e0;
  font-size: 3rem;
  text-align: center;        /* ← so multi-line text stays centered */
  z-index: 9999;
}

/* optional: remove default margins so it really centers */
#countdown-overlay h1,
#countdown-overlay p {
  margin: 0.2em 0;
}

.camera-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none; 
}
#input_video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

#output_canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: transparent !important;
  object-fit: cover;
  z-index: 2;
}

#start-dance {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background-color: rgba(255, 0, 200, 0.85);
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: "Press Start 2P", system-ui;
}

#start-dance:hover {
  background-color: #ff9ff3;
}

.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.result-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.result-modal-content h2 {
  color: #ff70e0;
}

#play-again-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: #ff70e0;
  color: white;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

@keyframes sparkle {
  0% { filter: brightness(1); transform: scale(1) rotate(0deg); }
  25% { filter: brightness(1.4); transform: scale(1.05) rotate(2deg); }
  50% { filter: brightness(1.1); transform: scale(0.97) rotate(-2deg); }
  75% { filter: brightness(1.5); transform: scale(1.03) rotate(1deg); }
  100% { filter: brightness(1); transform: scale(1) rotate(0deg); }
}

#ponytail {
  animation: sparkle 1.2s infinite;
  transition: filter 0.2s, transform 0.2s;
}



