@font-face {
  font-family: 'HelveticaNowDisplay-Bold';
  src: url('HelveticaNowDisplay-Bold.otf') format('opentype');
  font-weight: bold;
}

@font-face {
  font-family: 'HelveticaNeueLTStd-Roman';
  src: url('HelveticaNeueLTStd-Roman.otf') format('opentype');
  font-weight: normal;
}

@font-face {
  font-family: 'HelveticaNowText-ExtraBold';
  src: url('HelveticaNowText-ExtraBold.otf') format('opentype');
  font-weight: 800;
}

html, body {
  margin: 0;
  height: 100vh;
  font-family: 'HelveticaNowDisplay-Bold';
  background: #000000;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: left;
  align-items: center;
  padding: 10px 25px;
  background-color: #000000;
  border-bottom: 1px solid #ffffff;
}

.logo img {
  height: 20px;
  width: auto;
}

#tool-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#gui {
  width:450px;
  background: #000000;
  border-right: 1px solid #ffffff;
  padding: 15px;
  box-sizing: border-box;
  overflow-y: auto;
}

input{
  text-transform: uppercase; 
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: #000000; 
  border: 1px solid #ffffff; 
}
::-webkit-scrollbar-thumb:hover {
  background: #ffffff; 
  cursor: pointer;

}

/* CANVAS */
#canvas-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000000;
}

canvas {
  border: 1px solid #ffffff;
  display: block;
  margin: 0 auto;
}

/* linhas */
.line {
  height:1px;
  width: 100%;
  background-color: white;
  margin:15px 0 15px 0;
  box-sizing: border-box;
}

/* modo */
#mode-buttons {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

#mode-buttons button {
  width: 100%;
  padding: 6px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #ffffff;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
}

#mode-buttons button.active {
  background: #FFFFFF;
  color: #000000;
}

/* labels */
label {
  font-family: 'HelveticaNowDisplay-Bold';
  color: #ffffff;
  font-size: 12px;
  display: block;
  margin-top: 1px;
  margin-bottom: 4px;
}

/* SECÇÃO TEXTO */
.line-section-container {
  max-height:11vh;
  overflow-y: auto;
  margin: 10px 0;
  height: 100px;
}

.line-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  width: calc(100% - 15px); /* encurta as caixas de texto */
}

.line-input input[type="text"] {
  flex-grow: 1;
  padding: 6px;
  font-size: 10px;
  border: 1px solid #ffffff;
  background: #000;
  color: #fff;
}

/* bolinha principal */
.color-picker-main {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
  border: 1px solid #ffffff;
  flex-shrink: 0;
}

/* popup – aparece à direita */
.color-popup {
  display: none;
  position: absolute;
  left: 200px; /* DISTÂNCIA DA BOLINHA */
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 0px;
  padding: 6px;
  box-shadow: #000000;
  z-index:20;
  gap: 6px;
  flex-wrap: wrap;
  width: fit-content;
  white-space: nowrap;
}

/* visível */
.color-popup.visible {
  display: flex;
  opacity: 1;
}

/* bolinhas das cores */
.color-picker-option {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #000000;
}

.color-picker-option:hover {
  transform: scale(1.22);
  border: 1px solid #fff;
}

/* Fundo / cor do GUI */
.label-with-buttons {
  display: flex;
  align-items: top;
  gap: 10px;
}

.color-buttons {
  display: flex;
  gap: 6px;
}

.color-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ffffff;
  cursor: pointer;
  background: none;
}

#color1 { background-color: #ffffff; }
#color2 { background-color: #000000; }

/* sliders */
.slider-container {
  margin: 10px 0;
}

.slider-container label {
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 12px;
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: #ffffff;
  margin-top: 8px;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #000000;
  border: 1px solid #ffffff;
  cursor: pointer;
}

/* checkboxes */
input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 3px;
  background: #000000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

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

input[type="checkbox"]:checked::after {
  content: "✕";
  font-size: 14px;
  color: #000000;
}

/* buttons gerais */
.button-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 133px);
  margin-bottom: 10px;
  font-weight: bold;
}

#clearCanvasButton,
.clear-canvas-button {
  background-color: #ffffff;
  color: #000000;
  font-size: 12px;
  width: 100%;
  padding: 6px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  margin-top: 2px;
}

#export-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 6px;
  margin-top: 5px;
  margin-bottom: 10px;
}

.export-button-jpeg,
.export-button-video {
  background-color: #ffffff;
  color: #000000;
  font-size: 12px;
  padding: 6px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  width: 100%; 
}

.param-group button {
  padding: 6px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #ffffff;
  background: #000000;
  color: #ffffff;
  font-size: 12px;
}

.param-group button.active {
  background: #ffffff;
  color: #000000;
}

/* info */
.info-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #000;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
}
.info-btn.active {
  background: #fff;
  color: #000;
}
.info-btn:hover {
  transform: scale(1.05);
}

/* Caixa lateral */
.side-box {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100vh;
  background: #fff;
  color: #000;
  box-shadow: -3px 0 15px rgba(0, 0, 0, 0.3);
  padding: 30px;
  transition: right 0.4s ease;
  z-index: 1000;
  overflow-y: auto;
}

.side-box.open {
  right: 0;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.hidden {
  display: none !important;
}

.align-select {
  margin-left: 8px;
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  font-size: 10px;
  padding: 3px 4px;
  border-radius: 4px;
  cursor: pointer;
}

.align-select.hidden {
  display: none !important;
}
.line-controls {
  display: flex;
  gap: 6px;
}

.line-controls button {
  background-color: #fff;
  display: flex; /* ensure proper centering */
  align-items: center; /* vertical centering */
  justify-content: center;  
  color: #000;
  border: none;
  width: 20px;
  height: 20px;
  font-family: 'HelveticaNowDisplay-Bold';
  font-size: 18px;
  cursor: pointer;
}