/* 
https://m2.material.io/design/color/the-color-system.html#tools-for-picking-colors

Color scheme:
Blue gray: #607D8B
Ligher: #B0BEC5
Darker: #455A64
Off-white: #ECEFF1

Burnt Orange: #FF5722
Peach: #FFCCBC
Light Gray: #F5F5F5

*/

button { 
  background-color: #607D8B;
  color: #ECEFF1;
  min-width: 0;
}

form {
  display: flex; 
  align-items: center; 
  gap: 10px; 
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  display: inline;
}

header {
  background-color: #455A64;
  padding-bottom: 10px;
  padding-top: 10px;
}

header h1 {
  color: #FFCCBC;
  font-size: 2.5em;
  letter-spacing: 0.1em;
  margin: 0;
  -webkit-text-stroke: 1px #FF5722;
  text-shadow: -1px -1px 0 #FF5722, 1px -1px 0 #FF5722, -1px 1px 0 #FF5722, 1px 1px 0 #FF5722;
}

#card {
  display: grid; /* Essential for the grid-template to work */
  grid-template-columns: repeat(5, 1fr); 
  gap: 10px;            /* Adds space between the tiles */
  max-width: 600px;     /* Prevents it from getting too wide on desktop */
  margin: 0px auto;    /* Centers the card on the page */
  padding: 15px;
}

#card button {
  aspect-ratio: 1 / 1;  /* Forces buttons to stay perfectly square */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
  font-size: 0.8rem;    /* Adjust based on word length */
  word-break: break-word;
  text-transform: uppercase;
  transition: transform 0.1s ease;
}

#card button:not([disabled]):hover {
  transform: scale(1.05);
  z-index: 1;
}

#card button[disabled] {
  opacity: 1;
  cursor: default;
}

#card button.button-hit,
#card button.button-hit[disabled],
#card button.button-hit[disabled]:hover {
  background-color: #ECEFF1;
  color: #607D8B;
  transform: scale(1);
  z-index: 0;
}

#card button.free-space,
#card button.free-space[disabled],
#card button.free-space[disabled]:hover {
  background-color: #FF5722;
  border: 0;
  color: #ECEFF1;
}

#startBtn {
  background-color: #F5F5F5;
  border: 1px solid #FFCCBC;
  color: #FF5722;
  font-weight: bold;
}

#wordList {
  max-height: 630px;
  overflow-y: auto;
  scrollbar-gutter: stable; /* Prevents "jumping" when scrollbar appears */
  scroll-behavior: smooth;  /* Smooth scrolling for programmatic shifts */

  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center; 
}

#wordList li {
  list-style: none;
  margin-bottom: 10px;
  padding: 10px 20px;
  background-color: #F5F5F5;
  border: 1px solid #455A64;
  color: #455A64;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  user-select: none;
  min-width: 80%;
}

#wordList li:hover {
  background-color: #455A64;
  color: #F5F5F5;
  transform: translateY(-1px); /* Slight lift effect */
}

#wordList li.item-hit {
  background: #FFCCBC;
  border: 1px solid #FF5722;
  color: #FF5722;
}

#wordList li:active {
  transform: translateY(1px); /* Pressed effect */
}