:root {
  --primary-color: #264653;
  --secondary-color: #2a9d8f;
  --tertiary-color: #e9c46a;
  --primary-bg: #f4a261;
  --secondary-bg: #e76f51;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  background: var(--tertiary-color);
  padding: 40px;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  h1 {
    font-size: 52px;
    line-height: 68px;
    letter-spacing: -1.6px;
  }
  span {
    font-size: 14px;
    line-height: 22px;
  }
}

#game-board {
  width: 600px;
  min-height: 600px;
  display: grid;
  grid-template-columns: repeat(var(--side, 10), 1fr);
  grid-template-rows: repeat(var(--side, 10), 1fr);
  background: var(--tertiary-color);
  overflow: hidden;
}

.cell {
  border: 1px solid var(--primary-bg);
  background: var(--secondary-bg);

  &.alive {
    background: var(--primary-color);
    color: #fff;
  }
  &.died {
    animation-name: die;
    animation-duration: 10s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
  }
}

@keyframes die {
  0% {
    background: var(--secondary-color);
  }
  100% {
    background: var(--tertiary-color);
  }
}

.input-group {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

input,
button,
label {
  width: 128px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: #264653 1px solid;
  border-radius: 6px;
  transition: all 150ms ease-in-out;
  cursor: pointer;
  letter-spacing: 0.5px;
  background: transparent;
  &:hover {
    background: var(--secondary-color) !important;
    color: #fff !important;
  }
}

label:has(input[type='checkbox']:checked) {
  background: var(--secondary-color);
  color: #fff;
}

input[type='checkbox'] {
  display: none;
}

#game-play {
  background: var(--primary-color);
  color: #fff;
}

/* #game-reload {
  border: none;
  background: transparent;
} */
