/* ============================================
   SHOTFRAME — Screenshot Beautifier
   Neo-brutalist design: bold, raw, unforgettable
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Neo-brutalist palette */
  --bg: #FFFBF0;
  --bg-panel: #FFFFFF;
  --bg-dark: #1a1a2e;
  
  --ink: #1a1a2e;
  --ink-soft: #4a4a68;
  --ink-muted: #8b8ba0;
  
  --pop: #FF6B35;
  --pop-light: #FFF0E8;
  --teal: #00D4AA;
  --teal-light: #E0FFF6;
  --lemon: #E8FF00;
  --lavender: #C8B6FF;
  --pink: #FF85A1;
  
  --border: #1a1a2e;
  --border-w: 3px;
  --shadow: 6px 6px 0px #1a1a2e;
  --shadow-pop: 6px 6px 0px var(--pop);
  --shadow-teal: 6px 6px 0px var(--teal);
  --shadow-sm: 4px 4px 0px #1a1a2e;
  
  --sidebar-width: 340px;
  --header-height: 64px;
  
  --radius: 12px;
  --radius-sm: 8px;
  
  --transition: 150ms ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: var(--border-w) solid var(--border);
  background: var(--lemon);
  flex-shrink: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-icon svg rect {
  stroke: var(--ink) !important;
}
.logo-icon svg rect:last-of-type {
  fill: var(--ink) !important;
}

.logo-text {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-transform: uppercase;
}

.logo-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--lemon);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: var(--border-w) solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  background: var(--bg-panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px #1a1a2e;
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #1a1a2e;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--pop);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 8px 8px 0px #1a1a2e;
  background: #FF5722;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
}

.btn-ghost {
  background: var(--ink);
  color: var(--lemon);
  box-shadow: none;
  border-color: var(--ink);
}

.btn-ghost:hover {
  background: #2a2a4e;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--pop);
}

.btn-ghost svg {
  color: var(--lemon);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--header-height));
}

/* ============================================
   PREVIEW AREA
   ============================================ */

.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: auto;
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(26, 26, 46, 0.07) 1px, transparent 0);
  background-size: 24px 24px;
}

.preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dropzone */
.dropzone {
  width: 100%;
  max-width: 640px;
  border: var(--border-w) dashed var(--ink);
  border-radius: var(--radius);
  padding: 72px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.dropzone:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px var(--pop);
  border-color: var(--pop);
}

.dropzone.drag-over {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
}

.dropzone-content {
  text-align: center;
}

.dropzone-icon {
  color: var(--ink);
  margin-bottom: 20px;
}

.dropzone-icon svg {
  stroke-width: 3;
}

.dropzone-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.dropzone-subtitle {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dropzone-subtitle kbd {
  font-family: 'Space Mono', monospace;
  background: var(--lemon);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  box-shadow: 2px 2px 0px var(--border);
}

/* Preview Wrapper */
.preview-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.preview-wrapper canvas {
  max-width: 100%;
  max-height: calc(100vh - var(--header-height) - 64px);
  border-radius: var(--radius);
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow);
  object-fit: contain;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-left: var(--border-w) solid var(--border);
  background: var(--bg-panel);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--ink);
  border-radius: 4px;
}

.sidebar-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Control Sections */
.control-section {
  padding: 18px 0;
  border-bottom: 2px solid var(--ink);
}

.control-section:last-child {
  border-bottom: none;
}

.section-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-value {
  margin-left: auto;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pop);
  background: var(--pop-light);
  padding: 2px 8px;
  border-radius: 4px;
  border: 2px solid var(--pop);
}

/* Gradient Grid */
.gradient-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gradient-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: var(--border-w) solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 3px 3px 0px var(--border);
}

.gradient-swatch:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--border);
}

.gradient-swatch.active {
  box-shadow: 5px 5px 0px var(--pop);
  border-color: var(--pop);
  transform: translate(-2px, -2px);
}

.gradient-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Sliders */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 2px solid var(--border);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pop);
  border: var(--border-w) solid var(--border);
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--border);
  transition: all var(--transition);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #FF5722;
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pop);
  border: var(--border-w) solid var(--border);
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--border);
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: 12px;
  transition: background var(--transition);
  border: var(--border-w) solid var(--border);
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-muted);
  border: 2px solid var(--border);
  top: 1px;
  left: 1px;
  transition: all var(--transition);
}

.toggle input:checked + .toggle-track {
  background: var(--teal);
  border-color: var(--border);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: white;
  border-color: var(--border);
}

/* Sub controls */
.sub-control {
  margin-top: 14px;
}

.sub-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Aspect Ratio Buttons */
.aspect-buttons {
  display: flex;
  gap: 8px;
}

.aspect-btn {
  flex: 1;
  padding: 8px 0;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 2px 2px 0px var(--border);
}

.aspect-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border);
}

.aspect-btn.active {
  background: var(--ink);
  color: var(--lemon);
  box-shadow: 2px 2px 0px var(--pop);
}

/* Custom Color Swatch */
.custom-color-wrapper {
  position: relative;
  aspect-ratio: 1;
}

.custom-swatch {
  width: 100%;
  height: 100%;
  position: relative;
}

.custom-swatch::before {
  content: '+';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.custom-color-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}

/* ============================================
   GALLERY GRID (Bulk Mode)
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px;
  overflow-y: auto;
  align-content: start;
  width: 100%;
  height: 100%;
}

@media (min-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 800px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px; }
}

.gallery-tile {
  position: relative;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
}

.gallery-tile.selected {
  border-color: var(--pop);
  box-shadow: 6px 6px 0px var(--pop);
}

.gallery-tile .tile-canvas-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.gallery-tile canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-tile .tile-select {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: var(--border-w) solid var(--border);
  background: var(--bg-panel);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  z-index: 2;
}

.gallery-tile.selected .tile-select {
  background: var(--pop);
  border-color: var(--pop);
  color: white;
}

.gallery-tile .tile-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all var(--transition);
}

.gallery-tile:hover .tile-remove {
  display: flex;
}

.gallery-tile .tile-remove:hover {
  background: var(--pop);
  color: white;
}

.gallery-tile .tile-caption {
  padding: 8px 10px;
  border-top: 2px solid var(--border);
}

.gallery-tile .tile-caption input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.gallery-tile .tile-caption input::placeholder {
  color: var(--ink-muted);
}

/* Gallery Toolbar */
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  box-shadow: 2px 2px 0px var(--border);
}

.selection-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pop);
}

/* Export All Button */
.btn-lemon {
  background: var(--lemon);
  color: var(--ink);
  width: 100%;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.btn-lemon:hover:not(:disabled) {
  background: #D4EB00;
  box-shadow: 8px 8px 0px var(--border);
}

/* Remove Image Button */
.btn-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--border-w) solid var(--border);
  background: var(--bg-panel);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.btn-remove:hover {
  background: var(--pop);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
}

.preview-wrapper {
  position: relative;
}

/* Frame Buttons */
.frame-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.frame-btn {
  flex: 1;
  min-width: 55px;
  padding: 7px 4px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 2px 2px 0px var(--border);
  text-align: center;
}

.frame-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border);
}

.frame-btn.active {
  background: var(--ink);
  color: var(--lemon);
  box-shadow: 2px 2px 0px var(--pop);
}

/* Social Media Buttons */
.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.social-btn {
  padding: 8px 6px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 2px 2px 0px var(--border);
  text-align: center;
}

.social-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border);
}

.social-btn.active {
  background: var(--teal);
  color: var(--ink);
  box-shadow: 2px 2px 0px var(--border);
  border-color: var(--border);
}

/* Text Input */
.text-input {
  width: 100%;
  padding: 10px 14px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: all var(--transition);
  box-shadow: 2px 2px 0px var(--border);
}

.text-input:focus {
  box-shadow: 4px 4px 0px var(--pop);
  border-color: var(--pop);
}

.text-input::placeholder {
  color: var(--ink-muted);
}

/* Color Picker Row */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.color-input {
  width: 36px;
  height: 36px;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  cursor: pointer;
  background: var(--bg);
  box-shadow: 2px 2px 0px var(--border);
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.color-hex {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Custom Color Swatch */
.custom-color-wrapper {
  position: relative;
}

.custom-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-plus {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.custom-color-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Copy Button */
.btn-teal {
  background: var(--teal);
  color: var(--ink);
  width: 100%;
}

.btn-teal:hover:not(:disabled) {
  background: #00E8BB;
  box-shadow: 8px 8px 0px var(--border);
}

/* Export Section */
.export-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-bottom: none !important;
}

.btn-export {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-copy {
  padding: 12px 20px;
  font-size: 0.9rem;
}

.btn-reset {
  width: 100%;
}

/* ============================================
   TOAST
   ============================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  border: var(--border-w) solid var(--border);
  color: var(--lemon);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transition: all 350ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  box-shadow: var(--shadow-teal);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 200ms ease;
}

.modal {
  background: var(--bg-panel);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 10px 10px 0px var(--pop);
  animation: slideUp 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
  font-weight: 700;
}

.modal-close:hover {
  color: var(--pop);
}

.modal-icon {
  margin-bottom: 16px;
}

.modal-icon svg path {
  fill: var(--pop) !important;
}

.modal-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 28px;
}

.modal-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}

.modal-feature {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
}

.btn-modal-cta {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  background: var(--pop);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-modal-cta:hover:not(:disabled) {
  box-shadow: 8px 8px 0px var(--border);
  background: #FF5722;
}

.modal-fine {
  font-size: 0.73rem;
  color: var(--ink-muted);
  margin-top: 14px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 900px) {
  .main {
    flex-direction: column-reverse;
  }
  
  .sidebar {
    width: 100%;
    border-left: none;
    border-top: var(--border-w) solid var(--border);
    max-height: 45vh;
  }
  
  .preview-area {
    padding: 16px;
    min-height: 300px;
  }
  
  .preview-wrapper canvas {
    max-height: 40vh;
  }
  
  .dropzone {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .header-actions .btn span {
    display: none;
  }
  
  .gradient-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .sidebar-inner {
    padding: 16px;
  }
}

/* ============================================
   UTILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
