body {
    margin: 0;
    overflow: hidden;
    font-family: 'Courier New', monospace; /* Retro monospace font */
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#feedback-para{
    z-index: 2000;
    font-size: 15px;
    color: white;
    background-color:rgba(40, 38, 36, 0.5);
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px;
}

a {
    color: rgb(253, 253, 253);
}

a:visited {
    color: rgb(248, 252, 0);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 50vw;
    width: 50vw !important;
    height: 100vh !important;
    z-index: 1;
}

#background {
    position: absolute;
    top: 0;
    left: 50vw;
    width: 50vw;
    height: 100vh;
    background-image: url('background2.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

#video {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    z-index: 2;
    transform: scaleX(-1);
    object-fit: cover;
}

#hand-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
}

#info-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: absolute;
  top: 10px;
  left: 50vw;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: #b3ff00;
  font-size: 16px;
  text-shadow: 0 0 5px #1aff01;
  z-index: 4;
}

#score, #lives {
  transition: all 0.3s ease;
}
/* Retro-styled start screen */
#start-screen,
#game-over,
#loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 10px;
  box-sizing: border-box;
}

#start-screen {
  background-color: rgba(0, 0, 0, 0.85);
  border: 4px solid #f5e900;
  color: #fff;
}

#start-screen h1 {
  font-size: 3.5rem;
  background: linear-gradient(to right, #ffaa00, #fbff00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  animation: hue 5s linear infinite;
  text-align: center;
  margin-bottom: 20px;
}

#start-screen p {
  font-size: 1.2rem;
  margin: 5px 0;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 4px;
  max-width: 80%;
  text-align: center;
}

#start-button,
#restart-button {
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 1.5rem;
  font-family: 'Inter', sans-serif;
  background-color: #ffe600;
  color: #000;
  border: 3px solid #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 2px;
  box-shadow: 0 0 10px #39ff14;
}

#start-button:hover,
#restart-button:hover {
  background-color: #fff;
  color: #000;
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 0 15px #fff;
}

#game-over {
  background-color: rgba(0, 0, 0, 0.85);
  border: 4px solid #ff0000;
  color: #fff;
  display: none;
}

#game-over h1 {
  font-size: 4rem;
  color: #ff0000;
  text-shadow: 3px 3px 0 #ffff00, 6px 6px 0 #000;
  animation: shake 1s infinite;
}

#game-over p {
  font-size: 1.5rem;
}

#final-score {
  color: #ffff00;
  font-size: 2rem;
  text-shadow: 0 0 5px #ffff00;
}

#restart-button {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 12px 30px;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    background-color: #ff0000; /* Red */
    color: #fff;
    border: 3px solid #fff;
    border-radius: 0; /* Square buttons for retro feel */
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 0 10px #ff0000; /* Glow effect */
}

#restart-button:hover {
    background-color: #fff;
    color: #ff0000;
    transform: scale(1.05);
    box-shadow: 0 0 15px #fff;
}

#loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 5;
    color: #39ff14; /* Neon green text */
    text-shadow: 0 0 5px #39ff14; /* Text glow */
}

#loading h2 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: blink 1s infinite;
}

.blade-trail {
    position: absolute;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
    height: 5px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Responsive styling */
@media screen and (max-width: 768px) {
    #start-screen h1, #game-over h1 {
        font-size: 2.5rem;
    }
    
    #start-screen p {
        font-size: 1rem;
        max-width: 90%;
    }
    
    #start-button, #restart-button {
        font-size: 1.2rem;
        padding: 10px 20px;
    }
    
    #final-score {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    #start-screen h1, #game-over h1 {
        font-size: 2rem;
    }
    
    #start-screen p {
        font-size: 0.9rem;
    }
    
    #start-button, #restart-button {
        font-size: 1rem;
        padding: 8px 16px;
    }
    
    #info-container {
        padding: 5px;
    }
    
    #score-container, #lives-container {
        font-size: 14px;
    }
}