/* ===== styles.css ===== */
/* Reset & Root */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  font-family:
    Courier New,
    sans-serif;
  color: #696969;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background: #000000;
  /* display: flex; */
  flex-direction: column; 
  align-items: center; 
}

h1 { color: #ffffff; margin-bottom: 20px; }

h2 { color: #ffffff; margin-bottom: 20px; margin-top: 20px; text-align: center; }

a {
  text-decoration: none;
  color: #fffff0;
}

header {
  background: #a9c191;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  text-align: center;
}

header nav ul {
  list-style-type: none;
  padding: 0;
}

header nav ul li {
  display: inline;
  margin-right: 10px;
}

header nav ul li a {
  color: #fffff0;
  text-decoration: none;
}

#game { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}

#grid { 
  display: grid;
  grid-template-rows: repeat(6, 1fr); 
  gap: 5px; 
  margin-bottom: 20px; 
  color: #ffffff; 
}

.row { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 5px; 
}

.tile { 
  width: 60px; 
  height: 60px; 
  border: 2px solid #ccc; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  font-size: 2rem; 
  font-color: #ffffff; 
  text-transform: uppercase; 
}

.correct { 
  background-color: #6aaa64; 
  color: white; 
  border: none; 
}

.present { 
  background-color: #c9b458; 
  color: white; 
  border: none; 
}

.absent  { 
  background-color: #787c7e; 
  color: white; 
  border: none; 
}

#keyboard {
  display: grid;
  gap: 0.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* first row: 10 equal columns */
#keyboard .row:nth-child(1) {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

/* second row: 9 equal columns */
#keyboard .row:nth-child(2) {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
}

/* third row: Enter (1.5fr) + 7 letters + Back (1.5fr) */
#keyboard .row:nth-child(3) {
  display: grid;
  grid-template-columns: 1.5fr repeat(7, 1fr) 1.5fr;
}

.key {
  /*
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  */
  padding: 0.75rem 0;
  text-align: center;
  user-select: none;
  cursor: pointer;
  border: 1px solid #999;
  border-radius: 4px;
  font-size: 1rem;
}

/* shrink on phones */
@media (max-width: 420px) {
  .key {
    padding: 0.6rem 0;
    font-size: 0.9rem;
  }
}

/*
#keyboard { 
  display: flex; 
  flex-wrap: wrap;
  justify-content: center;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.25rem; 
  max-width: 600px;
  margin: 0 auto;
}

.key {
  flex: 1 0 calc(10% - 0.5rem); 
  min-width: 2rem;              
  padding: 0.75rem 0;
  text-align: center;
  user-select: none;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #999;
  font-size: 1rem;
}
.key { 
  padding: 10px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-size: 1rem; 
  text-transform: uppercase; 
}
@media (max-width: 400px) {
  .key {
    padding: 0.5rem 0;
    font-size: 0.8rem;
  }
}
*/

.key.disabled { 
  opacity: 0.5; 
  cursor: default; 
}
