/* Copyright (c) 2026 by Voicu Apostol (https://codepen.io/cerpow/pen/LEZYxqM) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* background-color: #111317; */
  background-color: #b1b3c0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  min-height: 100svh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  overflow: hidden;
  text-align: center;
  line-height: 1.8;
  min-width: 380px;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  min-height: 100svh;
  width: 100%;
  margin: 0 auto;
  /* padding: 20px; */
}

h1 {
  position: relative;
  font-size: 17px;
  font-weight: 450;
  /* text-transform: uppercase; */
  /* letter-spacing: 1.6px; */
  letter-spacing: -0.01em;
  color: #464e60;
}

h1 span {
  display: inline-flex;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  min-width: 380px;
  aspect-ratio: 4/3;
  /* margin-bottom: -2vw */
  /* margin-bottom: clamp(20px, 5vw, 40px); */
}

canvas {
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 100;
  transition: opacity 1.1s ease, transform 1.3s ease;
  transform: translate3d(0px, 0px, 0px) scale3d(0.92, 0.92, 1) !important;
  border-radius: clamp(22px, 6vw, 42px);
  opacity: 0;
}

.drag-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -49%);
  width: 56%;
  height: 52%;
  border-radius: 999px;
  cursor: grab;
  z-index: 101;
  /* background-color: rgba(255, 0, 0, 0.3); */
}

.drag-trigger:active {
  cursor: grabbing;
}

canvas.fadeIn {
  opacity: 1;
  transform: scale3d(1, 1, 1) !important;
}

.loader {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.2);
  width: 90%;
  max-width: 150px;
  height: 2px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loader.hide {
  opacity: 0 !important;
  visibility: 0 !important;
}

.loader span {
  display: flex;
  background-color: white;
  height: 100%;
  -webkit-animation: loader 1.3s infinite alternate ease-in-out;
  animation: loader 1.3s infinite alternate ease-in-out;
  width: 25%;
}

@-webkit-keyframes loader {
  0% {
    opacity: 0;
    transform: translateX(0%);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(300%);
  }
}
@keyframes loader {
  0% {
    opacity: 0;
    transform: translateX(0%);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(300%);
  }
}
.bottom-controls {
  position: absolute;
  bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.3s ease;
  transition-delay: 400ms;
}

.bottom-controls.fadeIn {
  opacity: 1;
}

.controls-container {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

@media (hover: none) and (pointer: coarse) {
  .controls-container {
    display: none !important;
  }
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: #464e60;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark-icon {
  position: relative;
  height: 16px;
  width: 16px;
  border: 1.5px solid #464e60;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.checkmark-icon:after {
  content: "";
  position: absolute;
  display: none;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark-icon {
  background-color: #464e60;
}

.checkbox-label input:checked ~ .checkmark-icon:after {
  display: block;
}