body {
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(to bottom, #222, #444);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: Arial, sans-serif;
}

h1, h2 {
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.btn-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 60px;
}

.btn {
  height: 200px;
  width: 200px;
  border-radius: 25%;
  border: 6px solid #222;
  margin: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

.btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}

.red {
  background: linear-gradient(to bottom, #ff4d4d, #b30000);
}

.yellow {
  background: linear-gradient(to bottom, #ffff66, #cccc00);
}

.green {
  background: linear-gradient(to bottom, #66ff66, #009933);
}

.blue {
  background: linear-gradient(to bottom, #66b3ff, #004080);
}

.main-nav {
  position: absolute;
  top: 20px;
  right: 30px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-family: inherit;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #ccc;
}

#start-screen{
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: Arial, sans-serif;
}

.name-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}

#player-name {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  outline: none;
  width: 200px;
  text-align: center;
  background-color: #f0f0f0;
  transition: all 0.3s ease;
}

#player-name:focus {
  background-color: #fff;
  box-shadow: 0 0 5px #66ff66;
}

#error-msg {
  color: red;
  display: none;
  font-size: 1.1rem;
}

#start-btn {
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: #111;
  background-color: #66ff66;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#start-btn:hover {
  background-color: #33cc33;
  transform: scale(1.05);
}

#start-btn:active {
  background-color: #28a428;
  transform: scale(0.98);
}

.flash {
  background: white !important;
  box-shadow: 0 0 30px white;
}

.userFlash {
  background: orange !important;
  box-shadow: 0 0 30px orange;
}

.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  max-width: 350px;
  margin: auto;
}

.modal-content button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

#restart-btn {
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  font-weight: bold;
  color: #111;
  background-color: #66ff66;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#restart-btn:hover {
  background-color: #33cc33;
  transform: scale(1.05);
}

#game-over-modal,
#game-over-modal h2,
#game-over-modal p {
  color: #000;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
}

footer a {
  color: white;
  text-decoration: none;
  font-family: inherit;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s;
}

footer a:hover {
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 900px) {
  h1 {
    font-size: 2rem;
  }

  #start-btn,
  #restart-btn {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 600px) {
  body {
    padding-top: 10px;
  }

  .main-nav {
    position: static;
    margin-top: 10px;
  }

  .btn {
    height: 120px;
    width: 120px;
    margin: 0.8rem;
  }

  h1 {
    font-size: 1.7rem;
    margin-top: 0.5rem;
  }

  h2 {
    font-size: 1rem;
  }

  #player-name {
    width: 160px;
    font-size: 0.9rem;
  }

  .name-input-container {
    flex-direction: column;
    gap: 0.6rem;
  }
}
