:root {
  --bg-color: #f2f2f2;

  --grey-1: #999;
  --grey-2: #666;
  --grey-3: #333;
  --black: #000;

  --header-footer-bg: var(--grey-2);
  --header-footer-text: #fff;
}

* {
  padding: 0;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header,
footer {
  background-color: var(--header-footer-bg);
  color: var(--header-footer-text);
  padding: 8px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Audiowide", cursive;
}

.header {
  height: 60px;
  font-size: 36px;
  font-weight: 900;
}

.footer {
  height: 36px;
  font-size: 18px;
  font-weight: 700;
}

footer a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--header-footer-text);
}

footer a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

footer a:hover::after {
  transform: scaleX(1);
}

.content {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  padding: 0 48px;
  align-items: center;
}

.controls {
  display: flex;
  flex-direction: column;
  margin: 240px auto;
  gap: 12px;
}

.input,
.btns {
  display: flex;
  gap: 24px;
}

.btns {
  align-items: center;
  justify-content: center;
}

.btns button {
  padding: 2px;
}

.container {
  display: flex;
  margin: 10px auto;
  width: 400px;
  height: 400px;
  flex-wrap: wrap;
  border: var(--grey-2) solid 12px;
  border-left-color: var(--grey-1);
  border-bottom-color: var(--grey-1);
}

/* Input field */
input[type="number"] {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="number"]:focus {
  border-color: #007bff;
}

.btns button {
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, outline 0.2s;
}

.btns button:hover {
  transform: scale(1.05);
}

.grid-color.active {
  outline: 2px solid #333;
  box-shadow: 0 0 0 2px #fff inset;
}
