body {
  background: #181818;
  color: #fff;
  font-family: Arial, sans-serif;
  padding: 20px;
}

.editor-wrapper {
  position: relative;
  margin-bottom: 16px;
}

/* --------------------------------------------------------- */
/* BARRA FLOTANTE */
/* --------------------------------------------------------- */
.editor-toolbar-floating {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -120%);
  background: #202020;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 1000;
}

.editor-toolbar-floating.oculto {
  display: none;
}

.editor-toolbar-floating button {
  background: #303030;
  color: #fff;
  border: 1px solid #444;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-toolbar-floating button svg {
  width: 18px;
  height: 18px;
}

.editor-toolbar-floating button:hover {
  background: #383838;
}

.editor-toolbar-floating button.active {
  background: #cc0000;
  border-color: #ff4d4d;
}

#heading-select {
  background: #202020;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 13px;
}

/* --------------------------------------------------------- */
/* BARRA FIJA */
/* --------------------------------------------------------- */
.editor-toolbar-fixed {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  background: #202020;
  padding: 6px;
  border: 1px solid #333;
  border-radius: 8px;
}

.editor-toolbar-fixed button,
.editor-toolbar-fixed select {
  background: #303030;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.editor-toolbar-fixed button:hover {
  background: #383838;
}

.editor-toolbar-fixed button.active {
  background: #cc0000;
  border-color: #ff4d4d;
}

/* --------------------------------------------------------- */
/* ÁREA EDITABLE */
/* --------------------------------------------------------- */
.editor-area {
  background: #202020;
  border: 1px solid #333;
  padding: 12px;
  min-height: 200px;
  border-radius: 8px;
  overflow-y: auto;
}

/* --------------------------------------------------------- */
/* SALIDA */
/* --------------------------------------------------------- */
#output {
  width: 100%;
  height: 120px;
  margin-top: 10px;
  background: #202020;
  color: #fff;
  border: 1px solid #333;
  padding: 10px;
  border-radius: 6px;
  box-sizing: border-box;
}

/* --------------------------------------------------------- */
/* ESTILOS IMAGEN */
/* --------------------------------------------------------- */
.editor-area img {
  display: block;
  margin: 12px auto; /* centra y añade espacio arriba/abajo */
  max-width: 100%;
  max-height: 300px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}
/* ZOOM IMAGEN */
#zoom-imagen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

#zoom-imagen img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

#zoom-imagen.zoom-oculto { display: none; }



