@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter.woff2') format('woff2');
}

:root {
  --white: #fafafa;
  --black: #111111;
  --transparent-black: rgba(0, 0, 0, 0.8);
  --thin-border: 1px solid var(--white);
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  color: var(--white);
  background-color: var(--black);
  overflow: hidden;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

header {
  margin: 2px 0 2.55px 0;
  height: 50px;
}

#title {
  text-align: center;
  font-size: 1.75em;
  margin: 1vh 0;
  font-weight: 700;
}

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

#top-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 42px;
  padding: 5px;
}

#button-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

#help-button,
#new-button {
  text-align: center;
  padding: 5px 0;
  font-size: 1em;
  cursor: pointer;
  border: var(--thin-border);
  border-radius: 5px;
  width: 80px;
  height: 32px;
}

#help-button {
  margin-right: 7.5px;
  width: 35px;
}

#board {
  display: grid;
  width: 100%;
  max-width: 100vw;
  aspect-ratio: 12 / 16;
}

.cell {
  width: 100%;
  height: 100%;
}

#controls {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  gap: 5px;
  padding-top: 10px;
}

.color-button {
  width: 100%;
  height: 60px;
  border: 2px solid var(--white);
  border-radius: 5px;
  cursor: pointer;
}

.hidden {
  display: none;
}

.visible {
  display: flex;
}

#winning-streak {
  margin-top: 12px;
}

#help-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--transparent-black);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#help-content {
  padding: 20px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

#help-content h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
}

#help-content p {
  font-size: 0.9em;
  margin: 10px 0 20px 0;
  text-align: left;
}

#back-button {
  border: var(--thin-border);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  width: 130px;
  height: 50px;
  font-size: 1.5em;
  margin-bottom: 20px;
}

#copyright {
  font-size: 0.85em;
  margin-top: 5px;
}

/* Desktop */
@media (min-width: 800px) {
  html,
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  main {
    min-width: 400px;
    width: 20vw;
  }
}
