/* components.css — enhanced professional styling */

/* === PALETTE COLUMNS (MAIN PALETTE VIEW) === */
.palette-columns{
  list-style:none; margin:0; padding:20px;
  display:grid; gap:20px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items:end;
}
.palette-col{
  display:flex; flex-direction:column; gap:12px;
  align-items:stretch;
  cursor: grab;
  transition: all 0.2s ease;
}
.palette-col:active{
  cursor: grabbing;
}
.palette-col.drag-over{
  transform: translateX(10px);
  opacity: 0.7;
}
.palette-col__chip{
  width:100%; height:200px;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:
    0 20px 50px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 0 0 1px rgba(255,255,255,.05);
  position: relative;
  transition: transform .2s ease, box-shadow .3s ease;
  cursor: pointer;
}
.palette-col__chip:hover{
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 25px 60px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 0 1px rgba(255,255,255,.08);
}
.palette-col__chip::before{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,0) 40%);
  mix-blend-mode: screen; opacity:.7;
}
.palette-columns.shape-circle .palette-col__chip{
  border-radius: 50%;
  aspect-ratio: 1;
  height: auto;
  max-height: 200px;
  max-width: 200px;
  margin: 0 auto;
}
.palette-col__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 0 4px;
}
.palette-col__hex{
  font-weight:700;
  letter-spacing:.3px;
  font-size: 15px;
  flex: 1;
  text-align: center;
}
.palette-col__remove{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.5;
  transition: all .2s ease;
}
.palette-col__remove:hover{
  opacity: 1;
  background: rgba(255,100,100,.2);
  color: #ff6464;
}
.palette-col__row{ 
  display:flex; gap:8px; flex-wrap:wrap; justify-content:center; 
  opacity:.85; font-size:11px; 
}
.palette-col__pill{ 
  padding:4px 8px; border-radius:10px; 
  border:1px solid var(--line); 
  background: var(--panel-2);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* === IMAGE EXTRACTED PALETTE === */
.image-swatches{ 
  padding:16px; 
  background: transparent; 
}
.image-swatches__head{ 
  display:flex; align-items:baseline; justify-content:space-between; 
  margin-bottom:12px; 
}
.image-swatches__head h3{
  font-weight: 600;
  margin: 0;
}
.image-swatches__head small{
  opacity: 0.7;
  font-size: 12px;
}
.image-swatches__list{ 
  list-style:none; margin:0; padding:2px; 
  display:grid; gap:14px; 
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
  max-width:100%; 
}
.image-swatches__list .sw{ 
  position:relative; width:100%; height: 200px; 
  border-radius:18px; 
  border:1px solid var(--line); 
  box-shadow: 
    0 18px 46px rgba(0,0,0,.35), 
    inset 0 1px 0 rgba(255,255,255,.08);
  overflow:hidden; 
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-swatches__list .sw:hover{ 
  transform: translateY(-3px) scale(1.02); 
  border-color: var(--ring);
  box-shadow: 
    0 25px 60px rgba(0,0,0,.4),
    0 0 0 2px var(--ring),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.image-swatches__list .sw__label{ 
  position:absolute; left:10px; bottom:10px; 
  padding:6px 10px; border-radius:12px; 
  font-size:12px; font-weight: 600; letter-spacing: .2px;
  background: rgba(0,0,0,.6); color:#fff; 
  border:1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}
html[data-theme="light"] .image-swatches__list .sw__label{ 
  background: rgba(255,255,255,.85); 
  color:#0a0d12; 
  border-color: rgba(0,0,0,.15);
}

/* === ENHANCED BUTTONS === */
.btn{
  appearance:none;
  border-radius:12px;
  padding:10px 16px;
  border:1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  display:inline-flex; 
  align-items:center; 
  gap:8px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.btn:hover{ 
  transform: translateY(-1px); 
  background: var(--btn-bg-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.btn:focus-visible{ 
  outline:2px solid var(--ring); 
  outline-offset:2px; 
}
.btn[disabled]{ 
  opacity:.5; 
  pointer-events:none; 
}

.btn--primary{
  border:0;
  background: linear-gradient(135deg, var(--gradA), var(--gradB));
  color: var(--btnp-text);
  box-shadow: var(--btnp-shadow);
}
.btn--primary:hover{ 
  box-shadow: var(--btnp-shadow-hover);
  transform: translateY(-2px);
}

.btn-sm{
  padding: 6px 10px;
  font-size: 12px;
}

.btn-xs{
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 8px;
  min-height: 20px;
}

.btn svg{
  width:16px;
  height:16px;
  fill: currentColor;
  stroke: currentColor;
}

.btn-xs svg{
  width: 10px;
  height: 10px;
}

/* === SEGMENTED CONTROL === */
.seg{
  display:inline-flex;
  padding:4px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--panel-2);
  gap:4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

.seg--compact{
  padding: 1px;
  border-radius: 8px;
  gap: 1px;
}

.seg__btn{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--text);
  padding:10px 16px;
  border-radius:12px;
  cursor:pointer;
  font-weight: 500;
  transition: all .2s ease;
}

.seg--compact .seg__btn{
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.seg__btn.is-active{
  background:linear-gradient(135deg,var(--gradA),var(--gradB));
  color:#fff;
  box-shadow: 0 2px 8px rgba(91,140,255,.3);
}
.seg__btn:hover:not(.is-active){
  background: var(--panel);
}
html[data-theme="light"] .seg{
  background:#fff;
}

/* === ENHANCED INPUTS === */
input, textarea, select{
  background: var(--panel-2);
  color: var(--text);
  border:1px solid var(--line);
  border-radius: 12px;
  padding:12px;
  transition: all .2s ease;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus{
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(91,140,255,.1);
}

/* Palette size selector in header */
.palette-size-select {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  min-width: 100px;
  transition: border-color .2s ease;
}

.palette-size-select:hover {
  border-color: var(--ring);
}

.palette-size-select option {
  background: var(--panel-2);
  color: var(--text);
}

/* Color pins on image */
.color-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: move;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-pin:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

.color-pin.dragging {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  z-index: 30;
  cursor: grabbing;
}

.color-pin-label {
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  user-select: none;
}

/* Range slider styling */
input[type="range"] {
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ring);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: all .15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
}

/* === CARDS & PANELS === */
.card{ 
  background: var(--panel); 
  border:1px solid var(--line); 
  border-radius: var(--radius); 
  transition: all .25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.card:hover{
  border-color: rgba(255,255,255,.2);
}
.card h3{
  margin: 0 0 12px 0;
  font-weight: 600;
  font-size: 16px;
}

/* === ENHANCED GRADIENT DISPLAY === */
#gradient{
  height: 160px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 
    0 8px 30px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
  position: relative;
  overflow: hidden;
}
#gradient::before{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 50%);
  pointer-events: none;
}

/* === NAVIGATION POLISH === */
.nav__item{
  transition: all .2s ease;
}
.nav__item:hover{ 
  border-color: var(--ring);
  background: var(--panel);
}
.nav__item.is-active{
  background:linear-gradient(135deg,rgba(91,140,255,.25),rgba(34,211,238,.22));
  border-color: var(--ring);
}

/* === PALETTE ACTIONS === */
.palette-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* === ACCESSIBILITY & RESPONSIVE === */
@media (max-width: 600px){
  .palette-col__chip{ height:150px; }
  .palette-columns.shape-circle .palette-col__chip{ max-height: 150px; max-width: 150px; }
  .image-swatches__list .sw{ height:160px; }
  .stop-control{
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
  .gradient-type-controls{
    flex-direction: column;
  }
  .preset-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .palette-actions {
    gap: 4px;
  }

  .seg--compact .seg__btn {
    padding: 3px 6px;
    font-size: 9px;
  }

  .btn-xs {
    padding: 3px 6px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === FOCUS IMPROVEMENTS === */
.sw:focus-visible,
.palette-col__chip:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* === LOADING STATES === */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.1);
  border-radius: inherit;
}

/* === ENHANCED IMAGE & PALETTE VIEW STYLES === */
/* Add this entire block to the END of your components.css file */

/* === IMAGE VIEW ENHANCEMENTS === */
.image-preview-section,
.image-controls-section,
.extracted-palette-section,
.main-palette-section,
.color-analysis-section {
  margin: 0 16px 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.image-preview-content,
.image-controls-content,
.extracted-palette-content {
  max-height: 400px;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.color-analysis-content {
  max-height: 800px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
}

.main-palette-content {
  overflow: visible;
  transition: max-height .3s ease, padding .3s ease;
}

.image-preview-content.collapsed,
.image-controls-content.collapsed,
.extracted-palette-content.collapsed,
.main-palette-content.collapsed,
.color-analysis-content.collapsed {
  max-height: 0;
  padding: 0;
}

/* === IMAGE CANVAS === */
.image-canvas-container {
  padding: 20px;
  position: relative;
  background: linear-gradient(135deg, #0d1117 0%, #0a0d12 100%);
}

p0px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.crosshair {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(0,0,0,.6));
  box-shadow: 0 0 0 1px rgba(0,0,0,.3);
  z-index: 10;
}

/* === IMAGE CONTROLS === */
.image-controls-content {
  padding: 16px 20px;
}

.image-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* === ENHANCED BUTTON STYLES FOR IMAGE EXTRACTION === */
.image-btn,
[data-view="image"] .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #121723;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .06s ease, border-color .2s, background .2s, box-shadow .2s;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

html[data-theme="light"] .image-btn,
html[data-theme="light"] [data-view="image"] .btn {
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(245,247,252,1));
  color: var(--text);
}

.image-btn:hover,
[data-view="image"] .btn:hover {
  border-color: rgba(91,140,255,.55);
  background: rgba(91,140,255,.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91,140,255,.2);
}

html[data-theme="light"] .image-btn:hover,
html[data-theme="light"] [data-view="image"] .btn:hover {
  background: rgba(91,140,255,.12);
  border-color: rgba(91,140,255,.4);
}

.image-btn:active,
[data-view="image"] .btn:active {
  transform: translateY(1px);
}

.image-btn svg,
[data-view="image"] .btn svg {
  width: 16px;
  height: 16px;
}

/* Secondary button variant */
[data-view="image"] .btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,.08);
  color: var(--muted);
}

html[data-theme="light"] [data-view="image"] .btn-secondary {
  background: transparent;
  border-color: rgba(0,0,0,.12);
}

[data-view="image"] .btn-secondary:hover {
  background: rgba(255,100,100,.1);
  border-color: rgba(255,100,100,.3);
  color: #ff6464;
  box-shadow: 0 4px 12px rgba(255,100,100,.15);
}

html[data-theme="light"] [data-view="image"] .btn-secondary:hover {
  background: rgba(255,100,100,.08);
  border-color: rgba(255,100,100,.25);
}

/* === HORIZONTAL SWATCHES === */
.horizontal-swatches {
  padding: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.horizontal-swatch {
  min-width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.15);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .2s ease;
  box-shadow: 
    0 8px 24px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
}

.horizontal-swatch:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255,255,255,.3);
  box-shadow: 
    0 12px 32px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.15);
}

.horizontal-swatch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 50%);
  pointer-events: none;
}

.horizontal-swatch-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0,0,0,.7);
  color: white;
  text-align: center;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  backdrop-filter: blur(8px);
}

/* === COLOR ANALYSIS === */
.color-analysis-content {
  padding: 20px;
}

.selected-color-info {
  min-height: 200px;
}

.no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--muted);
  text-align: center;
}

.no-selection-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.color-analysis-main {
  display: grid;
  gap: 20px;
}

/* === ANALYZED COLOR CARD === */
.analyzed-color {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.analyzed-color-chip {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: 
    0 12px 32px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
  position: relative;
  overflow: hidden;
}

.analyzed-color-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 50%);
  pointer-events: none;
}

.analyzed-color-info h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.color-name {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.color-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.color-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-value .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.color-value .value {
  font-size: 12px;
  font-weight: 600;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--text);
  padding: 6px 8px;
  background: var(--panel);
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* === COLOR HARMONIES === */
.color-harmonies {
  padding: 16px 20px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.color-harmonies h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.harmony-colors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.harmony-color {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.harmony-chip {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.15);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .2s ease;
  box-shadow: 
    0 4px 12px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.08);
  margin-bottom: 8px;
}

.harmony-chip:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255,255,255,.3);
  box-shadow: 
    0 8px 20px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.harmony-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 50%);
  pointer-events: none;
}

.harmony-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.harmony-hex {
  font-size: 9px;
  font-weight: 600;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--text);
  padding: 2px 6px;
  background: var(--panel);
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* === COLOR SHADES === */
.color-shades {
  padding: 16px 20px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.color-shades h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.shades-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.shade-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shade-chip {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .15s ease;
  box-shadow: 
    0 2px 8px rgba(0,0,0,.1),
    inset 0 1px 0 rgba(255,255,255,.05);
  margin-bottom: 6px;
}

.shade-chip:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,.3);
  box-shadow: 
    0 4px 12px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.1);
  z-index: 2;
}

.shade-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 50%);
  pointer-events: none;
}

.shade-hex {
  font-size: 8px;
  font-weight: 600;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--muted);
  padding: 2px 4px;
  background: var(--panel);
  border-radius: 3px;
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity .2s ease;
}

.shade-item:hover .shade-hex {
  opacity: 1;
}

/* === PANEL HEADER IMPROVEMENTS === */
.panel-header {
  padding: 12px 16px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 11px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .2s ease;
}

.panel-header--compact {
  padding: 4px 10px;
  cursor: default;
  font-size: 10px;
  min-height: 28px;
}

.panel-header--compact span {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.panel-header--compact:hover {
  background: rgba(255,255,255,.02);
}

.panel-header:hover {
  background: rgba(255,255,255,.04);
}

.panel-toggle {
  font-size: 10px;
  opacity: 0.7;
  transition: transform .2s ease;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .image-preview-section,
  .image-controls-section,
  .extracted-palette-section,
  .main-palette-section,
  .color-analysis-section {
    margin: 0 16px 12px 16px;
  }
  
  .image-canvas-container {
    padding: 16px;
  }
  
  `0px;
  }
  
  .analyzed-color {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .analyzed-color-chip {
    justify-self: center;
  }
  
  .color-values {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .harmony-colors {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .shades-row {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .palette-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
}

/* === EXPORT DROPDOWN === */
.export-dropdown-wrapper {
  position: relative !important;
  display: inline-block !important;
}

.export-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  min-width: 160px !important;
  z-index: 9999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px) !important;
  transition: all 0.2s ease !important;
  pointer-events: none !important;
}

.export-dropdown.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.export-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.export-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.export-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.export-dropdown-item:hover {
  background: var(--panel-hover);
}

.export-dropdown-item svg {
  flex-shrink: 0;
}