html {
  scroll-behavior: smooth;
}

body {
  font-family: Avenir, sans-serif;
  color: #fffce1;
  margin: 0;
  /* Set a fallback color in case the video doesn't load */
  background-color: #0e100f;
}

/* --- New styles for the video background --- */
#video-bg {
  position: fixed; /* Stays in place during scroll */
  top: 0;
  left: 0;
  width: 100vw;   /* Full viewport width */
  height: 100vh;  /* Full viewport height */
  z-index: -1;    /* Sits behind all other content */
  opacity: 1;     /* Starts fully visible */
  transition: opacity 0.8s ease; /* The fade animation */
}

/* This class will be added by JavaScript to trigger the fade */
#video-bg.fade-out {
  opacity: 0;
}

#video-bg video {
  width: 100%;
  height: 100%;
  /* Ensures the video covers the screen without distortion */
  object-fit: cover; 
}


/* --- Updated section styles --- */
section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero section needs a transparent background to see the video */
#hero {
  background: transparent;
}

/* Game section gets a solid background to cover the video */
#game-section {
  background-color: #1a202c; /* The dark slate blue color */
}


p {
  max-width: 70ch;
  font-size: 1.4rem;
  text-align: center;
  line-height: 1.3;
}

h1, h2 {
  opacity: 1;
}

/* --- Game styles (no changes) --- */
.game-container, input, button, #message {
    /* (Styles for the game elements remain the same as before) */
    display: flex;
    align-items: center;
    margin-top: 20px;
}
input {
    background-color: #2d3748;
    color: #fffce1;
    border: 1px solid #fffce1;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    width: 180px;
}
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
button {
    background-color: #4a5568;
    color: #fffce1;
    border: 1px solid #fffce1;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}
button:hover {
    background-color: #718096;
}
#message {
    margin-top: 25px;
    font-size: 1.2rem;
    min-height: 1.5em;
    font-weight: bold;
}