body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  margin: 0;
}

/* --- FUENTES LOCALES DESDE LA CARPETA creador/fonts/ --- */
@font-face {
  font-family: 'Arial Local';
  src: local('Arial'), url('/creador/fonts/arial.ttf') format('truetype');
}

@font-face {
  font-family: 'Impact Local';
  src: local('Impact'), url('/creador/fonts/impact.ttf') format('truetype');
}

@font-face {
  font-family: 'Comic Sans Local';
  src: local('Comic Sans MS'), url('/creador/fonts/comic.ttf') format('truetype');
}

@font-face {
  font-family: 'Times New Roman Local';
  src: local('Times New Roman'), url('/creador/fonts/times.ttf') format('truetype');
}

@font-face {
  font-family: 'Arial Local';
  src: local('Arial'), url('/creador/fonts/arial.ttf') format('truetype');
}

.main-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
   background-color: rgba(255, 255, 255, 0.04);
  max-width: 1000px;
  width: 100%;
  justify-content: center;
  align-items: flex-start;
}

/* --- GALERÍA LATERAL --- */
.gallery-container {
  width: 150px;
  margin-top:-20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 20px;
}

.gallery-container h3 {
  margin-top: 0;
  text-align: center;
  color: #555;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.gallery-items {
  display: grid;
  background-color: black;
  grid-template-columns: 1fr;
  gap: 15px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 5px;
}

.gallery-item {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.gallery-item:hover {
  border-color: #4A90E2;
  transform: scale(1.05);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* =======================================================
   ESTILO GLASSMORPHISM PARA EL TÍTULO DE LA PÁGINA (COMIC)
   ======================================================= */

h2, .main-title {
  text-align: center !important;
  font-family: 'Times New Roman Local', 'Times New Roman', Times, serif !important;  font-weight: 800 !important;
  font-size: 2rem !important;
  line-height: 1.1 !important; /* Poco espacio entre renglones */
  padding-top:12px;
  /* Gradiente translúcido para que el texto parezca de cristal o luz */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(150, 220, 255, 0.8)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  
  /* Sombra flotante tipo glass / neón suave para darle relieve sin contenedor */
  filter: drop-shadow(0 4px 12px rgba(0, 100, 180, 0.8)) !important;
  
  margin: 15px 0 25px 0 !important;
  letter-spacing: 0.5px;
}
.btn-visitar-tienda {
  width: 100% !important;
  max-width: 140px !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
  margin-bottom:100px;
  /* Efecto Glassmorphism translúcido celeste */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(200, 225, 245, 0.3) 49%,
    rgba(160, 205, 235, 0.35) 50%,
    rgba(190, 215, 235, 0.45) 100%
  ) !important;
  backdrop-filter: blur(8px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
  
  /* Tipografía y color */
  color: #003366 !important;
  font-family: 'Segoe UI', Tahoma, sans-serif !important;
  font-weight: bold !important;
  font-size: 13px !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
  
  /* Bisel clásico de ventana/botón Windows 98 */
  border-top: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-right: 2px solid rgba(100, 130, 160, 0.5) !important;
  border-bottom: 2px solid rgba(100, 130, 160, 0.5) !important;
  
  border-radius: 0px !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7) !important;
  transition: all 0.2s ease !important;
}

.h4 {
  /* Convierte el contenedor en un flexbox */
  display: flex;
  margin-top:-100px;width: 100%;
  max-width: 300px;
  justify-content: center; 

}

h4 {
  /* Ajusta el tamaño a uno pequeño (puedes cambiar el valor) */
  font-size: 0.8rem; /* o 14px, 16px, etc. */
  color:blue;
  text-decoration: underline;width: 100%;
  max-width: 300px;
  margin: 0; 
}
/* Efecto Hover translúcido brillante */
.btn-visitar-tienda:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(220, 240, 255, 0.5) 49%,
    rgba(180, 220, 250, 0.55) 50%,
    rgba(210, 235, 255, 0.65) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(0, 150, 255, 0.3) !important;
}

/* Efecto al hacer clic (clic físico invertido Win98) */
.btn-visitar-tienda:active {
  background: rgba(180, 205, 225, 0.6) !important;
  border-top: 2px solid rgba(100, 130, 160, 0.8) !important;
  border-left: 2px solid rgba(100, 130, 160, 0.8) !important;
  border-right: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  
}
.upload-btn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70%;
  aspect-ratio: 1 / 1;
  background-color: #f8f9fa;
  border: 2px dashed #4A90E2;
  border-radius: 8px;
  cursor: pointer;
  color: #4A90E2;
  font-weight: bold;
  font-size: 13px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.upload-btn-card span.plus-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 2px;
}

.upload-btn-card:hover {
  background-color: #eef5fc;
  transform: scale(1.03);
}

/* --- EDITOR Y CANVAS --- */
.editor-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.canvas-wrapper {
  border: 2px dashed #ccc;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fafafa;
  display: flex;
  justify-content: center;
}

/* TAMAÑO VISUAL DESKTOP POR DEFECTO */
.canvas-container, 
.canvas-container canvas {
  width: 360px !important;
  height: 425px !important;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
}

.divider {
  width: 100%;
  border: 0;
  border-top: 1px solid #eee;
  margin: 5px 0;
}

button {
  background-color: #4A90E2;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
}

button:hover {
  background-color: #357ABD;
}

button.btn-whatsapp {
  background-color: #25D366;
}

button.btn-whatsapp:hover {
  background-color: #1EBE5D;
}

button.btn-secondary {
  background-color: #6C757D;
}

button.btn-secondary:hover {
  background-color: #5A6268;
}

button.btn-warning {
  background-color: #E67E22;
}

button.btn-warning:hover {
  background-color: #D35400;
}

button.btn-danger {
  background-color: #E74C3C;
}

button.btn-danger:hover {
  background-color: #C0392B;
}

/* --- FONDO DE LA TIENDA Y CENEFA SUPERIOR (AERO) --- */
html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-image: url("https://cdn.v2.tiendanegocio.com/section-2/22775/img_22775_dpku2cn4mdsa1ygb.png") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1920 / 46 !important;
  min-height: 24px !important;
  background-image: url("https://cdn.v2.tiendanegocio.com/section-2/22775/img_22775_dpku2covmds9mgsj.png") !important;
  background-repeat: no-repeat !important;
  background-position: right top !important;
  background-size: 100% auto !important;
  z-index: 19000 !important;
  pointer-events: none !important;
  display: block !important;
}

/* --- PANEL DE EDICIÓN DE TEXTO ULTRA COMPACTO --- */
.compact-panel {
  padding: 10px 12px !important;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  background: linear-gradient(
    135deg, 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(220, 245, 255, 0.35) 50%, 
    rgba(173, 216, 230, 0.4) 100%
  ) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(0, 110, 200, 0.15) !important;
}

.compact-panel h3 {
  margin: 0 0 6px 0 !important;
  font-size: 0.95rem !important;
  color: #004477 !important;
}

.control-row {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.control-row .control-group {
  flex: 1 !important;
  margin-bottom: 0 !important;
}

.control-group {
  margin-bottom: 6px !important;
}

.control-group label {
  font-size: 0.72rem !important;
  font-weight: bold !important;
  color: #003366 !important;
  display: block !important;
  margin-bottom: 2px !important;
}

.compact-picker {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  background: rgba(255, 255, 255, 0.4);
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.compact-picker label {
  margin-bottom: 0 !important;
  white-space: nowrap !important;
  font-size: 0.7rem !important;
}

input[type="color"] {
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 5px rgba(0, 100, 180, 0.2) !important;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 4px 0;
}

.preset-buttons {
  display: flex !important;
  gap: 4px !important;
}

.effect-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
}

.export-tools {
   padding-bottom:  114px !important;
   padding-top: 10px;
  
}
.export-tools button{
  padding: 5px 4px !important;
  font-size: 1rem !important;
  border-radius: 8px !important;
  background: linear-gradient(
    180deg,
    rgba(235, 250, 255, 0.75) 0%,
    rgba(106, 204, 106, 0.149) 49%,
    rgba(182, 255, 182, 0.149) 50%,
    rgba(0, 194, 96, 0.71) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-bottom: 2px solid rgba(51, 222, 51, 0.149) !important;
  color: #003366 !important;
  font-weight: bold !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-align: center;
  transition: all 0.2s ease !important;
}
.preset-buttons button, button {
  padding: 5px 4px !important;
  font-size: 0.72rem !important;
  border-radius: 8px !important;
  background: linear-gradient(
    180deg,
    rgba(235, 250, 255, 0.75) 0%,
    rgba(160, 225, 255, 0.35) 49%,
    rgba(30, 180, 255, 0.4) 50%,
    rgba(0, 130, 210, 0.5) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-bottom: 2px solid rgba(0, 120, 200, 0.6) !important;
  color: #003366 !important;
  font-weight: bold !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-align: center;
  transition: all 0.2s ease !important;
}

.preset-buttons button:hover {
  border-color: rgba(0, 190, 255, 0.9) !important;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.5) !important;
  transform: scale(1.02) !important;
}

.preset-buttons button.active {
  background: linear-gradient(180deg, #0091e6 0%, #00b4ff 100%) !important;
  color: #ffffff !important;
}

select {
  width: 100% !important;
  padding: 4px 6px !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(88, 178, 236, 0.6) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: #004477 !important;
  font-weight: bold !important;
}

/* --- RESPONSIVE MÓVIL (CANVAS 98% DEL ANCHO) --- */
@media (max-width: 768px) {
  body::before {
    height: 24px !important;
    background-size: auto 24px !important;
  }

  .main-container {
    flex-direction: column;
    align-items: center;
    padding: 0;
    width: 100%;
  }

  .editor-container {
    width: 98vw;
    padding: 10px 5px;
  }

  .canvas-wrapper {
    width: 98vw;
  }

  /* Canvas al 98% del ancho de pantalla manteniendo proporción 1000x1181 */
  .canvas-container, 
  .canvas-container canvas {
    width: 98vw !important;
    height: calc(98vw * (1181 / 1000)) !important;
  }

  .gallery-container {
    width: 95vw;
    position: static;
  }

  .gallery-items {
    grid-template-columns: repeat(4, 1fr);
    max-height: 120px;
  }
}

/* --- MARCO INVISIBLE INTOCABLE DE 30PX --- */
.canvas-wrapper {
  position: relative; /* Necesario para posicionar el marco absoluto encima */
}

.canvas-border-wall {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* Crea un marco hueco de exactamente 30px usando un borde transparente masivo */
  border: 30px solid transparent; 
  box-sizing: border-box;
  
  /* El centro del marco deja pasar los clics hacia los stickers/textos */
  pointer-events: none; 
  z-index: 9999; /* Por encima de todo en el canvas */
}

/* Forzamos a que las 4 franjas del borde de 30px SÍ bloqueen los clics/toques */
.canvas-border-wall {
  pointer-events: auto;
}

/* Truco para hacer que el centro sea "clicable" (transparente a los eventos) 
   mientras el borde de 30px bloquea todo */
.canvas-wrapper canvas {
  position: relative;
  z-index: 1;
}
.canvas-border-wall {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  z-index: 5000;
  pointer-events: auto;
  
  /* Marco asimétrico: 1px arriba/abajo, 10px izquierda, 95px derecha */
  clip-path: polygon(
    /* Perímetro exterior (toda la caja) */
    0% 0%, 100% 0%, 100% 100%, 0% 100%, 
    
    /* Salto al perímetro interior (el hueco central) */
    0% 0%, 
    10px 1px,                                     /* Esquina superior izquierda (10px izq, 1px arriba) */
    10px calc(100% - 1px),                        /* Esquina inferior izquierda (10px izq, 1px abajo) */
    calc(100% - 95px) calc(100% - 1px),           /* Esquina inferior derecha (95px der, 1px abajo) */
    calc(100% - 95px) 1px,                        /* Esquina superior derecha (95px der, 1px arriba) */
    10px 1px                                      /* Cierre del polígono */
  );
}



/* =======================================================
   ESTILO VENTANA WINDOWS 98 HÍBRIDO CON GLASSMORPHISM
   ======================================================= */

.export-tools {
  /* Fondo translúcido con efecto vidrio esmerilado celeste claro */
  background: rgba(192, 192, 192, 0.45) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  
  /* Mantenemos los bordes biselados clásicos de Win98 pero translúcidos/brillantes */
  border-top: 2px solid rgba(255, 255, 255, 0.8) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.8) !important;
  border-right: 2px solid rgba(0, 80, 150, 0.3) !important;
  border-bottom: 2px solid rgba(0, 80, 150, 0.3) !important;
  
  /* Sombra suave de cristal flotante */
  box-shadow: 
      inset 0 1px 2px rgba(255, 255, 255, 0.9),
      0 10px 30px rgba(0, 100, 180, 0.15) !important;
  
  padding: 12px !important;
  border-radius: 0px !important; /* Mantiene la forma de ventana Win98 */
  width: 100% !important;
  max-width: 440px !important;
  box-sizing: border-box !important;
  font-family: 'Segoe UI', Tahoma, sans-serif !important;
}

/* Barra de título estilo Windows 98 con toque Glass */
.export-tools h1 {
  background: linear-gradient(90deg, rgba(0, 0, 128, 0.85), rgba(16, 132, 208, 0.85)) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  font-weight: bold !important;
  margin: -12px -12px 12px -12px !important;
  padding: 6px 8px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 50, 100, 0.5);
}

/* Botones de acción estilo Win98 pero translúcidos y con brillo de cristal */
.export-tools button {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(200, 225, 245, 0.3) 49%,
    rgba(160, 205, 235, 0.35) 50%,
    rgba(190, 215, 235, 0.45) 100%
  ) !important;
  backdrop-filter: blur(8px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
  
  color: #003366 !important;
  font-family: 'Segoe UI', Tahoma, sans-serif !important;
  font-weight: bold !important;
  font-size: 13px !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
  
  /* Bisel Win98 de los botones adaptado con claridad */
  border-top: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-right: 2px solid rgba(100, 130, 160, 0.5) !important;
  border-bottom: 2px solid rgba(100, 130, 160, 0.5) !important;
  
  border-radius: 0px !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7) !important;
  padding: 8px 12px !important;
  width: 100% !important;
  margin-bottom: 8px !important;
  transition: all 0.2s ease !important;
}

/* Efecto Hover translúcido brillante */
.export-tools button:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(220, 240, 255, 0.5) 49%,
    rgba(180, 220, 250, 0.55) 50%,
    rgba(210, 235, 255, 0.65) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(0, 150, 255, 0.3) !important;
  transform: none !important; /* Mantiene la rigidez de ventana clásica */
}

/* Efecto al presionar el botón (clic físico invertido de Win98) */
.export-tools button:active {
  background: rgba(180, 205, 225, 0.6) !important;
  border-top: 2px solid rgba(100, 130, 160, 0.8) !important;
  border-left: 2px solid rgba(100, 130, 160, 0.8) !important;
  border-right: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  padding: 9px 11px 7px 13px !important; 
}

/* Toques sutiles en los textos de los botones internos */
.export-tools button.btn-success {
  color: #003311 !important;
}

.export-tools button.btn-whatsapp {
  color: #001144 !important;
  margin-bottom: 0 !important;
}

/* =======================================================
   ESTILO VENTANA WIN98 HÍBRIDO (SIN TOCAR TAMAÑOS NI PADDING)
   ======================================================= */

.gallery-container {

  box-sizing: border-box !important;
  position: sticky;
  top: 20px;
  
  /* Efecto Glassmorphism + Marco Win98 sin romper el diseño */
  background: rgba(235, 245, 255, 0.45) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) satugarate(160%) !important;
  
  border-top: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-right: 2px solid rgba(0, 80, 150, 0.3) !important;
  border-bottom: 2px solid rgba(0, 80, 150, 0.3) !important;
  
  border-radius: 0px !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 10px 30px rgba(0, 100, 180, 0.15) !important;
  
  /* Necesario para acomodar la barra superior sin alterar el padding interno */
  position: relative !important;
  padding-top: 35px !important; 
}

/* Barra de título estilo Windows 98 con toque Glass (flotante arriba sin afectar el contenido) */
.gallery-container h3 {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  
  background: linear-gradient(90deg, rgba(0, 0, 128, 0.85), rgba(16, 132, 208, 0.85)) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  
  color: #ffffff !important;
  font-size: 0.8rem !important;
  font-weight: bold !important;
  padding: 1px 2px !important;
  box-sizing: border-box !important;
  
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  letter-spacing: 0.5px;
  text-align: left !important;
  border-bottom: 1px solid rgba(0, 50, 100, 0.5);
  border-radius: 0px !important;
}


