/* =========================================
   GENERADOR DE PALETAS — scope .paletas-app
   ========================================= */

.paletas-app {
  color: var(--texto, #fff);
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Header interno */
.paletas-app .paletas-header {
  text-align: center;
  margin-bottom: 30px;
}

.paletas-app .paletas-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #2D7DFF 0%, #5BA0F5 20%, #A8CBF5 45%, #E8F0FB 70%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.paletas-app .paletas-sub {
  color: var(--muted, #A8B4C7);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Layout */
.paletas-app .paletas-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar */
.paletas-app .paletas-sidebar {
  background: rgba(10, 21, 38, .7);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 100px;
}

.paletas-app .pal-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paletas-app .pal-group label {
  font-size: .95rem;
  color: #DCE4F0;
  font-weight: 500;
}

.paletas-app .pal-group select,
.paletas-app .pal-group input[type="text"],
.paletas-app .pal-group input[type="number"] {
  padding: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: .2s;
}

.paletas-app .pal-group select:focus,
.paletas-app .pal-group input:focus {
  border-color: #2D7DFF;
  background: rgba(45, 125, 255, .06);
}

.paletas-app .pal-group input[type="range"] {
  width: 100%;
  accent-color: #2D7DFF;
  cursor: pointer;
}

.paletas-app .pal-color-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.paletas-app .pal-color-input input[type="color"] {
  width: 52px;
  height: 44px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}

.paletas-app .pal-color-input input[type="text"] {
  flex: 1;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.paletas-app .pal-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin: 4px 0;
}

/* Botones */
.paletas-app button {
  padding: 14px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(45, 125, 255, .1);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.paletas-app button:hover {
  background: rgba(45, 125, 255, .25);
  border-color: #2D7DFF;
}

.paletas-app .pal-btn-primary {
  background: #2D7DFF;
  border-color: #2D7DFF;
  font-size: 1.1rem;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(45, 125, 255, .35);
}

.paletas-app .pal-btn-primary:hover {
  background: #1F6FEB;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(45, 125, 255, .45);
}

/* Info */
.paletas-app .pal-info {
  color: #A8B4C7;
  font-size: .9rem;
  text-align: center;
  line-height: 1.5;
  min-height: 20px;
  transition: .3s;
}

.paletas-app .pal-info.copiado {
  color: #25D366;
  font-weight: 600;
}

/* Workspace / paleta */
.paletas-app .paletas-workspace {
  min-height: 400px;
}

.paletas-app .pal-palette {
  display: flex;
  gap: 12px;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 21, 38, .5);
  padding: 12px;
}

.paletas-app .pal-swatch {
  flex: 1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8px;
  cursor: pointer;
  transition: flex-grow .3s ease, transform .2s;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.paletas-app .pal-swatch:hover {
  flex-grow: 1.2;
}

.paletas-app .pal-swatch .pal-hex {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, .25);
  color: #fff;
  white-space: nowrap;
  user-select: all;
}

.paletas-app .pal-swatch .pal-lock {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.paletas-app .pal-swatch .pal-lock:hover {
  background: rgba(0, 0, 0, .55);
  transform: scale(1.1);
  border-color: transparent;
}

.paletas-app .pal-swatch .pal-lock.locked {
  background: rgba(255, 255, 255, .9);
  color: #000;
}

.paletas-app .pal-swatch.copiado::after {
  content: "✓ Copiado";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  animation: pal-fade .8s ease;
}

@keyframes pal-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 900px) {
  .paletas-app .paletas-layout {
    grid-template-columns: 1fr;
  }

  .paletas-app .paletas-sidebar {
    position: static;
    order: 2;
  }

  .paletas-app .paletas-workspace {
    order: 1;
  }
}

@media (max-width: 640px) {
  .paletas-app .pal-palette {
    flex-direction: column;
    height: auto;
    min-height: 400px;
  }

  .paletas-app .pal-swatch {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px;
    min-height: 70px;
  }

  .paletas-app .pal-swatch:hover {
    flex-grow: 1;
  }

  .paletas-app .pal-swatch .pal-lock {
    width: 36px;
    height: 36px;
  }
}