* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-primary-color);
  color: var(--text-primary-color);
}

main {
  width: 100%;
}

main section {
  width: 100%;
  padding: var(--padding-2xl);
  display: flex;
  gap: var(--gutter-lg);
}

.btn {
  padding: var(--padding-sm) var(--padding-lg);
  border: none;
  outline: none;
  border-radius: var(--border-radious-md);
  background-color: var(--bg-active-color);
  cursor: pointer;
  color: var(--text-active-color);
}

#reset-btn {
  background-color: var(--bg-danger-color);
  color: var(--text-primary-color);
}

#download-btn {
  background-color: var(--bg-success-color);
  color: var(--text-primary-color);
}

main section .left {
  display: flex;
  flex-direction: column;
  gap: var(--gutter-lg);
  width: 70%;
  align-items: center;
}

main section .right {
  width: 30%;
  background-color: var(--bg-secondary-color);
  padding: var(--padding-lg);
  border-radius: var(--border-radious-lg);
  display: flex;
  flex-direction: column;
  gap: var(--gutter-md);
  height: calc(100vh - 6rem);
  overflow: hidden;
}

main section .top {
  display: flex;
  gap: var(--gutter-md);
}

main section .bottom {
  background-color: var(--bg-secondary-color);
  width: 100%;
  padding: var(--padding-2xl);
  aspect-ratio: 5.6 / 3;
  border-radius: var(--border-radious-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

main section .bottom .placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.6;
  gap: var(--gutter-md);
}

main section .bottom .placeholder i {
  font-size: 10rem;
}

main section .bottom .placeholder p {
  font-size: var(--font-size-lg);
}

main section .right .filters {
  display: flex;
  flex-direction: column;
  gap: var(--gutter-md);
}

main section .right .filter input {
  width: 100%;
  outline: none;
  appearance: none;
  margin-top: var(--margin-md);
}

main section .right .filter input::-webkit-slider-runnable-track {
  background-color: var(--bg-active-color);
  height: 3px;
  border-radius: 2px;
}

main section .right .filter input::-webkit-slider-thumb {
  cursor: pointer;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: red;
  margin-top: -8.5px;
}

canvas {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: none;
}

.filters-section {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.filters-section::-webkit-scrollbar {
  width: 6px;
}

.filters-section::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.presets-section {
  position: sticky;
  bottom: 0;
  background-color: var(--bg-secondary-color);
  padding-top: var(--padding-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.presets {
  display: flex;
  gap: var(--gutter-md);
  flex-wrap: wrap;
  margin-top: var(--margin-sm);
}

.right h2 {
  margin-bottom: var(--margin-md);
  user-select: none;
  cursor: default;
}

.filter p {
  user-select: none;
  cursor: default;
}

@media (max-width: 1024px) {
  main section {
    padding: var(--padding-lg);
  }

  main section .left {
    width: 60%;
  }

  main section .right {
    width: 40%;
  }

  canvas {
    max-height: 65vh;
  }
}

@media (max-width: 768px) {
  main section {
    flex-direction: column;
    gap: var(--gutter-lg);
  }

  main section .left,
  main section .right {
    width: 100%;
  }

  main section .bottom {
    aspect-ratio: auto;
    padding: var(--padding-lg);
  }

  canvas {
    max-width: 100%;
    max-height: 50vh;
  }

  main section .right {
    height: auto;
    max-height: none;
  }

  .filters-section {
    max-height: 40vh;
  }

  .presets {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .top {
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .presets {
    gap: var(--gutter-sm);
  }
}
