body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #15151d; /* Add background color to body to prevent white space */
  min-height: 100%;
}

header {
  font-family: "Mrs Saint Delafield", cursive;
  font-weight: 400;
  font-style: normal;
  height: 120px;
  width: 100%;
  font-size: 80px;
  background-color: #ff1e00;
  background-image: linear-gradient(135deg, #ff1e00 0%, #c80f00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.pheader {
  transition: transform 0.3s ease-in-out, text-shadow 0.3s ease;
  cursor: pointer;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  padding: 0 15px;
  margin: 0;
}

.pheader:hover {
  transform: scale(1.15);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

a {
  text-decoration: none;
  color: white;
}

img {
  height: 600px;
  width: 400px;
  object-fit: cover;
  transition: filter 0.3s ease;
}

main {
  background-color: #15151d;
  width: 100%;
  color: white;
  min-height: 800px; /* Keep original min-height */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  padding: 40px 0;
  flex-wrap: wrap;
}

footer {
  width: 100%;
  height: 100px; /* Original footer height */
  border-top: solid 3px #ff1e00;
  background-color: #15151d;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0; /* Ensure no gap between main content and footer */
  padding: 0; /* Remove any padding that might create space */
}

#typewriter {
  font-size: 30px;
  font-family: monospace;
  padding: 0 20px;
  text-align: center;
}

#cursor {
  display: inline-block;
  vertical-align: middle;
}

.gamediv {
  height: 600px;
  width: 400px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  margin: 20px 10px;
}

.gamediv:hover {
  transform: scale(1.05);
  z-index: 1;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gamediv:hover .game-overlay {
  opacity: 1;
}

.gamediv:hover img {
  filter: grayscale(70%);
}

.game-title {
  color: #ff1e00;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  transform: translateY(100px);
  transition: transform 0.4s ease;
  padding: 0 20px;
  margin-bottom: 10px;
  font-family: 'Open Sans', sans-serif;
}

.game-description {
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  text-align: center;
  padding: 0 20px 30px;
  transform: translateY(100px);
  transition: transform 0.5s ease 0.1s;
}

.gamediv:hover .game-title {
  transform: translateY(0);
}

.gamediv:hover .game-description {
  transform: translateY(0);
}

/* Media Queries for Responsive Design */

/* Tablets and small laptops */
@media screen and (max-width: 1200px) {
  main {
      gap: 40px;
  }
}

/* Larger phones and small tablets */
@media screen and (max-width: 900px) {
  header {
      height: 100px;
      font-size: 60px;
  }
  
  main {
      flex-direction: column;
      height: auto;
      padding: 30px 0;
  }
  
  .gamediv {
      margin: 15px 0;
  }
}

@media screen and (max-width: 600px) {
  header {
      height: 80px;
      font-size: 50px;
  }
  
  .gamediv {
      height: 450px;
      width: 300px;
  }
  
  img {
      height: 450px;
      width: 300px;
  }
  
  .game-title {
      font-size: 24px;
  }
  
  .game-description {
      font-size: 16px;
  }
  
  #typewriter {
      font-size: 20px;
  }
  
  footer {
      height: 80px;
  }
}

@media screen and (max-width: 350px) {
  header {
      height: 70px;
      font-size: 40px;
  }
  
  .gamediv {
      height: 400px;
      width: 260px;
  }
  
  img {
      height: 400px;
      width: 260px;
  }
  
  main {
      padding: 20px 0;
  }
  
  .game-title {
      font-size: 20px;
  }
  
  .game-description {
      font-size: 14px;
      padding: 0 15px 20px;
  }
  
  #typewriter {
      font-size: 16px;
  }
}