/* ============================================================
   ESTILOS GENERALES
   ============================================================ */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #222;
}

/* Contenedor universal Mascoalba */
.contenedor-mascoalba {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

/* ================================
   TITULOS
================================ */

h1 {
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 35px;
    color: #111;
}

/* ================================
   PANEL DE CONTROLES
================================ */

.panel-controles {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    background: #ffffff;
    padding: 22px 26px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 35px;
}

.panel-controles label {
    font-weight: 600;
    color: #333;
}

.panel-controles input,
.panel-controles select {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    transition: border 0.2s;
}

.panel-controles input:focus,
.panel-controles select:focus {
    border-color: #888;
    outline: none;
}

/* ================================
   BOTONES PREMIUM
================================ */

.panel-controles button,
.opcion-btn {
    padding: 10px 20px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.panel-controles button:hover,
.opcion-btn:hover {
    background: #000;
    color: #ffdd00;
    opacity: 0.9;
}

/* Hover amarillo para todos los botones premium */
.accion-btn:hover,
#btnColorPicker:hover,
#btnImageUpload:hover,
#btnCuentagotas:hover,
#generateBtn:hover {
    background-color: #ffdd00 !important;
    color: #000 !important;
    border-color: #e0c200 !important;
    cursor: pointer;
}


/* Línea de botones */
.linea-opciones {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

/* ================================
   PALETA RÁPIDA
================================ */

.paleta-rapida {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.color-rapido {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #000;
    transition: transform 0.15s;
}

.color-rapido:hover {
    transform: scale(1.15);
}


/* ================================
   IMAGEN + CUENTAGOTAS
================================ */

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

#imageCanvas {
    display: none;
    max-width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    cursor: crosshair;
}

.delete-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
}

.delete-image-btn:hover {
    opacity: 1;
}

/* ================================
   PALETA DE COLORES
================================ */

.paleta {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.color-swatch {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.color-code {
    font-family: monospace;
    font-size: 17px;
    flex-grow: 1;
    color: #111;
}

.copy-btn {
    padding: 8px 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.copy-btn:hover {
    background: #000;
    color: #ffdd00;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 600px) {

    .color-item {
        flex-direction: column;
        align-items: stretch;
    }

    .color-swatch {
        width: 100%;
        height: 60px;
    }

    .copy-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================
   BOTONES PREMIUM
============================ */

// Botón para abrir el selector de color
document.getElementById("btnColorPicker").addEventListener("click", () => {
    document.getElementById("colorPicker").click();
});

// Botón para abrir el selector de imagen
document.getElementById("btnImageUpload").addEventListener("click", () => {
    document.getElementById("imageInput").click();
});

.menu-acciones {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 25px;
}

.accion-btn {
    background: #000;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s, background 0.2s;
}

.accion-btn:hover {
    opacity: 0.85;
    background: #111;
}

.accion-btn.activo {
    background: #ffdd00;
    color: #000;
}

/* Centrado del menú (si no lo tienes) */
.menu-acciones {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

/* Botón activo */
.accion-btn.activo, #btnCuentagotas.activo {
  background: #ffdd00;
  color: #000;
}

/* Preview del cuentagotas */
#cuentagotasPreview {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(0,0,0,0.45);
  pointer-events: none;
  display: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: background 80ms linear;
}
.cuentagotas-activo * { cursor: crosshair !important; }




.menu-acciones {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 25px;
}
