/*-----------------------||| FONTS |||------------------------*/
.lilita-one-regular {
  font-family: "Lilita One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.jersey-10-regular {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/*-----------------------||| BODY |||------------------------*/

body {
  margin: 0;
  padding: 0;
  font-family: "Jersey 10", sans-serif;
  font-size: 1.2em;
  background: #0f172a;
  background-size: cover;
  color: white;
  text-align: center;
  background-image: url("/images/multi-bg.jpg");
  overflow-x: hidden;
  /*--- SCROLL VARIABLE VALUES ---*/
  --sb-track-color: #625000;
  --sb-thumb-color: #ffd000;
  --sb-size: 14px;
  --sm-track-color: #17193d;
  --sm-thumb-color: #5a64fa;
  --sm-size: 12px;
}

/*-----------------------||| SCROLLBARS |||------------------------*/

/*------- SCROLLBAR MAIN -------*/
body::-webkit-scrollbar {
  width: var(--sb-size);
  border-radius: 15px;
}

body::-webkit-scrollbar-track {
  background: var(--sb-track-color);
}

body::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 10px;
  border: 3px solid #000000;
}

/*------- SCROLLBAR LEADERBOARD -------*/

#leaderboardList::-webkit-scrollbar {
  width: var(--sm-size);
}

#leaderboardList::-webkit-scrollbar-track {
  background: var(--sm-track-color);
  border-radius: 15px;
}

#leaderboardList::-webkit-scrollbar-thumb {
  background: var(--sm-thumb-color);
  border-radius: 15px;
  border: 2px solid #000000;
}

@supports not selector(::-webkit-scrollbar) {
  body,
  #leaderboardList {
    scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
  }
}

/*-----------------------||| HEADER SECTION |||------------------------*/

.topbar {
  padding: 10px 5px 10px 0px;
  /*min-width: 100vw;*/
  width: 100%;
  background: #131313;
  display: flex;
  justify-content: center;
}

.stats {
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.5fr 0.5fr 1fr;
  grid-template-rows: 1fr;
  grid-column-gap: 5em;
  grid-row-gap: 0px;
}

.stats span {
  margin: auto 0px;
  font-family: "Lilita One";
  font-weight: 100;
  font-size: 1.4em;
}
#timer {
  display: inline-block;
  min-width: 5ch; /* enough for 00:00 or even 000:00 */
  font-variant-numeric: tabular-nums; /* equal-width numbers */
}

/*-----------------------||| GAME SECTION |||------------------------*/

#game-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 300px); /* subtract topbar height */
  /*transform-origin: top center;
  transform: scale(1.2);*/
}

#game {
  position: relative;
  display: flex;
  justify-items: center;
  width: 753px;
  height: 700px;
  transform: scale(1.2);
  transform-origin: top center;
}

.card {
  z-index: 0;
  width: 80px;
  height: 120px;
  position: absolute;
  border-radius: 5px;
  overflow: hidden;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.card.interactive:hover,
.card.interactive:hover ~ .card {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
  z-index: 999;
}

.card img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.red {
  color: red;
}

#unlockModal {
  z-index: 1;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1e293b;
  padding: 30px;
  border-radius: 10px;
  width: 300px;
}

.hidden {
  display: none;
}

.foundation-slot {
  width: 80px;
  height: 120px;
  border: 2px dashed rgb(255, 255, 255);
  border-radius: 8px;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0.7;
}

.foundation-slot.filled {
  border: none;
  opacity: 1;
}

/*-----------------------||| BUTTONS |||------------------------*/

button {
  margin: 5px;
  padding: 8px 12px;
  background: #22c55e;
  border: none;
  color: black;
  cursor: pointer;
}

body > header > div > button:nth-child(4) {
  background-color: red;
}

.brutalist-button > .close {
  visibility: visible !important;
}

/*-------- DESKTOP MENU BUTTONS --------*/
/* From Uiverse.io by 0xnihilism */
.brutalist-button {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 169px;
  height: 50px;
  background-color: #00c746;
  color: #fff;
  text-decoration: none;
  font-family: "Lilita One", sans-serif;
  font-weight: normal;
  font-size: 1.4em;
  border: 3px solid #fff;
  outline: 3px solid #000;
  box-shadow: 6px 6px 0 #a754ff;
  transition: all 0.1s ease-out;
  padding: 0 15px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
}

.brutalist-button:nth-child(9) {
  background-color: red;
}

.brutalist-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  z-index: 1;
  transition: none;
  /* Initially hide the pseudo-element */
  opacity: 0;
}

@keyframes slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.brutalist-button:hover::before {
  /* Show the pseudo-element on hover */
  opacity: 1;
  animation: slide 2s infinite;
}

.brutalist-button:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 #000;
  background-color: #000;
  color: #fff;
}

@keyframes slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.brutalist-button:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 #00a4ef;
  background-color: #fff;
  color: #000;
  border-color: #000;
}

.brutalist-button:hover .ms-logo {
  transform: rotate(-10deg) scale(1.1);
}

.brutalist-button:active .ms-logo {
  transform: rotate(10deg) scale(0.9);
}

.button-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  transition: transform 0.2s ease-out;
  position: relative;
  z-index: 1;
}

.brutalist-button:hover .button-text {
  transform: skew(-5deg);
}

.brutalist-button:active .button-text {
  transform: skew(5deg);
}

.button-text span:first-child {
  font-size: 11px;
  text-transform: uppercase;
}

.button-text span:last-child {
  font-size: 16px;
  text-transform: uppercase;
}

button.brutalist-button {
  justify-content: center;
}

/*!!! BUG FIX: btn text while lb active
displays above bg overlay !!!*/

#reset,
#auto-finish {
  z-index: 0;
}

/*-------- MOBILE MENU BUTTONS --------*/

/* From Uiverse.io by Lucaasbre */
.button-menu {
  cursor: pointer;
  position: absolute;
  z-index: 2;
  background-color: #e9ca00;
  border: 3px solid #fff;
  outline: 3px solid #000;
  box-shadow: 6px 6px 0 #a754ff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  -webkit-box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
  -moz-box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
  box-shadow: 0px 3px 10px 0px rgba(16, 16, 16, 0.5);
}

.button-menu::before,
.button-menu::after {
  color: white;
  -webkit-text-stroke: 2px black;
  font-size: 1.3em;
}

.checkbox {
  width: 55px;
  height: 55px;
  opacity: 0;
  z-index: 10;
  cursor: pointer;
}

.option {
  position: absolute;
  background-color: #e9ca00;
  border: 3px solid #fff;
  outline: 3px solid #000;
  color: #000;
  box-shadow: 6px 6px 0 #a754ff;
  z-index: 1;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  font-weight: 700;
  transition: all 0.3s;
  -webkit-box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
  -moz-box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
  box-shadow: 3px 3px 10px 0px rgba(16, 16, 16, 0.5);
}
.option-a {
  background-image: url("images/icons/reset-inverted-icon.png");
  background-size: 60%;
  background-position-y: 11px;
  background-position-x: center;
  background-repeat: no-repeat;
  background-color: red;
}
.option-b {
  background-image: url("images/icons/autocomplete-inverted-icon.png");
  background-size: 80%;
  background-position-y: center;
  background-position-x: center;
  background-repeat: no-repeat;
  background-color: #00c746;
}
.option-c {
  background-image: url("images/icons/leaderboard-mixedcolor-outline-icon.png");
  background-size: 80%;
  background-position-y: center;
  background-position-x: center;
  background-repeat: no-repeat;
  background-color: #0d52ff;
}

.option-d {
  background-image: url("images/icons/card-icon.png");
  background-size: 80%;
  background-position-y: center;
  background-position-x: center;
  background-repeat: no-repeat;
  background-color: #ff8000;
}

.brutalist-button.option-c#leaderboard-button {
  width: 55px;
  height: 55px;
  box-shadow: 6px 6px 0 #757aff;
  justify-self: right;
  align-self: center;
}
.brutalist-button.option-c#leaderboard-button:hover {
  width: 55px;
  height: 55px;
  box-shadow: 6px 6px 0 #000;
  background-color: #0d52ff;
}

.brutalist-button.option-d#card-box-button {
  width: 55px;
  height: 55px;
  box-shadow: 6px 6px 0 #ad5700;
  justify-self: center;
  align-self: center;
}
.brutalist-button.option-d#card-box-button:hover {
  width: 55px;
  height: 55px;
  box-shadow: 6px 6px 0 #000;
  background-color: #ff9225;
  box-shadow: 0 0 20px rgba(255, 208, 0, 0.9);
}

.brutalist-button.option-d#card-box-button:hover::before {
  /* Show the pseudo-element on hover */
  opacity: 1;
  animation: slide 2s infinite;
}

.checkbox:hover ~ .button-menu,
.checkbox:checked ~ .button-menu {
  background-color: #eccd00;
  scale: 0.98;
  box-shadow: none;
}

.checkbox:not(:checked) ~ .button-menu::before {
  content: "+";
}

.checkbox:checked ~ .button-menu::after {
  content: "-";
  scale: 0.98;
  box-shadow: none;
}

.checkbox:not(:checked) ~ .option {
  box-shadow: none;
}

.option:hover,
.option:active,
.option:focus {
  box-shadow: none;
  scale: 0.98;
}

.checkbox:checked ~ .option-a {
  transition-delay: 0.1s;
  transform: translateY(90px);
}

.checkbox:checked ~ .option-b {
  transition-delay: 0.2s;
  transform: translateY(170px);
}

.checkbox:checked ~ .option-c {
  transition-delay: 0.3s;
  transform: translateY(250px);
}

.checkbox,
.option,
.button-menu {
  display: none;
}

.message {
  display: none;
}

/*-----------------------||| LEADERBOARD |||------------------------*/

/*------ LB HEADER -------*/

#win-session {
  font-size: 2.5em;
  margin-bottom: -20px;
  font-family: "Lilita One", sans-serif;
}

#top-players-header {
  margin-bottom: 0.5em;
}

/*------ LB LIST -------*/

#leaderboardList {
  margin-top: -0.5em;
  margin-bottom: 1.3em;
  height: 13em;
  overflow-y: scroll;
}

/*------ INPUT -------*/

#playerName {
  display: grid;
  justify-content: center;
  padding: 8px 10px;
  margin: 0px auto 1em auto;
  border-radius: 20px;
  text-align: center;
  outline: 2px solid #3a4459;
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-size: 1em;
}

.brutalist-button#close,
.brutalist-button#play-again,
.brutalist-button#submit {
  display: grid;
  margin: 10px auto;
}

.brutalist-button#close {
  justify-content: center;
  background-color: #d722b9;
}
.brutalist-button#reset {
  background-color: #ff0000;
  box-shadow: 6px 6px 0 #740000;
  justify-self: center;
  align-self: center;
}
.brutalist-button#auto-finish {
  background-color: #22d725;
  box-shadow: 6px 6px 0 #0f6210;
  justify-self: center;
  align-self: center;
}

.brutalist-button#submit {
  margin-top: 40px;
  background-color: #d77c22;
  box-shadow: 6px 6px 0 #62540f;
}
.brutalist-button#play-again {
  background-color: #22d725;
  box-shadow: 6px 6px 0 #0f6210;
  margin: 20px auto;
}

.brutalist-button#reset:hover {
  background-color: #ff0000;
  box-shadow: 6px 6px 0 #000;
}
.brutalist-button#auto-finish:hover {
  background-color: #22d725;
  box-shadow: 6px 6px 0 #000;
}
.brutalist-button#play-again:hover {
  background-color: #22d725;
  box-shadow: 6px 6px 0 #000;
}
.brutalist-button#submit:hover {
  background-color: #d77c22;
  box-shadow: 6px 6px 0 #000;
}

/*-----------------------||| MEDIA QUERIES |||------------------------*/

@media (max-width: 1400px) {
  #game {
    transform: scale(1.32);
    transform-origin: top center; /* centers horizontally */
  }
}

@media (max-width: 900px) {
  #game {
    transform: scale(1.1);
    transform-origin: top center; /* centers horizontally */
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 7px;
  }
  .checkbox,
  .option,
  .button-menu {
    display: grid;
  }

  .brutalist-button,
  .button-text {
    display: none;
  }
}

@media (max-width: 768px) {
  #game {
    transform: scale(1);
    transform-origin: center; /* centers horizontally */
  }
  .checkbox,
  .option,
  .button-menu {
    visibility: visible;
  }
  .brutalist-button,
  .button-text {
    display: none;
  }
}

@media (max-width: 435px) {
  #game-section {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Ensure the background covers exactly the viewable area */
    background: url("images/multi-bg.jpg") no-repeat center center;
    background-size: cover;
    touch-action: none;
  }
  #game {
    transform-origin: top center;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    padding: 7px 30px 0px 15px;
    font-size: 0.8em;
  }

  .checkbox,
  .option,
  .button-menu {
    display: grid;
  }
  .brutalist-button,
  .button-text {
    display: none;
  }
}

@media (max-width: 405px) {
  #wrapper {
    max-width: 100%;
    scroll-behavior: none;
  }
  #game-section {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Ensure the background covers exactly the viewable area */
    background: url("images/multi-bg.jpg") no-repeat center center;
    background-size: cover;
    touch-action: none;
  }
  #game {
    transform-origin: top center;
    justify-items: center;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    padding: 7px 20px 0px 15px;
    font-size: 0.8em;
  }
  .topbar {
    width: 100%;
  }
  .checkbox,
  .option,
  .button-menu {
    display: grid;
  }
  .brutalist-button,
  .button-text {
    display: none;
  }
}

@media (max-width: 375px) {
  #game {
    transform-origin: top center;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    padding: 7px 20px 0px 15px;
    font-size: 0.8em;
  }
  .topbar {
    width: 100%;
  }
  .checkbox,
  .option,
  .button-menu {
    display: grid;
  }
  .brutalist-button,
  .button-text {
    display: none;
  }
}
