.roboto-regular {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.roboto-bold {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-style: normal;
}

body {
  /* reset */
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  width: 100vw;

  background-color: dimgray;
}

input,
button,
select,
textarea,
optgroup,
option {
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
}
/* default components styling */

button {
  background-color: #2196f3;
  cursor: pointer;
  color: black;
}

button:not([disabled]):active {
  background-color: #0e7cd6;
}

/* Disable blue highlight on button click */
button {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

button:disabled {
  background-color: #999999;
  border-color: #404040;
  color: #404040;
}

/* helpers */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

[hidden] {
  display: none !important;
}

/* ------ */
.cell-grid {
  display: grid;
  grid-template-columns: repeat(pow(var(--cellCount), 0.5), 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;

  /* width: 100vmin; */
  height: 100vmin;
  aspect-ratio: 1 / 1;

  border: 0.1rem solid black;
  box-sizing: border-box;
  background-color: white;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2rem;

  border: 0.1rem solid black;

  cursor: pointer;
}
.cell:after {
  content: attr(data-number);
}

.cell.checked {
  color: gray;
  background-color: gainsboro;
}

.timer {
  color: white;
}

.timer-block {
  font-size: 4rem;
  line-height: 4rem;

  animation: floating 500ms ease-in-out infinite alternate;
}

.blur-1 {
  filter: blur(0.1rem);
  opacity: 0.7;
}

.blur-2 {
  filter: blur(0.3rem);
  opacity: 0.5;
}

.blur-1 *,
.blur-2 * {
  pointer-events: none;
}

.overlay {
  position: fixed;

  top: 0;
  left: 0;

  bottom: 0;
  right: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  gap: 1rem;
  padding: 1rem;
}

.popup,
button {
  padding: 1rem;

  font-size: 2rem;

  border-radius: 0.5rem;
  border: 0.2rem solid black;

  box-shadow: 0.3rem 0.3rem #0000002e;
}

button {
  line-height: 2rem;
}

button.btn-small {
  font-size: 1rem;
  line-height: 1rem;
  padding: 0.5rem;
}

button:disabled > .label-enabled {
  display: none;
}
button:not([disabled]) > .label-disabled {
  display: none;
}

div.popup {
  max-height: 100vh;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;

  background-color: white;
}

.popup > p {
  font-size: 2.5rem;
  padding: 0;
  margin: 0;
  text-align: center;

  border-bottom: 0.3rem solid #c9c9c9;
  padding-bottom: 0.3rem;
}

.hi-scores {
  font-size: 2rem;
  border-collapse: collapse;
  width: 100%;
}

.hi-scores-popup {
  overflow: hidden;
  flex-shrink: 0;
}

.hiScores-avatar {
  position: relative;
  font-size: 5rem;

  line-height: 5rem;
  height: 5rem;
}

td {
  padding-right: 0.3rem;
  text-align: right;
}

td.lb-date {
  font-size: 1rem;
  width: 6rem;
}

/* -------------- */

/* 
.hiScores-avatar:after {
  content: "👑";
  top: 0;
  position: absolute;
  left: 0;
  font-size: 4rem;
  right: 0;
  text-align: center;
  margin-top: -2rem;
} */

.score-text {
  font-size: 1.5rem;
}

.score-value {
  font-size: 2rem;
}

.table-container {
  overflow: scroll;
}

thead {
  position: sticky;
  top: 0;
  background: #ffffffe8;
  z-index: 1;
}

/* rank 1,2,3 */
.hi-scores tbody tr:nth-child(1) .lb-rank,
.hi-scores tbody tr:nth-child(2) .lb-rank,
.hi-scores tbody tr:nth-child(3) .lb-rank {
  position: relative;
  /* hide number */
  color: transparent;
}

.hi-scores tbody tr:nth-child(1) .lb-rank:after,
.hi-scores tbody tr:nth-child(2) .lb-rank:after,
.hi-scores tbody tr:nth-child(3) .lb-rank:after {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;

  color: black;
}

.hi-scores tbody tr:nth-child(1) .lb-rank:after {
  content: "🥇";
}
.hi-scores tbody tr:nth-child(2) .lb-rank:after {
  content: "🥈";
}
.hi-scores tbody tr:nth-child(3) .lb-rank:after {
  content: "🥉";
}

/* ------------- */
.current-user {
  background-color: #ffd90080;
}

.current-score {
  background-color: #ffd900;
}
/* ------------- */

.settings {
  font-size: 2rem;
}

.settings-block-title {
  font-size: 2rem;
}

.settings-avatar {
  font-size: 3rem;
}

.difficulty-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;

  font-size: 2rem;
}

/* ------------- */
.splash {
  color: white;
}

.loader {
  width: 10rem;
  height: 10rem;
}

.splash-title-1 {
  font-size: 2rem;
}

.splash-title-2 {
  text-transform: capitalize;
  font-size: 4rem;
  line-height: 3rem;
}

.splash-loading {
  font-size: 2rem;
  padding: 2rem;
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

:root {
  --floating-shift: 0.2rem;
}

@keyframes floating {
  from {
    transform: translateY(0rem);
    text-shadow: 0 0rem 0rem black;
  }
  to {
    transform: translateY(calc(-1 * var(--floating-shift)));
    text-shadow: 0 var(--floating-shift) var(--floating-shift) black;
  }
}

.avatar-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;
  font-size: 3rem;

  overflow-y: scroll;
}

.avatar {
  position: relative;
  width: 4rem;
  height: 4rem;
  line-height: 4rem;
  appearance: none;
  margin: 0;
  text-align: center;
}

.avatar::after {
  content: attr(data-value);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;

  transition: all ease-in-out 300ms;
}

.avatar:checked::after {
  transform: translateY(-0.2rem);
  text-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.8);
}

.avatar:checked::before {
  content: "";
  box-shadow: inset 0 0 0 2rem gold;
  border-radius: 1rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
