@font-face {
  font-family: "OpenSans_Regular";
  src: url("./assets/fonts/OpenSans-Regular.ttf");
  font-weight: normal;
}
@font-face {
  font-family: "OpenSans_Bold";
  src: url("./assets/fonts/OpenSans-Bold.ttf");
  font-weight: bold;
}
@font-face {
  font-family: "OpenSans_ExtraBold";
  src: url("./assets/fonts/OpenSans-ExtraBold.ttf");
  font-weight: bolder;
}
@font-face {
  font-family: "Cinzel";
  src: url("./assets/fonts/cinzel.black.ttf");
  font-weight: bold;
}

:root {
  --clr-bg: #000;
  --clr-layer: #3c3c3c;
  --clr-primary: #ab9c6b;
  --clr-accent: #ffcd3f;
  --clr-border-3: #fffbdd;
  --clr-border-2: #636e86;
  --clr-text-invers: #3f3f3f;
  --clr-slider: #d0c374;
  --font-options-base: 1.5rem;
}

*:not(input, textarea) {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
body {
  color-scheme: dark;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.87);
  background-color: var(--clr-bg);
  font-family: "OpenSans_Regular";
  touch-action: manipulation;
}

p {
  margin: 0;
}
button {
  appearance: none;
  margin: 0;
  padding: 0;

  border: 0;

  &:not(:disabled) {
    cursor: pointer;
  }
}
select {
  &:not(:disabled) {
    cursor: pointer;
  }
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.folder {
  padding: 0 1rem;
}
.folder-text {
  background: #ffffff1c;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  color: white;
  padding: 0.5rem 1rem;
  font: 32px Cinzel;

  mask: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 80%,
    rgba(0, 212, 255, 0) 100%
  );
}

.card {
  position: relative;
  cursor: pointer;

  border-radius: 1rem;
  background: #000000a1;

  font: 32px OpenSans_Bold;

  padding: 1rem;

  outline: 2px solid #16191a;
  outline-offset: 5px;

  &:hover {
    outline-color: var(--clr-border-3);
  }
}
.level-card {
  height: 60px;
  min-width: 60px;

  text-align: center;
}

.level-card--mechanic {
  flex: 1;
  height: 200px;
}

/* .level-container {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-direction: column;
} */

.level-container {
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-column-gap: 16px;
  grid-row-gap: 16px;
}

.folder-card[data-folder="default"] {
  grid-area: 1 / 1 / 2 / 7;
}
.folder-card[data-folder="custom"] {
  grid-area: 1 / 7 / 2 / 13;
}
.folder-card[data-folder="tools"] {
  grid-area: 2 / 1 / 3 / 5;
}
.folder-card[data-folder="portals"] {
  grid-area: 2 / 5 / 3 / 9;
}
.folder-card[data-folder="timed"] {
  grid-area: 2 / 9 / 3 / 13;
}
.folder-card[data-folder="advanced"] {
  grid-area: 3 / 1 / 4 / 10;
}
.folder-card[data-folder="import"] {
  grid-area: 3 / 10 / 4 / 13;
}

.folder-container {
  width: 1000px;
  overflow: auto;
  max-height: 100%;
}

.folder-card {
  --border-radius: 1rem;
  display: flex;
  flex-grow: 1;
  .text {
    position: absolute;
    inset: 0;
    display: flex;
    flex: 1;
    padding: 0.25rem;

    font-size: 2.5rem;
    font-family: "Cinzel", Georgia, serif;
    font-weight: 900;
    text-shadow: 0px 0px 1rem var(--clr-accent);

    border-radius: var(--border-radius);
    place-self: center;
  }
}

.folder-card .folder__progress {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 1rem;
  background: #3c3d3d;
  /* color: #000; */
  font-size: 24px;

  border-radius: 1rem 0 1rem 0;
}

.folder-card__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;

  outline: 4px solid #747b7e;
  outline-offset: -4px;

  border-radius: var(--border-radius);
  transition: 0.3s;

  filter: grayscale(80%);
}

.folder-card:hover .folder-card__img {
  transition: 0.3s;

  filter: grayscale(0%);
}

.folder-card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #00000080;
  border-radius: var(--border-radius);
}

.folder-card[data-folder="tools"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgTools.webp") no-repeat;
    background-position: center;
  }
}
.folder-card[data-folder="default"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgDefault.webp") no-repeat;
    background-position: center;
  }
}

.folder-card[data-folder="portals"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgPortals.webp") no-repeat;
    background-position: center;
  }
}
.folder-card[data-folder="custom"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgCustom.webp") no-repeat;
    background-position: center;
  }
}
.folder-card[data-folder="timed"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgTimed.webp") no-repeat;
    background-position: center;
  }
}
.folder-card[data-folder="advanced"] {
  .folder-card__img {
    background: url("./assets/textures/levelBg/bgAdvanced.webp") no-repeat;
    background-position: center;
  }
}

.folder-row {
  display: flex;
  gap: 1rem;
}
.level-card.cleared:not(:hover) {
  background-color: var(--clr-accent);
  outline-color: var(--clr-primary);
}
.level-card .text {
  color: white;
  place-self: center;
  position: absolute;
  inset: 0;
}
.level-card:hover {
  background-color: #fff;
  opacity: 1;
}
.level-card:hover .text {
  color: #000;
}

.container {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
  font-size: 24px;
  overflow: auto;
  color: #121212;
}

.folder .container {
  padding: 1rem 2rem;
  gap: 2rem;
}

.menu-options {
  display: flex;
  flex-direction: column;

  .category {
    margin: 0;
    background-color: #fff;
    color: #121212;
    padding: 1rem;
    font-family: "OpenSans_Bold";
  }

  .options-text {
    margin: 1rem 0;
    text-align: center;
  }
  .colors-container {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
  }

  input[type="checkbox"] {
    height: 30px;
    width: 30px;
  }
}

input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  padding: 0;
  width: 120px;
  height: 60px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid white;
  border-radius: 5px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
}

.option-tab__button {
  height: 60px;
  width: 200px;
  font: 28px OpenSans_Bold;
  background: #121212;

  &.active {
    background-color: #333;
  }

  &:hover {
    background-color: #fff;
    color: #000;
  }
}

.option-tab {
  border-top: 3px solid #333;
  position: absolute;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: all 100ms ease-in-out;
  width: calc(100% - 2rem);
}

.option-tab.active {
  border-top: 3px solid #333;
  display: flex;
  opacity: 1;
}

.colors {
  --border-radius: 5px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  border-radius: var(--border-radius);

  .selector {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;

    .selector__index {
      position: relative;
      width: 50px;
      height: 50px;
      background: #dadee2;
      border: 3px solid #333;
      border-radius: var(--border-radius);
      display: flex;
      align-content: center;
      flex-wrap: wrap;
      justify-content: center;
      outline: 3px solid var(--clr-border-3);
      outline-offset: 4px;

      &::before {
        content: "";
        width: 100%;
        height: 50%;
        background: #f7fafe;
        position: absolute;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
      }
    }

    .selector__name {
      font-size: 32px;
      text-align: center;
      height: 50px;
      background: transparent;
      border: 3px solid #333;
      border-radius: var(--border-radius);
      max-width: 300px;
    }
  }
  .selector:not(:last-child) {
    border-bottom: 3px solid #333;
  }
  .selector:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

.selector__index span {
  z-index: 1;
  color: var(--clr-text-invers);
  font: 24px "OpenSans_Bold";
}

.primary-btn {
  max-height: 100px;
  max-width: 650px;
  border-radius: 20px 0;
  background: url("./assets/textures/uiatlas.webp") -70px 0;
  color: #000;
  font: 32px OpenSans_Bold;
  padding: 1rem;

  &:hover {
    outline: 2px solid #b4b4b4;
    outline-offset: -10px;
    color: #292929;
  }
}

.select-wrapper {
  position: relative;
  display: flex;
  min-width: 300px;
}
.select select {
  appearance: none;
  flex: 1;
  padding: 1rem;
  text-align: center;
  border-radius: var(--border-radius);
  font-size: 20px;
  color: #ebe5d7;
  min-width: 200px;
  font-family: "OpenSans_Regular";

  &:active {
    color: var(--clr-text-invers);
    background: #d8d8d8;
  }
}

.select .icon {
  position: absolute;
  mask: no-repeat
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
  height: 20px;
  width: 20px;
  background: #fce395;
  right: 14px;
  top: 0;
  bottom: 0;
  margin: auto;
}

.select {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .select__label {
    font: var(--font-options-base) OpenSans_Bold;
  }
}

.option-folder {
  --border-radius: 5px;

  margin: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1 0 0;

  .folder-content__item {
    border-radius: var(--border-radius);
    font-size: var(--font-options-base);

    background: #000000a1;
    padding: 1rem;
    outline: 2px solid #16191a;
    outline-offset: 5px;

    &:hover {
      outline-color: var(--clr-border-3);
    }
  }
}
.option-folder__content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.block-title,
.option-folder__title {
  background: #ffffff1c;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  color: white;
  padding: 0.5rem 1rem;
  mask: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
}
.folder-title {
  position: relative;
}
.folder-title__text {
  width: fit-content;

  margin: 0;
}

.folder-title__text:has(+ .folder-title__icon) {
  margin-left: 3rem;
}

.folder-title__icon {
  position: absolute;
  left: 0;
  height: 32px;
  width: 32px;
  top: 0;
  bottom: 0;
  margin: auto 1rem;
}

.folder-title__icon[icon="lang"] {
  background: no-repeat url("./assets/textures/icons/www.webp");
  background-size: contain;
}

.block-title {
  font: 40px Cinzel;
  text-align: center;
  mask: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(255, 255, 255, 1) 25%,
    rgba(255, 255, 255, 1) 75%,
    rgba(0, 0, 0, 0) 100%
  );
}

.value-selector {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-options-base);

  .value-selector__label {
    font-family: "OpenSans_Bold";
  }

  .value-selector__input-wrapper {
    display: flex;
    align-items: center;
    background: var(--clr-layer);
    border-radius: 100px;
    min-width: 200px;

    .value-selector__value {
      padding: 0 1rem;
      flex: 1;
      color: #fff;
      text-align: center;
    }

    .value-selector__button {
      position: relative;
      background: white;
      width: 40px;
      height: 40px;
      border-radius: 100%;
      outline: 2px solid #d8d8d8;
      outline-offset: -6px;

      .icon {
        height: 30px;
        width: 30px;
        mask: no-repeat
          url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
        background: #000;
        background-size: contain;
        background-position: center;
        margin: auto;
        rotate: -90deg;
      }

      &:disabled {
        scale: 0.9;
        background: #757573;
        outline-color: #888;

        .icon {
          background: var(--clr-layer);
        }
      }

      &:hover:not(:disabled) {
        box-shadow: 0 0 0 5px #c1b166;

        .icon {
          background: #c1b166;
        }
      }
    }

    .value-selector__button--left .icon {
      rotate: 90deg;
    }
  }
}

.main-menu {
  height: 100%;
  margin-left: 4rem;
  border-left: 4px solid #444444;
}
.menu-btn {
  position: relative;
  height: 110px;
  width: 380px;
  display: flex;
  align-items: center;
  border-radius: 0 50px 50px 0;
  margin-right: 1rem;

  &:hover {
    .menu-btn__bg {
      inset: 0;
      border: 2px solid white;
      box-shadow: 0 0 10px 10px white;
    }
  }

  .menu-btn__text {
    padding: 1rem;
    margin: 0 auto;
    font: 32px Cinzel;
    text-align: center;
    border-left: 2px solid #6d6d6d;
  }
}

.main-menu__bg,
.menu-btn__bg {
  z-index: -1;
  position: absolute;
  background: #000000;
  border-radius: 0 50px 50px 0;

  inset: 0;
  mask: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}
.menu-btn__bg {
  background: #121212;
  mask: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 10%,
    rgba(255, 255, 255, 1) 20%
  );
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-item {
  display: flex;
  padding: 1rem;
  justify-content: space-between;
  background-color: #000000a1;
}

.preview-item-cleared {
  background-color: var(--clr-accent);
  text-align: center;
  font: 32px Cinzil;
}

.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #000000a1;
}
.wrapper.results-screen__wrapper,
.wrapper.export-wrapper {
  flex-direction: column;
}
.wrapper.export-wrapper {
  align-items: normal;
  justify-content: inherit;
}

.result-screen {
  width: 100%;
  z-index: 1;
  opacity: 0;
  animation: moveUp 0.5s ease-out forwards;

  .result-screen__cleared {
    position: relative;

    .cleared-bg {
      z-index: -1;
      position: absolute;
      inset: 0;
      background-color: color-mix(in srgb, var(--clr-accent) 50%, transparent);
      mask: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 25%,
        rgba(255, 255, 255, 1) 75%,
        rgba(255, 255, 255, 0) 100%
      );
    }

    font: 4rem Cinzel;
    text-align: center;
    text-shadow: 0 0 2px var(--clr-accent);
    box-shadow: 0 -2px 10px 0 #a5a5a5;
  }
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  background-color: #444;
  color: #fff;
  border-radius: 1rem;
}

.tab-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tab:hover {
  background-color: #555;
}
.tab.active {
  background-color: white;
  color: black;
}

.timed-cell-turn {
  width: 50px;
  height: 50px;
  text-align: center;
}

.results {
  gap: 1rem;
  display: flex;
  flex-direction: column;
}

.results,
.results_buttons {
  min-width: 400px;
  place-self: center;
  margin: 1rem;
}

.results_buttons,
.import-block__btns {
  display: flex;
  gap: 1rem;
}

.results__item {
  display: flex;
  padding: 1rem;
  justify-content: space-between;
  background-color: #000000a1;
}

.import-block {
  flex-direction: column;
  background: #00000038;

  align-items: stretch;
  justify-content: stretch;

  .option-folder {
    flex-grow: 0;
  }
}

.import-block__text {
  width: 100%;
  height: 800px;
  font: 32px OpenSans_Regular;
  box-sizing: border-box;
}

.export-wrapper .primary-btn {
  max-width: 600px;
}

.export-wrapper .option-folder {
  width: calc(100% - 1rem);
  margin: 0 0 0 10px;
  flex-grow: 0;
}

.export__base {
  width: 100%;
  max-width: 100%;
  height: 250px;
  resize: none;
  overflow: auto;
  background: #3b3b3b;
  border: 0;
  padding: 0;
  font-size: 32px;
}
.export__json {
  overflow: auto;
  height: 250px;
  width: 100%;
  background: #3b3b3b;
  margin: 0;
}

.range-slider {
  --border: 50px;
  position: relative;
  min-width: 400px;
  gap: 1rem;
  align-items: center;

  display: flex;
}

.range-slider__input {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  flex: 1;
  transition: background 0.3s ease-in-out;
  border-radius: 50px;
  height: 15px;
  background: linear-gradient(to right, var(--clr-slider) 50%, transparent 50%);
}

.range-slider__input::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  height: 10px;
  z-index: -1;
  margin: auto;
  border-radius: var(--border);
  background: #a2a2a2;
}

.range-slider__value {
  min-width: 50px;
  padding: 0 1rem;
  font: 26px OpenSans_Bold;
}

.range-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 40px;
  border-radius: var(--border);
  background: white;
  cursor: pointer;
}

.range-slider__input::-moz-range-thumb {
  width: 20px;
  height: 40px;
  background: white;
  border-radius: var(--border);
  cursor: pointer;
}

.switch-container {
  background-color: #333;
  margin: 0 1rem;
  border-radius: 999px;
  display: flex;
  justify-content: center;
}

input[type="radio"] {
  appearance: none;
}

.switch__option {
  margin: 1rem;
  background-color: #666;
  font: 32px OpenSans_Bold;
  display: flex;
  flex: 1;
  text-align: center;
  justify-content: center;
  border-radius: 999px;

  &:hover {
    cursor: pointer;
    color: var(--clr-accent);
  }
}

.switch__option:has(input:checked) {
  background-color: #fff;
  color: #121212;
}

@keyframes moveUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tutorials {
  display: flex;
  width: 100%;
  height: 100%;
  font-family: sans-serif;
  color: #eee;
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 350px;
  padding: 1rem;
  box-sizing: border-box;
  border-right: 1px solid #444;
}

.topic {
  cursor: pointer;
}

.topic:hover {
  background: #444;
}

.content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.content h2 {
  margin-top: 0;
  font-size: 20px;
}

.tutorial-img {
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid #555;
  padding-bottom: 1rem;
  background-color: #1f1d1b;
  border-radius: 4px;
}
.tutorials p {
  margin: 0 0 10px;
  line-height: 1.5;
  color: #ddd;
}

.tutorials ul {
  padding-left: 20px;
  margin: 0 0 10px;
}

.tutorials li {
  margin-bottom: 6px;
}

.tutorial-img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #555;
  margin-top: 10px;
}

.checkbox-container {
  display: flex;
  justify-content: space-between;
  font-family: "OpenSans_Bold";

  input[type="checkbox"] {
    width: 40px;
    height: 40px;
  }
}
