/*  Universal Selector */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header */
header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 20px;
}

/*  Header icons */
header img {
  width: 24px;    
  height: 24px;
  /* Keeps proportions correct */
  object-fit: contain;
}

/* Add spacing between icons */
.icons img {
  margin-left: 10px;
}

header h1 {
  font-size: 1.8em;
  font-weight: 700;
}

.menu {
  font-size: 1.5em;
  cursor: pointer;
}

.icons span {
  margin-left: 10px;
  font-size: 1.2em;
  cursor: pointer;
}

/* Grid */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 60px;
}

.grid {
  display: grid;
  grid-template-rows: repeat(6, auto);
  gap: 8px;
  margin-bottom: 60px;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  gap: 8px;
  justify-content: center;
}

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

/* Keyboard */
.keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

button {
  background-color: #d3d6da;
  border: none;
  border-radius: 4px;
  padding: 14px;
  min-width: 40px;
  font-weight: bold;
  cursor: pointer;
}

button.enter,
button.back {
  font-size: 0.8em;
  min-width: 65px;
}

/*  Backspace icon */
button.back img {
  width: 24px; 
  height: 24px;
  /* Keeps proportions correct */
  object-fit: contain;
}

/* Button Hover */
button:hover {
  background-color: #c4c6ca;
}