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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f13;
  color: #e0e0e6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile blocker */
#mobile-blocker {
  display: none;
  position: fixed; inset: 0; z-index: 10000;
  background: #0f0f13;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  text-align: center; padding: 32px;
}
#mobile-blocker h2 { font-size: 22px; font-weight: 600; }
#mobile-blocker p { font-size: 14px; color: #888; line-height: 1.6; }

@media (max-width: 768px), (max-height: 500px) {
  #mobile-blocker { display: flex; }
  .screen { display: none !important; }
  .brush-cursor { display: none !important; }
}

.screen { display: none; width: 100%; min-height: 100vh; }
.screen.active { display: flex; }

#upload-screen {
  align-items: center; justify-content: center; flex-direction: column;
  position: relative; overflow: hidden;
}

/* Particle canvas */
#particle-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.landing-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 40px;
}

/* Hero */
.landing-hero {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-icon {
  width: 56px; height: 56px; margin-bottom: 4px;
  animation: heroFloat 4s ease-in-out infinite;
}
.hero-icon svg { width: 100%; height: 100%; }
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

h1.title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #e0e0e6 0%, #6c63ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
p.subtitle { color: #666; font-size: 14px; letter-spacing: 0.3px; }

/* Landing cards */
.landing-cards {
  display: flex; gap: 28px; justify-content: center; flex-wrap: wrap;
  max-width: 90vw;
}
.landing-card {
  width: 300px; padding: 28px 24px; border-radius: 16px;
  background: rgba(22, 22, 30, 0.85); border: 1px solid #2a2a3a;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.landing-card:hover {
  border-color: #6c63ff; transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(108,99,255,0.15), 0 0 0 1px rgba(108,99,255,0.1);
}
.landing-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.landing-card .card-desc { font-size: 13px; color: #777; text-align: center; line-height: 1.5; }
.landing-card .browse-btn {
  padding: 10px 28px; border: none; border-radius: 8px;
  background: #6c63ff; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; letter-spacing: 0.2px;
}
.landing-card .browse-btn:hover { background: #5a52d5; box-shadow: 0 4px 16px rgba(108,99,255,0.3); }
.card-drop-zone {
  width: 100%; height: 110px; border: 2px dashed #2a2a3a; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: all .25s; background: rgba(15,15,19,0.6);
}
.card-drop-zone:hover, .card-drop-zone.drag-over {
  border-color: #6c63ff; background: rgba(108,99,255,0.06);
}
.card-drop-zone svg { width: 36px; height: 36px; stroke: #555; fill: none; stroke-width: 1.5; transition: stroke .25s; }
.card-drop-zone:hover svg { stroke: #6c63ff; }
.drop-label { font-size: 11px; color: #555; transition: color .25s; }
.card-drop-zone:hover .drop-label { color: #888; }

/* Convert result screen */
#convert-screen {
  align-items: center; justify-content: center; flex-direction: column; gap: 20px;
}
.convert-title { font-size: 22px; font-weight: 600; }
.convert-preview {
  max-width: 400px; max-height: 400px; border-radius: 12px; overflow: hidden;
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #2a2a2a;
}
.convert-preview canvas { display: block; max-width: 400px; max-height: 400px; object-fit: contain; }
.convert-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* old title/subtitle overrides removed — now in landing-hero section above */

#scanning-screen {
  align-items: center; justify-content: center; flex-direction: column; gap: 24px;
}
.scan-container { position: relative; max-width: 400px; max-height: 400px; border-radius: 12px; overflow: hidden; }
.scan-container img { display: block; max-width: 400px; max-height: 400px; object-fit: contain; }
.scan-line {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, #6c63ff, transparent);
  animation: scanAnim 2s ease-in-out infinite;
}
@keyframes scanAnim { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }
.progress-bar-outer {
  width: 300px; height: 6px; background: #1e1e28; border-radius: 3px; overflow: hidden;
}
.progress-bar-inner { height: 100%; width: 0; background: #6c63ff; transition: width .3s; border-radius: 3px; }
.scan-status { color: #888; font-size: 14px; }

#editor-screen { flex-direction: column; }
.editor-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #16161e; border-bottom: 1px solid #2a2a3a;
}
.editor-toolbar h2 { font-size: 16px; font-weight: 600; white-space: nowrap; }
.editor-body { display: flex; flex: 1; min-height: 0; }

.tool-sidebar {
  width: 52px; min-width: 52px; background: #13131a; border-right: 1px solid #2a2a3a;
  display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 4px;
}
.tool-btn {
  width: 38px; height: 38px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.tool-btn svg { width: 20px; height: 20px; stroke: #888; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn:hover { background: #1e1e28; }
.tool-btn:hover svg { stroke: #bbb; }
.tool-btn.active { background: #6c63ff33; }
.tool-btn.active svg { stroke: #6c63ff; }
.tool-btn:disabled { opacity: 0.35; cursor: default; }
.tool-btn:disabled:hover { background: transparent; }
.tool-divider { width: 28px; height: 1px; background: #2a2a3a; margin: 4px 0; }

.sidebar-control-group {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 44px; padding: 4px 0;
}
.sidebar-control-group label { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.sidebar-control-group input[type="range"] {
  writing-mode: vertical-lr; direction: rtl;
  width: 8px; height: 80px;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.sidebar-control-group input[type="range"]::-webkit-slider-runnable-track {
  width: 4px; background: #2a2a3a; border-radius: 2px;
}
.sidebar-control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #6c63ff; border: 2px solid #222; margin-left: -5px; cursor: pointer;
}
.ctrl-value { font-size: 10px; color: #aaa; font-variant-numeric: tabular-nums; }

.preview-panel {
  flex: 1; overflow: hidden; position: relative;
  background: #0f0f13; cursor: grab;
}
.preview-panel.grabbing { cursor: grabbing; }
.preview-panel.eraser-mode { cursor: crosshair; }
.preview-panel.brush-mode { cursor: none; }
.preview-viewport { width: 100%; height: 100%; overflow: hidden; }
.preview-canvas {
  transform-origin: 0 0; position: absolute; top: 0; left: 0;
  image-rendering: auto; will-change: transform;
}
.preview-canvas svg, .preview-canvas canvas { display: block; }
.checkerboard {
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #2a2a2a;
}
.zoom-info {
  position: absolute; bottom: 12px; right: 12px;
  background: #16161ecc; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; color: #aaa; pointer-events: none;
}

.palette-panel {
  width: 220px; min-width: 220px; background: #13131a;
  border-left: 1px solid #2a2a3a; display: flex; flex-direction: column;
}
.palette-header {
  padding: 12px 14px 8px; font-size: 12px; color: #888;
  border-bottom: 1px solid #2a2a3a;
}
.tolerance-control {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-bottom: 1px solid #2a2a3a;
  font-size: 11px; color: #888;
}
.tolerance-control label { white-space: nowrap; flex-shrink: 0; }
.tolerance-control input[type="range"] { flex: 1; min-width: 40px; }
.tolerance-control .ctrl-value { min-width: 20px; text-align: center; color: #ccc; flex-shrink: 0; }
.palette-list { flex: 1; overflow-y: auto; padding: 6px; }
.palette-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.palette-item:hover { background: #1a1a24; }
.palette-item.highlighted { background: #6c63ff22; }
.palette-item input[type="checkbox"] {
  accent-color: #6c63ff; width: 15px; height: 15px; cursor: pointer;
}
.swatch {
  width: 22px; height: 22px; border-radius: 4px; border: 1px solid #444;
  flex-shrink: 0; cursor: pointer; position: relative;
}
.color-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.color-hex { font-size: 12px; font-family: 'SF Mono', Menlo, monospace; }
.color-count { font-size: 10px; color: #666; }
.bg-label {
  display: inline-block; font-size: 9px; background: #6c63ff44; color: #a9a4ff;
  padding: 1px 4px; border-radius: 3px; vertical-align: middle; margin-left: 2px;
}

.bg-picker-group {
  display: flex; align-items: center; gap: 4px; margin-left: 12px;
}
.bg-picker-label { font-size: 12px; color: #888; margin-right: 2px; }
.bg-swatch {
  width: 22px; height: 22px; border-radius: 4px; border: 2px solid transparent;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.bg-swatch.active { border-color: #6c63ff; }
.bg-swatch:hover { border-color: #555; }
.mini-checker {
  display: block; width: 14px; height: 14px; border-radius: 2px;
  background-image:
    linear-gradient(45deg, #666 25%, transparent 25%),
    linear-gradient(-45deg, #666 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #666 75%),
    linear-gradient(-45deg, transparent 75%, #666 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-color: #ccc;
}
.bg-custom-input {
  width: 22px; height: 22px; border: 2px solid transparent; border-radius: 4px;
  padding: 0; cursor: pointer; background: none; -webkit-appearance: none;
  transition: border-color .15s;
}
.bg-custom-input::-webkit-color-swatch-wrapper { padding: 0; }
.bg-custom-input::-webkit-color-swatch { border: none; border-radius: 2px; }
.bg-custom-input.active { border-color: #6c63ff; }

.toolbar-btn {
  padding: 7px 16px; border: 1px solid #3a3a4a; border-radius: 8px;
  background: transparent; color: #ccc; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.toolbar-btn:hover { border-color: #555; color: #fff; }
.toolbar-btn.primary { background: #6c63ff; border-color: #6c63ff; color: #fff; }
.toolbar-btn.primary:hover { background: #5a52d5; }

.brush-cursor {
  position: fixed; border: 2px solid rgba(255, 80, 80, 0.8); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
}
.brush-cursor.visible { display: block; }

.new-image-btn {
  padding: 7px 16px; border: 1px solid #3a3a4a; border-radius: 8px;
  background: transparent; color: #ccc; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.new-image-btn:hover { border-color: #6c63ff; color: #fff; }

/* Recolor popup */
.recolor-popup {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #1e1e28; border: 1px solid #3a3a4a; border-radius: 8px;
  padding: 8px; display: flex; flex-wrap: wrap; gap: 4px;
  z-index: 100; min-width: 100px; max-width: 180px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.recolor-swatch {
  width: 24px; height: 24px; border-radius: 4px; border: 1px solid #444;
  cursor: pointer; transition: transform .1s;
}
.recolor-swatch:hover { transform: scale(1.15); border-color: #6c63ff; }
.recolor-divider {
  width: 100%; height: 1px; background: #3a3a4a; margin: 4px 0;
}
.recolor-custom-label {
  width: 100%; font-size: 10px; color: #888; margin-bottom: 2px;
}
.recolor-custom-input {
  width: 100%; height: 28px; border: 1px solid #3a3a4a; border-radius: 4px;
  background: none; cursor: pointer; padding: 0;
  -webkit-appearance: none;
}
.recolor-custom-input::-webkit-color-swatch-wrapper { padding: 2px; }
.recolor-custom-input::-webkit-color-swatch { border: none; border-radius: 2px; }

/* Delete palette pixels button */
.palette-ctx-menu {
  position: fixed; background: #1e1e28; border: 1px solid #3a3a4a; border-radius: 8px;
  padding: 4px 0; z-index: 9999; min-width: 170px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.palette-ctx-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; cursor: pointer;
  font-size: 12px; color: #ccc; white-space: nowrap;
}
.palette-ctx-item:hover { background: #2a2a3a; }
.palette-ctx-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.palette-ctx-item.danger { color: #f55; }
.palette-ctx-sep { height: 1px; background: #2a2a3a; margin: 4px 0; }

/* Screen list */
.screen-header {
  padding: 10px 14px 6px; font-size: 12px; color: #888;
  border-top: 1px solid #2a2a3a;
  display: flex; align-items: center; justify-content: space-between;
}
.screen-header button {
  width: 22px; height: 22px; border: 1px solid #3a3a4a; border-radius: 4px;
  background: transparent; color: #aaa; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.screen-header button:hover { border-color: #6c63ff; color: #fff; }
.screen-list { overflow-y: auto; padding: 4px 6px; max-height: 180px; }
.screen-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 5px; cursor: pointer;
  font-size: 12px; color: #bbb; transition: background .15s;
}
.screen-item:hover { background: #1a1a24; }
.screen-item.active { background: #6c63ff22; color: #fff; }
.screen-item input[type="checkbox"] {
  accent-color: #6c63ff; width: 14px; height: 14px; cursor: pointer;
}
.screen-item .screen-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-thumb {
  border: 1px solid #3a3a4a; border-radius: 3px; flex-shrink: 0;
  background-image:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
    linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
  background-color: #252525;
}
.screen-item.active .screen-thumb { border-color: #6c63ff; }
.screen-delete-btn {
  width: 18px; height: 18px; border: none; background: transparent;
  cursor: pointer; padding: 0; margin-left: auto; opacity: 0;
  transition: opacity .15s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.screen-item:hover .screen-delete-btn { opacity: 0.5; }
.screen-delete-btn:hover { opacity: 1 !important; }
.screen-delete-btn svg { width: 12px; height: 12px; stroke: #f55; fill: none; stroke-width: 2.5; stroke-linecap: round; }
.screen-context-menu {
  position: fixed; z-index: 1000;
  background: #1e1e28; border: 1px solid #3a3a4a; border-radius: 6px;
  padding: 4px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5); min-width: 120px;
}
.screen-context-menu button {
  padding: 6px 12px; border: none; border-radius: 4px;
  background: transparent; color: #ccc; font-size: 12px; cursor: pointer;
  text-align: left; transition: background .1s;
}
.screen-context-menu button:hover { background: #6c63ff33; color: #fff; }
.screen-rename-input {
  flex: 1; min-width: 0; background: #0f0f13; border: 1px solid #6c63ff;
  border-radius: 3px; color: #fff; font-size: 12px; padding: 1px 4px;
  outline: none;
}

/* Lasso tool */
.preview-panel.lasso-mode { cursor: crosshair; }
.preview-panel.composite-view { cursor: grab; }
.preview-panel.composite-view.eraser-mode,
.preview-panel.composite-view.brush-mode,
.preview-panel.composite-view.lasso-mode { cursor: not-allowed; }
.composite-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: #6c63ffcc; color: #fff; font-size: 12px; font-weight: 500;
  padding: 5px 14px; border-radius: 6px; z-index: 10; pointer-events: none;
  white-space: nowrap;
}
.lasso-popup {
  position: fixed; z-index: 1000;
  background: #1e1e28; border: 1px solid #3a3a4a; border-radius: 8px;
  padding: 6px; display: flex; gap: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.lasso-popup button {
  padding: 5px 10px; border: 1px solid #3a3a4a; border-radius: 5px;
  background: transparent; color: #ccc; font-size: 12px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.lasso-popup button:hover { border-color: #6c63ff; color: #fff; }

/* Tab bar */
.tab-bar {
  display: flex; gap: 2px; margin-left: 16px;
  background: #0f0f13; border-radius: 6px; padding: 2px;
}
.tab-btn {
  padding: 5px 14px; border: none; border-radius: 5px;
  background: transparent; color: #888; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.tab-btn:hover { color: #ccc; }
.tab-btn.active { background: #6c63ff; color: #fff; }

/* Animation tab */
.tab-content { flex: 1; min-height: 0; }
.anim-layout {
  display: flex; width: 100%; height: 100%;
}
.anim-preview-panel {
  width: 30%; min-width: 200px; display: flex; flex-direction: column;
  border-right: 1px solid #2a2a3a; background: #0f0f13;
  min-height: 0; overflow: hidden;
}
.anim-preview-area {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.anim-preview-panel canvas {
  display: block;
  background-image:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
    linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #222;
}
.anim-controls {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #16161e; border-top: 1px solid #2a2a3a;
}
.anim-controls button {
  padding: 5px 12px; border: 1px solid #3a3a4a; border-radius: 6px;
  background: transparent; color: #ccc; font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.anim-controls button:hover { border-color: #6c63ff; color: #fff; }
#anim-time-display {
  font-size: 12px; color: #888; font-family: 'SF Mono', Menlo, monospace;
  margin-left: auto;
}
.anim-timeline-panel {
  width: 40%; display: flex; flex-direction: column;
  border-right: 1px solid #2a2a3a; background: #13131a;
}
.anim-timeline-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #2a2a3a;
  font-size: 13px; font-weight: 600;
}
.anim-timeline-header button {
  padding: 3px 10px; border: 1px solid #3a3a4a; border-radius: 5px;
  background: transparent; color: #aaa; font-size: 11px; cursor: pointer;
  transition: all .15s;
}
.anim-timeline-header button:hover { border-color: #6c63ff; color: #fff; }
.anim-timeline {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.anim-timeline-row {
  background: #1a1a24; border: 1px solid #2a2a3a; border-radius: 8px;
  padding: 8px; min-height: 56px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  position: relative;
}
.anim-timeline-row .row-label {
  font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: .5px;
  writing-mode: vertical-lr; transform: rotate(180deg);
  margin-right: 4px; user-select: none;
}
.anim-block {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px; background: #22223a; border: 1px solid #3a3a5a;
  border-radius: 6px; cursor: grab; user-select: none;
  transition: all .15s; min-width: 90px;
}
.anim-block:hover { border-color: #6c63ff; }
.anim-block.selected { border-color: #6c63ff; background: #2a2a4a; box-shadow: 0 0 0 2px #6c63ff44; }
.anim-block.dragging { opacity: 0.5; border-style: dashed; }
.anim-block .block-screen { font-size: 11px; color: #ccc; font-weight: 500; }
.anim-block .block-type { font-size: 10px; color: #888; }
.anim-block .block-dur { font-size: 9px; color: #666; }
.anim-block-remove {
  position: absolute; top: -4px; right: -4px; width: 16px; height: 16px;
  border: none; border-radius: 50%; background: #f55; color: #fff;
  font-size: 10px; cursor: pointer; display: none;
  align-items: center; justify-content: center; line-height: 1;
}
.anim-block:hover .anim-block-remove { display: flex; }
.anim-add-block-btn {
  padding: 4px 10px; border: 1px dashed #3a3a4a; border-radius: 6px;
  background: transparent; color: #666; font-size: 11px; cursor: pointer;
  transition: all .15s;
}
.anim-add-block-btn:hover { border-color: #6c63ff; color: #aaa; }
.anim-drop-zone {
  width: 100%; min-height: 40px; border: 2px dashed #3a3a4a; border-radius: 8px;
  display: none; align-items: center; justify-content: center;
  color: #555; font-size: 11px; transition: all .15s;
}
.anim-drop-zone.visible { display: flex; }
.anim-drop-zone.drag-over { border-color: #6c63ff; background: #6c63ff11; color: #aaa; }
.anim-props-panel {
  width: 30%; min-width: 200px; display: flex; flex-direction: column;
  background: #13131a; overflow-y: auto;
}
.anim-props {
  padding: 14px; border-bottom: 1px solid #2a2a3a;
}
.anim-props h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.anim-hint { font-size: 12px; color: #666; }
.anim-props label {
  display: block; font-size: 11px; color: #888; margin-bottom: 3px; margin-top: 8px;
}
.anim-props label:first-of-type { margin-top: 0; }
.anim-props select, .anim-props input[type="number"] {
  width: 100%; padding: 5px 8px; border: 1px solid #3a3a4a; border-radius: 5px;
  background: #0f0f13; color: #ddd; font-size: 12px; outline: none;
}
.anim-props select:focus, .anim-props input[type="number"]:focus {
  border-color: #6c63ff;
}
.anim-export {
  padding: 14px; flex: 1; display: flex; flex-direction: column;
}
.anim-export h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.export-tabs {
  display: flex; gap: 2px; margin-bottom: 8px;
}
.export-tab {
  padding: 4px 10px; border: 1px solid #3a3a4a; border-radius: 5px;
  background: transparent; color: #888; font-size: 11px; cursor: pointer;
  transition: all .15s;
}
.export-tab:hover { color: #ccc; }
.export-tab.active { background: #6c63ff33; border-color: #6c63ff; color: #fff; }
.export-code {
  flex: 1; min-height: 120px; max-height: 300px; overflow: auto;
  background: #0a0a10; border: 1px solid #2a2a3a; border-radius: 6px;
  padding: 10px; font-size: 11px; color: #aaa; line-height: 1.5;
  font-family: 'SF Mono', Menlo, Consolas, monospace; white-space: pre-wrap;
  word-break: break-all;
}
#copy-code-btn {
  margin-top: 8px; padding: 5px 12px; border: 1px solid #3a3a4a; border-radius: 6px;
  background: transparent; color: #ccc; font-size: 12px; cursor: pointer;
  transition: all .15s; align-self: flex-start;
}
#copy-code-btn:hover { border-color: #6c63ff; color: #fff; }
