* {
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

body {
  margin: 0;
  background: #0b0b0b;
  color: #fff;
  overflow: hidden;
}

/* TOOLBAR */
#toolbar {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#toolbar button {
  background: #1f1f1f;
  color: #fff;
  border: 1px solid #333;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
}

#toolbar button:hover {
  background: #2a2a2a;
}

/* CANVAS */
#canvas-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.canvas-frame {
  width: 360px;
  height: 640px;
  background: #000;
  border-radius: 18px;
  box-shadow: 0 0 0 2px #1c1c1c, 0 25px 60px rgba(0,0,0,0.7);
  overflow: hidden;
}

/* PAINÉIS */
#background-panel,
#text-panel,
#stickers-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 320px;
  max-height: 60vh;
  background: #141414;
  padding: 12px;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  overflow-y: auto;
}

.hidden {
  display: none;
}

/* GRID DE FUNDOS */
#background-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* PREVIEW FUNDO */
.bg-option {
  height: 80px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.bg-option:hover {
  transform: scale(1.03);
  border-color: #fff;
}

/* TEXTO */
#text-panel textarea {
  width: 100%;
  height: 90px;
  resize: none;
  background: #0e0e0e;
  color: #fff;
  border: 1px solid #333;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 6px;
}

.text-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.text-style-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.text-style-buttons button {
  background: #111;
  border: 1px solid #444;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

#charCount {
  font-size: 11px;
  color: #aaa;
}
