/* ============================================================
   PDF Splitter & Resizer — App Styles
   Premium dark theme with glassmorphism
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg-deepest: #06060f;
  --bg-deep: #0a0a1a;
  --bg-surface: #10102a;
  --bg-elevated: #161640;
  --bg-glass: rgba(22, 22, 64, 0.55);
  --bg-glass-hover: rgba(30, 30, 80, 0.65);

  --border-subtle: rgba(168, 85, 247, 0.15);
  --border-medium: rgba(168, 85, 247, 0.25);
  --border-accent: rgba(168, 85, 247, 0.5);

  --text-primary: #e8eaf6;
  --text-secondary: #9ca3c4;
  --text-muted: #6b72a0;
  --text-accent: #a5b4fc;

  --accent: #a855f7;
  --accent-light: #c084fc;
  --accent-vivid: #9333ea;
  --accent-pink: #ec4899;
  --accent-cyan: #f472b6;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-width: 200px;
  --titlebar-height: 38px;
  --toolbar-height: 44px;
  --statusbar-height: 28px;
  --control-panel-height: 260px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-deepest);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

/* ---------- Custom Titlebar ---------- */
#titlebar {
  height: var(--titlebar-height);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  -webkit-app-region: drag;
  position: relative;
  z-index: 1000;
}

.titlebar-drag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-icon {
  color: var(--accent-light);
  display: flex;
  align-items: center;
}

.titlebar-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.titlebar-controls {
  display: flex;
  gap: 2px;
  -webkit-app-region: no-drag;
}

.titlebar-btn {
  width: 36px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.titlebar-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.titlebar-btn.close-btn:hover {
  background: var(--danger);
  color: white;
}

/* ---------- App Container ---------- */
#app-container {
  height: calc(100vh - var(--titlebar-height) - var(--statusbar-height));
  position: relative;
  overflow: hidden;
}

/* ---------- Welcome Screen ---------- */
#welcome-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
}

.welcome-content {
  text-align: center;
  max-width: 700px;
  padding: 40px;
}

.welcome-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.welcome-content h1 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.welcome-actions {
  margin-bottom: 48px;
}

.drop-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 12px;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-accent);
}

.feature-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-pink));
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-accent);
}

.btn-icon {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

/* ---------- Editor Layout ---------- */
#editor-screen {
  display: flex;
  height: 100%;
}

/* ---------- Sidebar ---------- */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-header h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

/* ---------- Thumbnails ---------- */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thumbnail-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thumbnail-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.thumbnail-item.active {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}

/* Color coding for pairs / groups */
.thumbnail-item.group-color-0 { border-left: 4px solid #a855f7; }
.thumbnail-item.group-color-1 { border-left: 4px solid #ec4899; }
.thumbnail-item.group-color-2 { border-left: 4px solid #10b981; }
.thumbnail-item.group-color-3 { border-left: 4px solid #f59e0b; }
.thumbnail-item.group-color-4 { border-left: 4px solid #3b82f6; }
.thumbnail-item.group-color-5 { border-left: 4px solid #8b5cf6; }

.thumbnail-canvas-container {
  width: 100%;
  display: block;
  border-radius: calc(var(--radius-md) - 2px);
}

/* ---------- Main Content ---------- */
#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Toolbar ---------- */
#toolbar {
  height: var(--toolbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.toolbar-left, .toolbar-center, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

.file-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-indicator {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 90px;
  text-align: center;
}

.modal-body {
  padding: 0 24px 24px 24px;
  text-align: center;
}

.processing-content {
  text-align: center;
  padding-top: 30px;
}

.processing-spinner {
  margin-bottom: 24px;
}

.pulse-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  animation: pulseLogo 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

@keyframes pulseLogo {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); }
}

.modern-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.modern-progress-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.modern-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.modern-progress-text {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
}

.progress-ring-container {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

#zoom-level {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

/* ---------- Preview Area ---------- */
#preview-area {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deepest);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
  padding: 20px;
  position: relative;
}

#preview-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

#preview-canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: var(--shadow-lg);
  border-radius: 4px;
  background: white;
}

/* ---------- Control Panel ---------- */
#control-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
  flex-shrink: 0;
  max-height: 260px;
  overflow-y: auto;
}

.panel-section {
  flex-shrink: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.panel-title svg {
  opacity: 0.6;
}

.panel-divider {
  width: 1px;
  min-height: 60px;
  background: var(--border-medium);
  align-self: stretch;
  flex-shrink: 0;
  display: none; /* hidden in wrap mode */
}

/* ---------- Split Modes ---------- */
.split-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-btn {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.mode-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.mode-btn.active {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.mode-icon {
  font-size: 13px;
}

/* ---------- Mode Options ---------- */
.mode-option {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-option label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.input-hint {
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

/* ---------- Inputs ---------- */
.input-field {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-small {
  width: 70px;
}

/* ---------- Resize Controls ---------- */
.resize-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resize-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resize-row label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.size-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-suffix {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.size-presets {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  width: 100%;
}

.preset-btn {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ---------- Toggle Switch ---------- */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-input:checked + .toggle-slider::after {
  left: 18px;
  background: white;
}

/* ---------- Output Controls ---------- */
.output-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.output-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.output-row label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Start Button ---------- */
.start-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 100%;
  padding-top: 4px;
}

.btn-start {
  position: relative;
  background: linear-gradient(135deg, #a855f7, #7c3aed, #ec4899);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  color: white;
  border: none;
  padding: 14px 48px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  justify-content: center;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-start:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 35px rgba(168, 85, 247, 0.5);
}

.btn-start:active {
  transform: translateY(0) scale(0.98);
}

.btn-start-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #a855f7, #ec4899, #a855f7);
  background-size: 300% 300%;
  animation: glowPulse 3s ease-in-out infinite;
  border-radius: inherit;
  z-index: -1;
  opacity: 0.5;
  filter: blur(12px);
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; background-position: 0% 50%; }
  50% { opacity: 0.7; background-position: 100% 50%; }
}

.btn-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
  transform: none;
  box-shadow: none;
}

.btn-start:disabled .btn-start-glow {
  display: none;
}

/* ---------- Status Bar ---------- */
#status-bar {
  height: var(--statusbar-height);
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
}

.status-left {
  color: var(--text-secondary);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.status-sep {
  opacity: 0.3;
}

#status-gs {
  font-size: 10px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 32px;
  min-width: 400px;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

/* ---------- Progress Ring ---------- */
.progress-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: var(--border-subtle);
}

.progress-ring-bar {
  stroke: url(#progressGrad);
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
}

.progress-status {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-pink));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-detail {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Complete Modal ---------- */
.complete-content {
  text-align: center;
}

.complete-icon {
  margin-bottom: 16px;
  animation: checkBounce 0.5s ease-out;
}

@keyframes checkBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.complete-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 16px;
}

.complete-summary {
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
}

.complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ---------- Drop Overlay ---------- */
#drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 1500;
  background: rgba(6, 6, 15, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drop-content {
  text-align: center;
  animation: dropBounce 0.3s ease-out;
}

@keyframes dropBounce {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

.drop-icon {
  color: var(--accent-light);
  margin-bottom: 16px;
  animation: floatUp 1.5s ease-in-out infinite;
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.drop-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.drop-content p {
  color: var(--text-muted);
}

/* ---------- Utility Classes ---------- */
.hidden {
  display: none !important;
}

/* ---------- Responsive Animations ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.thumbnail-item {
  position: relative;
}
.thumbnail-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
}
.thumbnail-item:hover .thumbnail-delete-btn {
  opacity: 1;
}
.thumbnail-delete-btn:hover {
  background: #ef4444;
}
.thumbnail-item.drag-over {
  border-top: 3px solid var(--primary);
  transform: scale(1.02);
}
.thumbnail-item.dragging {
  opacity: 0.5;
}
