@font-face {
  font-family: 'DTMSans';
  src: url('../assets/fonts/DTM-Sans.otf') format('opentype');
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'DTMSans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: black;
  color: white;
}

.top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 20px;
  position: relative;
  max-width: 800px;
  box-sizing: border-box;
}

.top-nav .home-link {
  position: absolute;
  left: 20px;
  font-size: 14px;
  padding: 6px 12px;
}

h1 {
  margin: 0;
  text-align: center;
  width: 100%;
}

canvas {
  margin-top: 20px;
  image-rendering: pixelated;
  background: #000;
  border: 2px solid white;
  max-width: 90vw;
  max-height: 90vh;
}

input[type="file"] {
  display: none;
}

.custom-file-upload,
#exportButton {
  display: inline-block;
  font-family: 'DTMSans', sans-serif;
  background-color: black;
  color: white;
  border: 2px solid white;
  padding: 6px 12px;
  cursor: pointer;
  margin: 10px;
  text-align: center;
  user-select: none;
}

.custom-file-upload:hover,
#exportButton:hover {
  background-color: #222;
}

.custom-file-upload:active,
#exportButton:active {
  background-color: #111;
}

#thresholdContainer,
#invertContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

input[type="range"] {
  appearance: none;
  width: 150px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  border-radius: 0px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  background: white;
  border: none;
  border-radius: 0%;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: white;
  border: none;
  border-radius: 0%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #000;
  border-radius: 0px;
  transition: 0.4s;
  border: 2px solid white;
  box-sizing: border-box;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 20px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  background-color: white;
  border-radius: 0%;
  transition: 0.4s;
  box-sizing: border-box;
  border: none;
}

input:checked + .slider {
  background-color: #fff;
  border-color: #000;
}

input:checked + .slider:before {
  background-color: black;
  transform: translate(20px, -50%);
}

#info {
  max-width: 512px;
  text-align: center;
  font-size: 14px;
  margin-top: 10px;
  color: #fff;
}

#faq {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

#faq h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.faq-item {
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.faq-item h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
}

.faq-item h3::before {
  content: "Q:";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

.faq-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  padding-left: 25px;
}

.nav-links {
  margin: 20px 0;
  text-align: center;
}

.home-link {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid white;
  transition: all 0.3s ease;
}

.home-link:hover {
  background: white;
  color: black;
}

footer {
  margin-top: 20px;
  padding: 10px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  width: 100%;
  max-width: 512px;
}