/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

a {
  color: #007BFF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  margin-bottom: 20px;
  color: #333;
}

p {
  margin-bottom: 15px;
}

/* Button Styles */
button {
  background-color: #007BFF;
  border: none;
  color: #fff;
  padding: 10px 20px;
  margin: 10px 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Form & Input Styles */
input,
select {
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
}

form {
  background-color: #fff;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* List Styles */
ul {
  list-style: none;
  padding: 0;
}

li {
  padding: 10px;
  background-color: #fff;
  margin-bottom: 10px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Container for centralized content */
.container {
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

/* Container for player boxes */
#playerRoles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 10px;
}

/* Each player box */
.playerBox {
  border: 2px solid #333;
  border-radius: 5px;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  /* Use the custom property for background color */
  background-color: var(--player-bg, #ffffff);
  flex: 1 1 calc(33.33% - 20px); /* 3 boxes per row on large screens */
}

/* For smaller screens, stack boxes vertically */
@media (max-width: 767px) {
  #playerRoles {
    flex-direction: column;
    align-items: stretch;
  }
  .playerBox {
    flex: 1 1 100%;
  }
}

    /* Inline styles for clarity */
    #countdownContainer { display: none; margin-top: 20px; }
    .player-item { margin-bottom: 5px; }
    button { margin: 5px; }
    #gameStatus { margin: 10px 0; }
    #gameHistoryContainer { border: 1px solid #ccc; padding: 10px; height: 200px; overflow-y: auto; margin-top: 20px; }

    /* Player Roles grid styling */
    #playerRoles {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px;
    }
    .playerBoxLeader {
      border: 5px solid gold;
      border-radius: 5px;
      padding: 10px;
      flex: 1 1 calc(33.33% - 20px);
      box-sizing: border-box;
      cursor: pointer;
      position: relative;
      text-align: center;
      background: #83dd27;
    }    
    .playerBoxTwo {
      border: 5px solid silver;
      border-radius: 5px;
      padding: 10px;
      flex: 1 1 calc(33.33% - 20px);
      box-sizing: border-box;
      cursor: pointer;
      position: relative;
      text-align: center;
      background: #4ec4e7;
    }
    .playerBoxThree {
      border: 5px solid silver;
      border-radius: 5px;
      padding: 10px;
      flex: 1 1 calc(33.33% - 20px);
      box-sizing: border-box;
      cursor: pointer;
      position: relative;
      text-align: center;
      background: #e77e4e;
    }
    /* Highlight selected box */
    .playerBox.selected {
      border-color: red;
      box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    }
    /* For smaller screens, stack boxes vertically */
    @media (max-width: 767px) {
      #playerRoles {
        flex-direction: column;
      }
      .playerBox {
        flex: 1 1 100%;
      }
    }
    

    /* Inline styles for clarity */
    #countdownContainer { display: none; margin-top: 20px; }
    .player-item { margin-bottom: 5px; }
    button { margin: 5px; }
    #gameStatus { margin: 10px 0; }
    #gameHistoryContainer { border: 1px solid #ccc; padding: 10px; height: 200px; overflow-y: auto; margin-top: 20px; }
 