/* ==========================================================================
   LuminaCull - Clean, Crisp Modern Light Studio Theme
   Optimized for ultra-fast 60fps rendering and zero input lag.
   ========================================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-stage: #eef2f6;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.94);
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-active: #94a3b8;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-emerald: #059669;
  --accent-emerald-light: #10b981;
  --accent-emerald-bg: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);

  --accent-rose: #e11d48;
  --accent-rose-light: #f43f5e;
  --accent-rose-bg: #fff1f2;
  --accent-rose-border: #fecdd3;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);

  --accent-indigo: #4f46e5;
  --accent-indigo-light: #6366f1;
  --accent-indigo-bg: #eef2ff;
  --accent-indigo-border: #c7d2fe;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-hud: 0 8px 30px rgba(15, 23, 42, 0.1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   1. Welcome Screen
   ========================================================================== */
.welcome-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 24px;
  text-align: center;
}

.welcome-card {
  max-width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-hud);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-indigo-bg);
  color: var(--accent-indigo);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.welcome-icon svg {
  width: 36px;
  height: 36px;
}

.welcome-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 28px;
}

.welcome-subtitle code {
  background: var(--bg-surface-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-indigo);
  font-weight: 600;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.feature-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 5px 14px;
  border-radius: var(--radius-full);
}

/* Resume Session Card on Welcome Screen */
.resume-session-card {
  background: #ffffff;
  border: 2px solid var(--accent-indigo);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  animation: fadeIn 0.2s ease-out;
}

.resume-session-badge {
  background: #e0e7ff;
  color: var(--accent-indigo);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.resume-session-folder {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.resume-session-details {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.btn-resume-primary {
  background: var(--accent-indigo);
  color: #fff;
  border: none;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: transform 0.12s ease, background 0.12s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.btn-resume-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.btn-resume-primary svg {
  width: 16px;
  height: 16px;
}

.btn-select-secondary {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.12s ease;
}

.btn-select-secondary:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.browser-notice-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 440px;
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.4;
}

.browser-notice-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #dc2626;
}

.btn-primary-large {
  background: var(--accent-indigo);
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.btn-primary-large:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-primary-large svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   2. App Screen Shell
   ========================================================================== */
.app-screen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

/* Top App Header */
.app-header {
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-badge {
  width: 26px;
  height: 26px;
  background: var(--accent-indigo);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-badge svg {
  width: 16px;
  height: 16px;
}

.folder-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.folder-badge:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.folder-badge svg {
  width: 14px;
  height: 14px;
}

.folder-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-primary);
}

/* Filter Tabs */
.filter-tabs-wrapper {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.filter-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.dot-kept {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.dot-rejected {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-rose);
}

.tab-count {
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.filter-tab.active .tab-count {
  background: var(--accent-indigo-bg);
  color: var(--accent-indigo);
}

/* Stats Chip & Progress Bar */
.stats-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  padding: 5px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.stat-divider {
  color: var(--border-medium);
}

.stat-highlight-kept {
  color: var(--accent-emerald);
  font-weight: 700;
}

.stat-highlight-rejected {
  color: var(--accent-rose);
  font-weight: 700;
}

.top-progress-container {
  width: 64px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 4px;
}

.top-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-emerald));
  transition: width 0.2s ease;
}

.stat-progress-text {
  font-weight: 600;
  color: var(--text-primary);
}

/* Header Buttons */
.btn-icon-header {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-icon-header:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: #e2e8f0;
}

.btn-icon-header.active {
  background: var(--accent-indigo-bg);
  color: var(--accent-indigo);
  border-color: var(--accent-indigo-border);
}

.btn-icon-header svg {
  width: 16px;
  height: 16px;
}

.btn-action-emerald {
  background: var(--accent-emerald);
  color: #ffffff;
  border: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.12s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.btn-action-emerald:hover:not(:disabled) {
  background: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-action-emerald:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-action-emerald svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   3. Main Photo Stage
   ========================================================================== */
.photo-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-stage);
}

.image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px;
  transform-origin: center 85%;
  will-change: transform, opacity;
}

.image-container.swiping {
  transition: none !important;
}

.image-container.snap-back {
  transition: transform 0.26s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.26s ease !important;
}

.image-container.swipe-fly-right {
  transition: transform 0.22s ease-out, opacity 0.22s ease-out !important;
  transform: translate(110vw, 30px) rotate(22deg) !important;
  opacity: 0 !important;
}

.image-container.swipe-fly-left {
  transition: transform 0.22s ease-out, opacity 0.22s ease-out !important;
  transform: translate(-110vw, 30px) rotate(-22deg) !important;
  opacity: 0 !important;
}

/* Touch Swipe Feedback Stamp Badges */
.swipe-stamp {
  position: absolute;
  top: 36px;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 4px solid;
  text-transform: uppercase;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.08s ease, transform 0.08s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.swipe-stamp-keep {
  left: 36px;
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(-14deg) scale(0.9);
}

.swipe-stamp-reject {
  right: 36px;
  color: var(--accent-rose);
  border-color: var(--accent-rose);
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(14deg) scale(0.9);
}

.main-image,
.main-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform-origin: center center;
  will-change: transform;
}

.thumb-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-stage.zoomed-100 .main-image,
.photo-stage.zoomed-100 .main-canvas {
  object-fit: none;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

/* Image Loading Spinner */
.image-loader {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--accent-indigo);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Session Resume Toast */
.resume-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border-medium);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-hud);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
  animation: slideDownToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.resume-toast-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-toast-icon svg {
  width: 18px;
  height: 18px;
}

.resume-toast-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-toast-jump {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-toast-jump:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Keep / Reject Status Badge (Top Right of Stage) */
.status-indicator-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(-6px) scale(0.92);
  transition: opacity 0.1s ease, transform 0.1s ease;
  pointer-events: none;
  z-index: 10;
}

.status-indicator-badge.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.status-indicator-badge.badge-kept {
  background: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-emerald-glow);
}

.status-indicator-badge.badge-rejected {
  background: var(--accent-rose);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-rose-glow);
}

.status-indicator-badge.pop {
  animation: badgePop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.status-indicator-badge svg {
  width: 18px;
  height: 18px;
}

/* HUD Info Overlays */
.hud-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  pointer-events: none;
}

.hud-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hud);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-index {
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.hud-filename {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hud-row svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

.hud-meta-row {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: monospace;
  font-weight: 500;
  margin-top: 2px;
}

/* Floating Culling Actions (Right Center of Stage) */
.floating-actions {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-hud);
  z-index: 10;
}

/* Don't Keep Button */
.btn-floating-reject {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s ease;
}

.btn-floating-reject:hover {
  background: var(--accent-rose-bg);
  color: var(--accent-rose);
  border-color: var(--accent-rose-border);
}

.btn-floating-reject.active-rejected {
  background: var(--accent-rose);
  color: #ffffff;
  border-color: var(--accent-rose);
  box-shadow: 0 2px 10px var(--accent-rose-glow);
}

.btn-floating-reject svg {
  width: 16px;
  height: 16px;
}

/* Keep Button */
.btn-floating-keep {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s ease;
}

.btn-floating-keep:hover {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald-border);
}

.btn-floating-keep.active-kept {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
  box-shadow: 0 2px 10px var(--accent-emerald-glow);
}

.btn-floating-keep svg {
  width: 16px;
  height: 16px;
}

.key-hint {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
}

.btn-floating-keep.active-kept .key-hint,
.btn-floating-reject.active-rejected .key-hint {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-floating-nav {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-floating-nav:hover {
  color: var(--text-primary);
  background: #e2e8f0;
}

.btn-floating-nav svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   4. Bottom Virtual Filmstrip
   ========================================================================== */
.filmstrip-container {
  height: 110px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 15;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.virtual-strip-spacer {
  height: 100%;
  pointer-events: none;
}

.virtual-strip-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  pointer-events: auto;
}

.filmstrip-thumb {
  position: absolute;
  top: 8px;
  height: 94px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.filmstrip-thumb:hover {
  border-color: var(--border-active);
}

.filmstrip-thumb.active {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px var(--accent-indigo-bg), 0 4px 10px rgba(79, 70, 229, 0.25);
}

.filmstrip-thumb.kept {
  border-color: var(--accent-emerald-light);
}

.filmstrip-thumb.kept.active {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 2px var(--accent-emerald-bg), 0 4px 10px var(--accent-emerald-glow);
}

.filmstrip-thumb.rejected {
  border-color: var(--accent-rose-light);
  opacity: 0.7;
}

.filmstrip-thumb.rejected.active {
  border-color: var(--accent-rose);
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-rose-bg), 0 4px 10px var(--accent-rose-glow);
}

.thumb-img-box {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.thumb-badge.badge-kept {
  color: var(--accent-emerald);
}

.thumb-badge.badge-rejected {
  color: var(--accent-rose);
}

.thumb-badge svg {
  width: 15px;
  height: 15px;
}

.thumb-info {
  height: 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   5. Grid View Mode
   ========================================================================== */
.grid-view-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-stage);
  scrollbar-width: thin;
}

.grid-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

.grid-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4/3;
  transition: transform 0.12s ease, border-color 0.12s ease;
  box-shadow: var(--shadow-sm);
}

.grid-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-md);
}

.grid-card.kept {
  border-color: var(--accent-emerald);
}

.grid-card.rejected {
  border-color: var(--accent-rose);
  opacity: 0.75;
}

.grid-card.active {
  box-shadow: 0 0 0 3px var(--accent-indigo-border);
}

.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-action-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.grid-chip {
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.1s ease;
}

.grid-chip:hover {
  background: #e2e8f0;
}

.grid-chip.chip-kept {
  background: var(--accent-emerald);
  color: #fff;
}

.grid-chip.chip-rejected {
  background: var(--accent-rose);
  color: #fff;
}

.grid-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85) 60%);
  padding: 16px 10px 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   6. Modals & Dialogs
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-modal-cancel {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-cancel:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-modal-primary {
  background: var(--accent-indigo);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-primary:hover {
  background: #4338ca;
}

/* Progress Bars inside Modals */
.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-emerald));
  transition: width 0.15s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-meta span:first-child {
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shortcuts Dialog List */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.shortcut-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.shortcut-keys {
  display: flex;
  gap: 4px;
}

.key-badge {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  font-size: 0.74rem;
  font-family: monospace;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
