:root {
  --ev-c-white: #ffffff;
  --ev-c-white-soft: #e5e5e5;
  --ev-c-white-mute: #d9d9d9be;

  --ev-c-black: #1b1b1f;
  --ev-c-black-soft: #222222;
  --ev-c-black-mute: #282828;

  --ev-c-gray-1: #515c67;
  --ev-c-gray-2: #414853;
  --ev-c-gray-3: #32363f;

  --ev-c-text-1: rgba(255, 255, 245, 0.86);
  --ev-c-text-2: rgba(235, 235, 245, 0.6);
  --ev-c-text-3: rgba(235, 235, 245, 0.38);
  --ev-c-text-4: rgba(0, 0, 0, 0.86);
  --ev-c-text-5: rgba(45, 45, 45, 0.6);
  --ev-c-text-6: rgba(114, 110, 110, 0.38);

  --ev-button-alt-border: transparent;
  --ev-button-alt-text: var(--ev-c-text-1);
  --ev-button-alt-bg: var(--ev-c-gray-3);
  --ev-button-alt-hover-border: transparent;
  --ev-button-alt-hover-text: var(--ev-c-text-1);
  --ev-button-alt-hover-bg: var(--ev-c-gray-2);
}

:root {
  --color-background: var(--ev-c-black);
  --color-background-soft: var(--ev-c-black-soft);
  --color-background-mute: var(--ev-c-black-mute);

  --color-text: var(--ev-c-text-1);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-background: var(--ev-c-white);
    --color-background-soft: var(--ev-c-white-soft);
    --color-background-mute: var(--ev-c-white-mute);
    --color-text: var(--ev-c-text-4);
    --color-text-soft: var(--ev-c-text-5);
    --color-text-mute: var(--ev-c-text-6);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: var(--ev-c-black);
    --color-background-soft: var(--ev-c-black-soft);
    --color-background-mute: var(--ev-c-black-mute);
    --color-text: var(--ev-c-text-1);
    --color-text-soft: var(--ev-c-text-2);
    --color-text-mute: var(--ev-c-text-3);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

ul {
  list-style: none;
}

body {
  min-height: 100vh;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.6;
  font-size: 16px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue',
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

body {
  height: 100vh;
  width: 100vw;
}
#divideInputBtn {
  display: none;
}
#divideCanvas {
  display: none;
}
#divide {
  justify-content: space-between;
  background-color: var(--color-background-soft);
  flex-direction: row;
  margin-top: 0;
  padding: 0;
}
#app.mobile {
#divide {
    flex-direction: column;
#imgViewer {
      width: 100%;
      height: 50%;
      margin-left: 0;
}
.settings {
      width: 100%;
      height: 50%;
}
}
}

/* @media screen and (min-width: 768px) {
  #divide {
    flex-direction: column;

    #imgViewer {
      width: 60%;
      height: 100%;
      margin-left: 10px;
    }

    .settings {
      height: 100%;
      width: 40%;
      margin-top: 0;
      margin-left: 10px;
    }
  }
} */
#imgViewer {

  width: 60%;
  height: 100%;
  margin-left: 10px;
  display: inline;
  overflow: hidden;
  overflow-x: scroll;
  position: relative;
  display: flex;
  justify-content: start;
  align-items: center;
  flex-shrink: 0;
  scroll-behavior: smooth;
  background-color: var(--color-background);
&::-webkit-scrollbar {
    width: 5em;
    background-color: var(--color-text-mute);
    border-radius: 10px;
}
&::-webkit-scrollbar-thumb {
    background-color: var(--color-background-mute);
    border-radius: 10px;
}
}
.imgContainer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--color-text-mute);
  border-top: 0;
  border-bottom: 0;
}
.imgs {
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
}
.arrow {
  position: fixed;
  top: 30%;
  transform: translateY(-50%);
  font-size: 30px;

  background-color: var(--color-background-mute);
  cursor: pointer;
  border-radius: 50%;

  height: 2em;
  width: 2em;
  display: flex;
  justify-content: center;
  align-items: center;

  transition: all 0.3s ease;

  user-select: none;
&:hover {
    background-color: var(--color-background-soft);
}
}
.leftBtn {
  left: 10px;
}
.rightBtn {
  right: 10px;
}
.settings {
  height: 100%;
  width: 40%;

  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;
  overflow-y: scroll;

  background-color: var(--color-background-soft);
  padding-top: 10px;
  margin-top: 0;
  margin-left: 10px;
&::-webkit-scrollbar {
    width: 0;
}
.tipText {
    color: var(--color-text-mute);
    font-size: 0.9em;
    text-align: center;
}
}
.settingBtns {
  width: 80%;
  height: 3.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  background-color: var(--color-background);

  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  flex-shrink: 0;

  margin-bottom: 10px;
&:hover {
    background-color: var(--color-background-mute);
}
input {
    width: 3em;
    height: 70%;
    margin: 0 10px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    background-color: var(--color-background-soft);
    border: none;
    outline: none;
    color: var(--color-text);
    font-size: 16px;
}
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#puzzleInputBtn,
#puzzleCanvas {
  display: none;
}
#puzzleImgViewer {

  width: 60%;
  height: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  background-color: var(--color-background);
img {
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
}
}
#puzzle {
  justify-content: space-between;
  background-color: var(--color-background-soft);
  flex-direction: row;
  margin-top: 0;
  padding: 0;
}
#app.mobile {
#puzzle {
    flex-direction: column;
#puzzleImgViewer {
      width: 100%;
      height: 60%;
}
.settings {
      height: 40%;
      width: 100%;
      margin-top: 0;
      margin: 0;
}
}
}

/* @media screen and (min-width: 768px) {
  #puzzle {
    flex-direction: column;

    #puzzleImgViewer {
      width: 60%;
      height: 100%;
    }

    .settings {
      height: 100%;
      width: 40%;
      margin-top: 0;
      margin: 0;
    }
  }
} */

body {
  font-size: 16px;
}
.mainContainer {
  width: 100%;
  height: calc(100% - 3.5em);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  padding: 50px;
}
#header {
  width: 100%;
  height: 3.5em;
  background-color: var(--color-background-soft);
  display: flex;
  justify-content: start;
  align-items: center;
  flex-shrink: 0;
  padding: 0 10px;
}
#backBtn,
.btn {
  text-align: center;
  border-radius: 5px;
  background-color: var(--color-background-soft);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;

  margin: 10px 0;

  transition: all 0.3s ease;
&:hover {
    background-color: var(--color-background-mute);
}
}
#backBtn {
  width: 10em;
  height: 80%;
  background-color: var(--color-background);
}
.btn {
  width: 100%;
  height: 5em;
  line-height: 40px;
  font-size: 16px;
}
.loading {
  width: 60%;
  height: 20%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  color: var(--color-text);
  background-color: var(--color-background-soft);

  padding: 30px;
  border-radius: 10px;

  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
@keyframes enterLeft {
from {
    transform: translateX(100vw);
}
to {
    transform: translateX(0);
}
}
@keyframes enterRight {
from {
    transform: translateX(-100vw);
}
to {
    transform: translateX(0);
}
}
@keyframes leaveRight {
to {
    transform: translateX(100vw);
}
}
@keyframes leaveLeft {
to {
    transform: translateX(-100vw);
}
}
#header,
#divide,
#puzzle {
  animation: enterLeft 0.3s ease;
}
#cover {
  animation: enterRight 0.3s ease;
  height: 100%;
}
#header.leave,
#divide.leave,
#puzzle.leave {
  animation: leaveRight 0.3s ease;
}
#cover.leave {
  animation: leaveLeft 0.3s ease;
}
#app.mobile {
#divide,
  #puzzle,
  #cover {
    flex-direction: column !important;
    padding-top: 0;
    padding-bottom: 0;
.introduction {
      margin-right: 0 !important;
      padding-bottom: 10px;
      width: auto !important;
      max-width: 100%;
      border-right: none !important;
      border-bottom: 1px solid var(--color-background-mute);
      height: 60%;
      justify-content: start;
}
.buttonsContainer {
      width: 100% !important;
      max-width: 100%;
      height: max-content;
}
}
}

/* @media screen and (max-width: 768px) {
  #divide,
  #puzzle,
  #cover {
    flex-direction: column !important;
    padding-top: 0;
    padding-bottom: 0;

    .introduction {
      margin-right: 0 !important;
      padding-bottom: 10px;
      width: auto !important;
      max-width: 100%;
      border-right: none !important;
      border-bottom: 1px solid var(--color-background-mute);
      height: 60%;
      justify-content: start;
    }

    .buttonsContainer {
      width: 100% !important;
      max-width: 100%;
      height: max-content;
    }
  }
} */
#divide,
#puzzle,
#cover {
  flex-direction: row;
.introduction {
    margin-right: 10px;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    border-right: 1px solid var(--color-background-mute);
h1 {
      margin-bottom: 20px;
}
p,
    a {
      color: var(--color-text-mute);
      text-align: center;
}
}
.buttonsContainer {
    width: 50%;
}
}
#iconImg {
  max-width: 50%;
  max-height: 50%;
}
.switcher {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-background-mute);
  border: 1px solid var(--color-text);
  margin-left: 10px;
  transition: all 0.3s ease;
&.on {
    background-color: var(--color-text);
}
}
