body {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  margin-top: 50px;
  background-color: #1e1e1e;
  background-image: url('https://www.transparenttextures.com/patterns/black-linen.png');
  background-size: cover;
  color: #fff;
}

#game-container {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 100px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  width: 150%;
  max-width: 600px;
  border: 3px solid #4ccdea;
}

h1 {
  color: #4ccdea;
  font-size: 40px;
  margin-bottom: 20px;
}

input {
  font-size: 20px;
  padding: 10px;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  text-transform: uppercase;
  background-color: #333;
  color: #fff;
  border: 2px solid #4ccdea;
  border-radius: 5px;
  box-sizing: border-box;
}

button {
  font-size: 16px;
  padding: 10px 20px;
  margin-left: 10px;
  cursor: pointer;
  background-color: #4ccdea;
  color: black;
  border: none;
  border-radius: 5px;
  margin-top: 10px;
  transition: background-color 0.3s;
}

#button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 20px;
}

button:hover {
  background-color: #3496ac;
}

#remaining-attempts {
  margin-top: 20px;
  font-size: 18px;
}

button:disabled {
  background-color: #666;
  cursor: not-allowed;
  color: #ccc;
}

#board {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.guess-row {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  width: 200%;
}

.tile {
  flex: 1;
  max-width: 60px;
  height: 50px;
  background-color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
  margin: 2px;
  border: 2px solid #4ccdea;
}

.tile.correct {
  background-color: #4caf50;
  color: white;
}

.tile.present {
  background-color: #f7c400;
  color: white;
}

.tile.absent {
  background-color: #888;
  color: white;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
  padding-top: 100px;
  box-sizing: border-box;
}

.modal-content {
  background-color: #222;
  color: white;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
}

button {
  background-color: #4ccdea;
  color: black;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #3392ad;
}

.source-code-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  background-color: #4ccdea;
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

.source-code-btn:hover {
  background-color: #3392ad;
}

#driver-info {
  margin-top: 20px;
  text-align: center;
}

#driver-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-top: 10px;
  object-fit: cover;
  border: 3px solid #4ccdea;
  padding: 5px;
}

#driver-name {
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
}

@media (max-width: 800px) {
  #game-container {
    max-width: 90%;
    padding: 20px;
  }

  h1 {
    font-size: 30px;
  }

  input {
    font-size: 18px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
  }

  button {
    font-size: 16px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    background-color: #4ccdea;
    color: black;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s;
  }

  #remaining-attempts {
    font-size: 16px;
  }

  #board {
    margin-top: 15px;
  }

  .guess-row {
    width: 100%;
  }

  .tile {
    max-width: 40px;
    height: 40px;
    font-size: 16px;
  }

  #driver-photo {
    width: 60px;
    height: 60px;
  }

  #driver-name {
    font-size: 16px;
  }

  .source-code-btn {
    padding: 0.3rem 0.8rem;
    font-size: 14px;
  }

  #game-container {
    transform: scale(0.85);
  }
}

@media (max-width: 600px) {
  #game-container {
    max-width: 90%;
    padding: 15px;
  }

  h1 {
    font-size: 26px;
  }

  input {
    font-size: 16px;
    padding: 8px;
    width: 100%;
    max-width: 100%;
  }

  button {
    font-size: 16px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    background-color: #4ccdea;
    color: black;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s;
  }

  #remaining-attempts {
    font-size: 14px;
  }

  #board {
    margin-top: 10px;
  }

  .guess-row {
    width: 100%;
  }

  .tile {
    max-width: 35px;
    height: 35px;
    font-size: 14px;
  }

  #driver-photo {
    width: 50px;
    height: 50px;
  }

  #driver-name {
    font-size: 14px;
  }

  .source-code-btn {
    padding: 0.2rem 0.6rem;
    font-size: 12px;
  }

  #game-container {
    transform: scale(0.75);
  }
}

#era-select {
  border: 2px solid #444;
  border-radius: 4px;
  background-color: #222;
  color: #fff;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

#era-select:focus {
  border-color: #007bff;
  outline: none;
}

#era-select:hover {
  border-color: #666;
}

#era-select option {
  padding: 10px;
  background-color: #222;
  color: #fff;
}

#era-select option:hover {
  background-color: #333;
}