
@font-face {
  font-family: 'Bladebit';
  src: url('fonts/Bladebit.otf') format('opentype');
}


@font-face {
  font-family: 'Sable Gothic';
  src: url('fonts/SableGothic_Cut1.1-Regular.otf') format('opentype');
}

@font-face {
  font-family: 'Boulangerie';
  src: url('fonts/BoulangerieBeta1-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Buckaroo';
  src: url('fonts/Buckaroo-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Garbanzo';
  src: url('fonts/Garbanzo-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Hatiora';
  src: url('fonts/Hatiora.otf') format('opentype');
}
@font-face {
  font-family: 'Moradin';
  src: url('fonts/MoradinVF.ttf') format('truetype');
}
@font-face {
  font-family: 'Nouvelle Ligne';
  src: url('fonts/NouvelleLigne-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'OmniBeta';
  src: url('fonts/OmniBetaVF.ttf') format('truetype');
}
@font-face {
  font-family: 'Puncta';
  src: url('fonts/Puncta-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Ralph Ave';
  src: url('fonts/RalphAve-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Sauerkraut';
  src: url('fonts/SAUERKRAUT-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Segment 12 Primary';
  src: url('fonts/Segment12Primary-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Tantiveiv';
  src: url('fonts/TANTIVEIV-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Tondura';
  src: url('fonts/TonduraBeta2-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Trail Bits';
  src: url('fonts/TrailBits-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Uniform Mono';
  src: url('fonts/UniMono-Regular.otf') format('opentype');
}


@font-face {
  font-family: 'N27 Bold';
  src: url('fonts/N27-Bold.otf') format('opentype');
}

@font-face {
  font-family: 'PP Agrandir Grand Italic';
  src: url('fonts/PPAgrandir-GrandItalic.otf') format('opentype');
}

@font-face {
  font-family: 'PP Casa Regular';
  src: url('fonts/PPCasa-Regular.otf') format('opentype');
}

@font-face {
  font-family: 'PP Cirka Bold';
  src: url('fonts/PPCirka-Bold.otf') format('opentype');
}

@font-face {
  font-family: 'PP Migra Black Italic';
  src: url('fonts/PPMigra-BlackItalic.otf') format('opentype');
}

body {
  font-family: sans-serif;
  padding: 20px;
  background: #ffffff;
  color: #222;
}

.font-section {
  margin-bottom: 60px;
}

.preview {
  margin-top: 10px;
  white-space: pre-wrap;
  outline: none;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 10px;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.controls input[type=range] {
  width: 100px;
}

textarea {
  color: #999;
  font-family: sans-serif;
  font-size: 16px;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
  border: none;
  padding: 10px;
  resize: vertical;
}

.font-name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

textarea {
  color: #999;
  font-family: sans-serif;
  font-size: 14px;
  width: auto;
  height: auto;
  min-width: 200px;
  min-height: 40px;
  margin-bottom: 20px;
  border: none;
  padding: 10px 0;
  resize: none;
  outline: none;
  overflow: hidden;
  display: inline-block;
}

textarea:focus {
  outline: none;
}

.preview {
  font-size: 54px;
  letter-spacing: 0px;
  line-height: 1.2;
  white-space: pre-wrap;
  outline: none;
  padding: 0;
  margin-top: 10px;
}

/* Slim minimalist slider styling */
input[type=range] {
  -webkit-appearance: none;
  width: 100px;
  height: 2px;
  background: #ccc;
  border-radius: 1px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -5px;
}

input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ccc;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Minimal checkbox style */
input[type=checkbox] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #000;
  border-radius: 2px;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Adjust slider thumb centering */
input[type=range]::-webkit-slider-thumb {
  margin-top: -5px; /* slider height is 2px, thumb is 12px, so -5px centers it */
}

input[type=range]::-moz-range-thumb {
  margin-top: 0; /* Firefox handles alignment differently */
}

/* Unified checkbox styling with slider lines and filled box when checked */
input[type=checkbox] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #000000;
  border-radius: 2px;
  background: transparent;
  display: inline-block;
  cursor: pointer;
  vertical-align: middle;
}

input[type=checkbox]:checked {
  background-color: #000;
}

/* Override any system-generated checkmark */
input[type=checkbox]::after {
  content: none !important;
}

/* Ensure no inner checkmark on other browsers */
input[type=checkbox]:checked::after {
  content: none !important;
}

/* Center slider thumb better */
input[type=range] {
  vertical-align: middle;
  padding: 0;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -5px; /* align thumb with track */
  position: relative;
  top: 0;
}

input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ccc;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  top: -5px;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100px;
  height: 12px;
  background: transparent;
  position: relative;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 2px;
  background: #ccc;
  border-radius: 1px;
  position: relative;
  top: 0px; /* raised by 4-5px from previous 4px */
}

input[type=range]::-webkit-slider-thumb {
  margin-top: -5px;
}

input[type=range]::-moz-range-track {
  height: 2px;
  background: #ccc;
  border-radius: 1px;
}

input[type=range]::-moz-range-thumb {
  position: relative;
  top: -5px;
}



@media (max-width: 600px) {
  body {
    padding: 10px;
    font-size: 14px;
  }

  textarea {
  color: #999;
    font-size: 14px !important;
    width: 100% !important;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .controls label {
    width: 100%;
  }

  input[type=range] {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .preview {
    font-size: 32px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


body.dark {
  background-color: #000000;
  color: #ffffff;
}

body.dark .preview {
  color: #ffffff;
}

body.dark textarea {
  color: #aaa;
  background-color: #000000;
}

body.dark input[type=range]::-webkit-slider-thumb {
  background: #ffffff;
}

body.dark input[type=checkbox] {
  border-color: #ffffff;
}

body.dark input[type=checkbox]:checked {
  background-color: #ffffff;
}

input[type=range]::-webkit-slider-runnable-track {
  background: #ccc;
}

input[type=range]::-moz-range-track {
  background: #ccc;
}

body.dark input[type=range]::-webkit-slider-runnable-track {
  background: #444;
}

body.dark input[type=range]::-moz-range-track {
  background: #444;
}

/* Position icons in top right corner */
.top-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.top-controls button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #000000;
  padding: 5px;
}

body.dark .top-controls button {
  color: #ffffff;
}

input[type=range]::-webkit-slider-thumb {
  background: #000000;
}

input[type=range]::-moz-range-thumb {
  background: #000000;
}

.top-controls button {
  font-size: 14px;
  padding: 6px 10px;
  border: 1.5px solid #000000;
  background: none;
  color: #000000;
  border-radius: 0;
}

.top-controls button:hover {
  background: #f0f0f0;
}

body.dark .top-controls button {
  color: #ffffff;
  border: 1.5px solid #ffffff;
}

body.dark .top-controls button:hover {
  background: #222222;
}

body {
  padding-top: 14px;
}

.top-controls {
  margin-bottom: 16px; /* was 10px, now 10 + 6 */
}
