@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

:root {
  --font-family: "Poppins", sans-serif;
  --purple: #8c52ff;
  --white: #ffffff;
  --black: #333333;
  --light-grey: #f0f4fa;
  --green: #9fff9c;
  --content-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  --disable-cancel: invert(86%) sepia(8%) saturate(265%) hue-rotate(177deg)
    brightness(84%) contrast(86%);
  --enable-cancel: invert(17%) sepia(1%) saturate(3325%) hue-rotate(340deg)
    brightness(97%) contrast(89%);
}

@media screen and (max-width: 2560px) {
  html {
    font-size: 16px;
  }
}

@media screen and (max-width: 1920px) {
  html {
    font-size: 11px;
  }
}

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

body {
  font-family: var(--font-family);
  background-color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

main.content {
  background-color: var(--white);
  color: var(--black);
  width: 40%;
  height: 70%;
  border-radius: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

main .game-title {
  font-size: 2.2rem;
  color: var(--purple);
}

main .score-display {
  font-size: 1.3rem;
  font-weight: 1200;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
}

main .score-display > div {
  display: flex;
  justify-self: center;
  padding: 0.5rem;
}

main .game-container {
  background-color: var(--black);
  width: 25rem;
  height: 25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  box-shadow: var(--content-box-shadow);
  border-radius: 0.5rem;
}

main .cell {
  background-color: var(--white);
  font-size: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

main .winning-cell {
  background-color: var(--green);
}

main .cell:hover {
  background-color: var(--light-grey);
}

main .winning-cell:hover {
  background-color: var(--green);
}

main .button-container {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

main .button-container > button {
  font-size: 1.5rem;
  font-weight: 1000;
  padding: 1rem;
  border: none;
  border-radius: 1rem;
  background-color: var(--purple);
  color: var(--white);
}

dialog.generate-players {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: inherit;
  color: var(--black);
  margin: auto;
  width: 20%;
  border: none;
  padding: 2rem 1rem;
  border-radius: 1rem;
}

dialog .close-dialog-container {
  display: flex;
  justify-content: end;
  margin-bottom: 0.5rem;
}

dialog .close-dialog-icon {
  width: 2rem;
  pointer-events: none;
  filter: var(--disable-cancel);
}

dialog .enable-close-dialog {
  pointer-events: auto;
  filter: var(--enable-cancel);
}

dialog .dialog-title {
  color: var(--purple);
  font-weight: 900;
  text-align: center;
  margin: 1rem 0;
}

dialog .dialog-inputs {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: inherit;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

dialog .dialog-inputs:focus {
  outline: none;
  border: 2px solid var(--purple);
}

dialog .choose-marker-container {
  margin: 1rem 0;
}

select,
::picker(select) {
  appearance: base-select;
}

dialog .select-marker {
  border: 2px solid var(--black);
  font-size: 1.1rem;
  padding: 0.5rem;
  transition: 0.4s;
}

select:hover,
select:focus {
  background: var(--light-grey);
}

select::picker-icon {
  color: #999;
  transition: 0.4s rotate;
}

select:open::picker-icon {
  rotate: 180deg;
}

dialog .submit-button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background-color: var(--purple);
  color: var(--white);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 1rem;
  display: flex;
  justify-self: center;
}
