/* ---08 white-space  */
/* 2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128 */
/* ----02 Font size system:
 10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

/* */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*:focus-visible {
  outline-offset: 5px;
  outline: 2px dashed var(--main-color);
}

*::selection {
  color: var(--selection-text-color);
  background-color: var(--selection-background-color);
}

html {
  font-size: 62.5%;
}

:root {
  --main-color: #2d3436;
  --title-border: #95a5a6;
  --main-background: #b9c4d1;
  --header-gradient-end: #e17055;
  --selection-text-color: #dfe6e9;
  --header-gradient-start: #0984e3;
  --button-gradient-start: #6c5ce7;
  --image-container-shadow: #94a3b8;
  --selection-background-color: #6c5ce7;
}

body {
  height: 100vh;
  line-height: 1;
  position: relative;
  font-weight: normal;
  flex-direction: column;
  justify-content: space-between;
  font-family: "Fredoka", sans-serif;
  background-color: var(--main-background);
}

.center {
  text-align: center;
}

.scissor {
  width: 2.4rem;
  height: 2.4rem;
  fill: var(--main-color);
}

.game-name {
  font-weight: 500;
  font-size: 1.4rem;
  font-family: inherit;
  letter-spacing: 0.5px;
  color: var(--main-color);
}

body,
.title,
.first-col,
.second-col {
  display: flex;
}

.title {
  gap: 0.6rem;
  padding: 0.8rem;
  align-items: center;
}

.heading {
  display: flex;
  justify-content: space-between;
}

.dark-mode {
  gap: 0.6rem;
  border: none;
  display: flex;
  margin: 0.8rem;
  cursor: pointer;
  color: #f1f5f9;
  font-weight: 6000;
  font-size: 1.8rem;
  border-radius: 9px;
  padding: 1rem 2rem;
  align-items: center;
  transition: all 0.3s;
  background-color: #1e293b;
  font-family: "Fredoka", sans-serif;
}

.dark-mode:active {
  transform: translateY(5px);
}
.moon,
.sun {
  width: 2rem;
  height: 2rem;
  stroke: #e2e8f0;
}

.invisible {
  opacity: 0;
  display: none;
  pointer-events: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

h1 {
  font-weight: 540;
  font-size: 3.4rem;
  color: transparent;
  letter-spacing: 0.5px;
  margin: 2rem 0 1.6rem 0;
  background: linear-gradient(
    to right,
    var(--header-gradient-start),
    var(--header-gradient-end)
  );
  background-clip: text;
  -webkit-background-clip: text;
}

/* This is the Result Template Box */
.result {
  font-size: 2rem;
  min-width: 10rem;
  border-radius: 3px;
  display: inline-block;
  padding: 0.8rem 1.6rem;
  color: #f1f2f6; /* Default white-grey text */
  background-color: #535c68; /* Deep Blue-Grey background for better contrast */
}

.grid {
  display: grid;
}

.two-grid-col {
  row-gap: 1.2rem;
  grid-template-columns: repeat(2, 1fr);
}

section {
  max-width: 80rem;
  column-gap: 9.6rem;
  justify-items: center;
  margin: 4.4rem auto 3.2rem auto;
}

img {
  width: 100%;
  border: none;
  border-radius: 5px;
}

.image-container {
  width: 80%;
  display: flex;
  border-radius: 2px;
  align-items: center;
  justify-content: center;
}

.to-top-icon {
  opacity: 0;
  width: 4.6rem;
  display: none;
  height: 4.6rem;
  color: #2d3436;
  stroke-width: 2px;
  border-radius: 50%;
  pointer-events: none;
}

.to-top-container {
  top: 50%;
  gap: 0.2rem;
  right: 1rem;
  display: flex;
  position: fixed;
  flex-direction: column;
  transform: translateY(-50%);
}

.first-col,
.second-col {
  gap: 4rem;
  align-items: center;
}

body,
.first-col,
.second-col {
  flex-direction: column;
}

:where(.first-col, .second-col) p {
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.8px;
  color: var(--main-color);
  text-transform: uppercase;
}

.first-col {
  animation: moveInLeft 1.05s ease-in-out;
}

.second-col {
  animation: moveInRight 1.05s ease-in-out;
}

.button {
  width: 20%;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.5rem;
  padding: 1rem 2rem;
  border-radius: 5px;
  grid-column: span 2;
  transition: all 0.35s;
  color: #dfe6e9;
  animation: moveInBottom 1.05s ease-in-out;
  background: linear-gradient(145deg, #0984e3, #74b9ff);
}

@media (hover: hover) {
  :where(.button):hover {
    letter-spacing: 1.5px;
    filter: brightness(1.1);
  }

  :where(.reset):hover {
    color: #dfe6e9 !important;
    background-color: var(--main-color) !important;
  }
}

:where(.button):active {
  filter: brightness(0.9);
}

.buttons {
  width: 100%;
  gap: 1.8rem;
  display: flex;
  margin-top: 5rem;
  grid-column: span 2;
  justify-content: center;
}

.reset {
  width: 20%;
  border: none;
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.5rem;
  border-radius: 5px;
  margin-top: 0.8rem;
  grid-column: span 2;
  transition: all 0.35s;
  color: var(--main-color);
  background-color: transparent;
  animation: moveInBottom 1.05s ease-in-out;
  box-shadow: inset 0 0 0 2px var(--main-color);
}

:where(.reset):active {
  opacity: 0.75;
}

footer {
  padding: 1rem 0;
  font-size: 1.2rem;
  color: var(--main-color);
  border-top: 1px solid var(--title-border);
}

footer,
.header,
.title {
  animation: moveInTop 1.05s ease-in-out;
}

@media (max-width: 53.5em) {
  html {
    font-size: 56.25%;
  }

  .title {
    justify-content: center;
  }

  .reset {
    width: 26%;
  }

  h1 + p {
    width: 22.5%;
  }
}

@media (max-width: 41em) {
  section {
    column-gap: 6rem;
  }

  .image-container {
    width: 95%;
  }

  section {
    padding: 0 1.4rem;
  }

  h1 {
    margin-top: 1.8rem;
  }

  .reset {
    width: 35%;
    margin-top: 0;
  }

  .button {
    width: 35%;
  }

  .buttons {
    gap: 1rem;
    padding: 0 0.6rem;
  }

  h1 + p {
    width: 25%;
  }
}

@media (max-width: 26.9em) {
  .grid {
    display: flex;
    margin-top: 1.4rem;
    align-items: center;
    padding-top: 0.8rem;
    margin-bottom: 1.8rem;
    flex-direction: column;
  }

  .dark-mode {
    padding: 0.8rem 1.2rem;
    font-size: 1.6rem;
  }

  .sun,
  .moon {
    height: 2rem;
    width: 2rem;
  }

  .buttons {
    padding: 0;
    margin-top: 1rem;
    align-items: center;
    flex-direction: column;
  }

  .to-top-icon {
    opacity: 1;
    display: block;
    pointer-events: auto;
  }

  .button {
    width: 45%;
  }

  .second-col {
    margin-top: 1rem;
  }

  .first-col,
  .second-col {
    gap: 1rem;
  }

  .image-container {
    width: 70%;
    box-shadow: none;
    border-radius: 0;
  }

  .reset {
    width: 45%;
  }

  h1 + p {
    width: 30%;
  }
}

@media (max-width: 20.75em) {
  .reset {
    width: 50%;
  }

  h1 {
    font-size: 2.6rem;
  }

  h1 + p {
    width: 35%;
    font-size: 1.2rem;
  }
}

/* */
/* */
/* animations */

@keyframes moveInLeft {
  0% {
    opacity: 0;
    transform: translateX(-9.6rem);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes moveInBottom {
  0% {
    opacity: 0;
    transform: translateY(6.4rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes moveInRight {
  0% {
    opacity: 0;
    transform: translateX(9.6rem);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes moveInTop {
  0% {
    opacity: 0;
    transform: 1;
  }

  100% {
    opacity: 1;
  }
}
