/* Sprite Fusion Pixel Snapper - Street Hype Dark Theme (Optimized Layout) */

:root {
  --bg-main: #090b0e;
  --bg-card: #11151c;
  --bg-card-sub: #161b24;
  --bg-input: #0c0f14;
  --border-color: #202734;
  --border-highlight: #333e52;
  
  /* Street Hype Neon Accents */
  --accent-green: #00ff88;
  --accent-cyan: #00e5ff;
  --accent-yellow: #ffea00;
  --accent-magenta: #ff0055;
  --accent-purple: #9d4edd;
  
  --text-main: #f0f3f8;
  --text-muted: #8a99b0;
  --text-dim: #4e5c72;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-neon: 0 0 16px rgba(0, 255, 136, 0.25);
  --shadow-brutal: 3px 3px 0px #000;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(rgba(32, 39, 52, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 39, 52, 0.25) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

/* ========================================================= */
/* Header with Integrated Segmented Navigation */
/* ========================================================= */

.app-header {
  background-color: rgba(17, 21, 28, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border-color);
  padding: 8px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.logo-badge {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-yellow));
  color: #000;
  font-weight: 900;
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.8px;
  box-shadow: var(--shadow-brutal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.app-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Integrated Mode Switcher (Segmented Control) */
.header-nav-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.header-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.header-tab-btn:hover {
  color: #fff;
}

.header-tab-btn.active {
  background: var(--border-highlight);
  color: var(--accent-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

/* Right Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background-color: rgba(0, 255, 136, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-secondary {
  background: var(--bg-card-sub);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ========================================================= */
/* Main Layout */
/* ========================================================= */

.main-content {
  max-width: 1720px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 20px;
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
}

.main-content > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1080px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 8px 12px;
  }
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .brand-area {
    width: 100%;
    justify-content: flex-start;
  }
  .brand-titles .app-subtitle {
    display: none;
  }
  .header-nav-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .header-tab-btn {
    justify-content: center;
    padding: 6px 4px;
    font-size: 0.78rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .main-content {
    padding: 8px 10px;
  }
  .stage-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .view-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .view-tab-btn {
    text-align: center;
    padding: 6px 4px;
  }
  .metrics-pills-row {
    justify-content: center;
    gap: 6px;
  }
  .metric-pill {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
  .zoom-controls {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  .side-by-side-wrap {
    flex-direction: column;
  }
  .compare-box {
    min-width: 0;
    width: 100%;
  }
  .stage-container {
    min-height: 360px;
    height: 50vh;
  }
  .batch-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .batch-top-actions {
    width: 100%;
  }
  .batch-top-actions .btn-primary,
  .batch-top-actions .btn-accent {
    flex: 1;
    justify-content: center;
  }
}

/* ========================================================= */
/* Left Column: Control Panel */
/* ========================================================= */

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  min-width: 0;
  max-width: 100%;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Compact Dropzone */
.dropzone.compact {
  border: 2px dashed var(--border-highlight);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone.compact.dragover {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.05);
  box-shadow: var(--shadow-neon);
}

.dropzone-icon {
  font-size: 1.6rem;
}

.dropzone-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.dropzone-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-upload {
  background: var(--bg-card-sub);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.btn-upload:hover {
  background: var(--border-color);
  color: #fff;
}

.sample-pills-row {
  display: flex;
  gap: 4px;
}

.sample-chip {
  background: var(--bg-card-sub);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 234, 0, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-chip:hover {
  background: rgba(255, 234, 0, 0.12);
  border-color: var(--accent-yellow);
}

/* File metadata bar */
.file-meta-bar {
  margin-top: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.74rem;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.file-meta-bar.active {
  display: flex;
}

.file-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.file-meta-key {
  color: var(--text-dim);
}

.file-meta-val {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Snapping Settings Form */
.control-group {
  margin-bottom: 12px;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.highlight-val {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.8rem;
}

.pill-group {
  display: inline-flex;
  background: var(--bg-input);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--border-highlight);
  color: #fff;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-range {
  flex: 1;
  accent-color: var(--accent-green);
  cursor: pointer;
  height: 5px;
  background: var(--border-color);
  border-radius: 3px;
}

.num-input {
  width: 58px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  text-align: right;
}

.unit-text {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.preset-pills {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.preset-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.preset-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
}

.preset-pill:hover, .preset-pill.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Palette section */
.palette-preset-select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.palette-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 44px;
}

.palette-input:focus, .num-input:focus, .palette-preset-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.palette-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 6px;
  min-height: 24px;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.palette-swatch {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.1s ease;
}

.palette-swatch:hover {
  transform: scale(1.25);
  z-index: 2;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.palette-swatch.dark-color {
  border-color: rgba(255, 255, 255, 0.4);
}

.palette-error-text {
  color: var(--accent-magenta);
  font-size: 0.72rem;
  margin-top: 2px;
  display: none;
}

.palette-error-text.active {
  display: block;
}

/* Action Cards & Buttons */
.action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.btn-primary {
  background: var(--accent-green);
  color: #06110a;
  border: none;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: var(--shadow-brutal), var(--shadow-neon);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary:hover:not(:disabled) {
  background: #33ff9f;
  transform: translateY(-1px);
  box-shadow: 3px 4px 0px #000, 0 0 16px rgba(0, 255, 136, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 1px 1px 0px #000;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-download {
  background: var(--accent-yellow);
  color: #121000;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-brutal);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-download.active {
  display: flex;
}

.btn-download:hover {
  background: #fff033;
  transform: translateY(-1px);
  box-shadow: 3px 4px 0px #000;
}

.btn-danger {
  background: rgba(255, 0, 85, 0.12);
  color: var(--accent-magenta);
  border: 1px solid var(--accent-magenta);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  background: var(--accent-magenta);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  box-shadow: 2px 2px 0px #000 !important;
}

/* ========================================================= */
/* Right Column: Interactive Stage & Control Bar */
/* ========================================================= */

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.single-workspace-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Unified Slim Control Bar (Views + Metrics + Zoom) */
.stage-control-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.view-mode-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-input);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.view-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.view-tab-btn.active {
  background: var(--accent-magenta);
  color: #fff;
}

/* Compact Metric Pills */
.metrics-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
}

.m-label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.68rem;
}

.m-val {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Zoom Controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-right: 2px;
}

.btn-zoom {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 3px 7px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-zoom:hover, .btn-zoom.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Viewport Stage Container */
.stage-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: 580px;
  height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  min-width: 0;
  max-width: 100%;
}

/* Checkerboard pattern for pixel art transparency */
.checker-canvas {
  background-color: #161a22;
  background-image: 
    linear-gradient(45deg, #10131a 25%, transparent 25%),
    linear-gradient(-45deg, #10131a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #10131a 75%),
    linear-gradient(-45deg, transparent 75%, #10131a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-width: 100%;
}

/* CRITICAL: Pixelated rendering */
.pixelated-render {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* Side by Side Layout */
.side-by-side-wrap {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.compare-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 260px;
}

.compare-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.compare-badge.after {
  background: rgba(0, 255, 136, 0.12);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Split Slider Layout */
.split-slider-wrap {
  position: relative;
  overflow: hidden;
  display: inline-block;
  user-select: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.split-layer-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid var(--accent-yellow);
}

.split-layer-before img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
}

.split-layer-after img {
  display: block;
}

.split-divider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 12px;
  cursor: ew-resize;
  z-index: 3;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  text-align: center;
  gap: 8px;
}

.empty-state-icon {
  font-size: 2.5rem;
  opacity: 0.35;
}

.empty-state p {
  font-size: 0.8rem;
  max-width: 320px;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 11, 14, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
  border-radius: var(--radius-md);
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.loading-text {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent-green);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================================= */
/* Batch Mode Layout */
/* ========================================================= */

.batch-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.batch-header-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.batch-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.batch-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-progress-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.batch-fast-actions {
  display: flex;
  gap: 6px;
}

.batch-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.2s ease;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.batch-stats-row {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.batch-stats-row b {
  font-family: var(--font-mono);
  color: #fff;
}

.batch-queue-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 520px;
  height: calc(100vh - 220px);
}

.batch-queue-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.batch-item {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
}

.batch-item:hover {
  border-color: var(--border-highlight);
}

.batch-item.processing {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.04);
}

.batch-item.done {
  border-color: rgba(0, 255, 136, 0.3);
}

.batch-item.error {
  border-color: rgba(255, 0, 85, 0.3);
  background: rgba(255, 0, 85, 0.03);
}

.batch-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.batch-item-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.batch-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 1px;
}

.batch-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-item-meta {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.batch-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.status-badge.pending {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.status-badge.processing {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.status-badge.done {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.status-badge.error {
  background: rgba(255, 0, 85, 0.12);
  color: var(--accent-magenta);
  border: 1px solid var(--accent-magenta);
}

.btn-item-action {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-item-action:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s ease forwards;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-magenta); }
.toast.info { border-left: 4px solid var(--accent-cyan); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 14px 20px;
  margin-top: 20px;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.footer-container {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.footer-container a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer-container a:hover {
  text-decoration: underline;
}
