/* styles/variables.css */
/* Dark Professional Theme Variables */
:root {
  /* Primary Color Palette - Dark Professional */
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: rgba(59, 130, 246, 0.1);
  --color-secondary: #1d4ed8;
  --color-accent: #06b6d4;
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
  
  /* Dark Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-overlay: rgba(30, 41, 59, 0.95);
  --bg-overlay-dark: rgba(15, 23, 42, 0.8);
  --bg-overlay-light: rgba(30, 41, 59, 0.3);
  --bg-sidebar: #1e293b;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --bg-hover: #334155;
  
  /* Dark Text Colors */
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-accent: #94a3b8;
  --text-light: #64748b;
  --text-white: #ffffff;
  --text-black: #0f172a;
  --text-muted: #64748b;
  
  /* Dark Border Colors */
  --border-color: #334155;
  --border-color-hover: #475569;
  --border-color-focus: #3b82f6;
  --border-color-error: #dc2626;
  --border-color-success: #059669;
  
  /* Updated Gradients for Dark Theme */
  --skinner-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --skinner-gradient-hover: linear-gradient(135deg, #2563eb, #1e40af);
  
  /* Dark Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4), 0 10px 10px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.6);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  
  /* Component-specific shadows for dark theme */
  --shadow-button: 0 4px 15px rgba(59, 130, 246, 0.4);
  --shadow-button-hover: 0 7px 25px rgba(59, 130, 246, 0.5);
  --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 25px 50px rgba(0, 0, 0, 0.8);
  
  /* Special Effects for Dark Theme */
  --skinner-glow-primary: 0 0 20px rgba(59, 130, 246, 0.5);
  --skinner-glow-secondary: 0 0 20px rgba(29, 78, 216, 0.5);
  --skinner-glow-accent: 0 0 20px rgba(6, 182, 212, 0.5);
  --skinner-particle-color: rgba(59, 130, 246, 0.3);
  
  /* Status Colors for Dark Theme */
  --status-online: #10b981;
  --status-offline: #ef4444;
  --status-warning: #f59e0b;
  --status-processing: #3b82f6;
  
  /* File Upload Colors for Dark Theme */
  --upload-border-color: #475569;
  --upload-border-hover: #3b82f6;
  --upload-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.4));
  --upload-bg-hover: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 41, 59, 0.8));
  --upload-bg-selected: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(30, 41, 59, 0.8));
  
  /* Log Console for Dark Theme */
  --log-bg: #0f172a;
  --log-text: #e2e8f0;
  --log-success: #34d399;
  --log-error: #f87171;
  --log-warning: #fbbf24;
  --log-info: #60a5fa;
  
  /* Toast Notifications for Dark Theme */
  --toast-bg: #1e293b;
  --toast-text: #e2e8f0;
  
  /* Progress Colors for Dark Theme */
  --progress-bg: #334155;
  --progress-fill: linear-gradient(90deg, #3b82f6, #1d4ed8);
  
  /* Modal backdrop for dark theme */
  --modal-backdrop: rgba(15, 23, 42, 0.8);

  /* Add these missing spacing variables */
  --spacing-1: 4px;
  --spacing-5: 20px;
  --spacing-7: 28px;
  --spacing-9: 36px;
  --spacing-10: 40px;
  --spacing-11: 44px;
  
  /* Missing layout variables */
  --sidebar-width: 280px;
  --sidebar-item-padding: 12px 16px;
  --sidebar-item-radius: 12px;
  --section-padding: 32px;
  --section-padding-sm: 24px;
  --card-padding: 32px;
  --card-padding-sm: 24px;
  --input-padding: 16px 20px;
  --button-padding: 16px 32px;
  --grid-gap-lg: 32px;
  --border-color-focus: #3b82f6;
  
  /* Toast variables */
  --toast-bg: #1e293b;
  --toast-text: #e2e8f0;
  --toast-border-radius: 12px;
  --toast-padding: 16px 20px;
  
  /* Progress variables */
  --progress-height: 12px;
  
  /* Z-index values */
  --z-sidebar: 100;
  --z-modal: 1000;
  --z-toast: 1100;  
}
/* styles/base.css */
/* Fixed Modern base styles with proper responsive layout */
/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Base Body Styles */
body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* App Container - FIXED Grid Layout */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  position: relative;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: var(--spacing-4);
  left: var(--spacing-4);
  z-index: 1001;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-hover);
}
/* Sidebar Styles - FIXED */
.sidebar {
  background: var(--bg-sidebar);
  padding: var(--spacing-8) var(--spacing-6);
  color: var(--text-white);
  height: 100vh;
  width: var(--sidebar-width);
  overflow-y: auto;
  z-index: var(--z-sidebar);
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  position: relative;
}
.logo-section {
  margin-bottom: var(--spacing-10);
  text-align: center;
}
.logo {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  margin: 0 auto var(--spacing-4);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-in-out);
}
.logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: var(--shadow-xl);
}
.app-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-1);
}
.app-subtitle {
  font-size: var(--font-size-sm);
  opacity: 0.8;
}
/* Navigation Styles */
.nav-section {
  margin-bottom: var(--spacing-8);
}
.nav-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-4);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--sidebar-item-padding);
  border-radius: var(--sidebar-item-radius);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-in-out);
  margin-bottom: var(--spacing-2);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  transform: translateX(4px);
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}
/* Status Indicator */
.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--sidebar-item-padding);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--sidebar-item-radius);
  font-size: var(--font-size-sm);
  color: var(--color-success);
  font-weight: var(--font-weight-medium);
  margin-top: auto;
}
.status-indicator.error {
  background: rgba(245, 101, 101, 0.15);
  border-color: rgba(245, 101, 101, 0.3);
  color: var(--color-error);
}
/* Main Content - FIXED */
.main-content {
  padding: var(--section-padding);
  overflow-y: auto;
  background: var(--bg-primary);
  min-height: 100vh;
  width: 100%;
}
/* Environment Status Banner */
.env-status-banner {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-4);
  margin-bottom: var(--spacing-6);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-normal) var(--ease-in-out);
}
.env-status-banner.success {
  border-color: var(--color-success);
  background: linear-gradient(135deg, #f0fff4, #c6f6d5);
}
.env-status-banner.error {
  border-color: var(--color-error);
  background: linear-gradient(135deg, #fed7d7, #feb2b2);
}
.env-banner-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
}
.env-banner-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}
.env-banner-text {
  flex: 1;
  min-width: 0;
}
.env-banner-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-1);
}
.env-banner-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-accent);
}
.env-banner-action {
  padding: var(--spacing-2) var(--spacing-4);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-family: inherit;
}
.env-banner-action:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}
/* Page Header */
.page-header {
  margin-bottom: var(--spacing-10);
}
.page-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-2);
  line-height: 1.2;
}
.page-description {
  color: var(--text-accent);
  font-size: var(--font-size-lg);
  line-height: 1.5;
}
/* Content Sections - IMPROVED DASHBOARD LAYOUT */
.content-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  padding: var(--card-padding);
  margin-bottom: var(--spacing-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  transition: all var(--duration-normal) var(--ease-in-out);
}
.content-section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--spacing-8, 32px);
  margin-bottom: var(--spacing-8, 32px);
}
.dashboard-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl, 16px);
  padding: var(--spacing-8, 32px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  min-height: 200px;
}
.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-hover);
}
/* Fix form group spacing inside cards */
.dashboard-card .form-group {
  margin-bottom: var(--spacing-6, 24px);
}
.dashboard-card .form-group:last-child {
  margin-bottom: 0;
}
/* Improve field label styling */
.dashboard-card .field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-3, 12px);
}
/* Fix drop zone styling inside cards */
.dashboard-card .file-drop-zone {
  min-height: 140px;
  margin-bottom: var(--spacing-4, 16px);
}
/* Fix input styling inside cards */
.dashboard-card .field-input,
.dashboard-card .field-textarea,
.dashboard-card .field-select {
  width: 100%;
  padding: var(--spacing-4, 16px);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.875rem;
}
/* Fix textarea specific styling */
.dashboard-card .field-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}
/* Fix section headers inside cards */
.dashboard-card .section-header {
  margin-bottom: var(--spacing-6, 24px);
  padding-bottom: var(--spacing-4, 16px);
  border-bottom: 2px solid var(--bg-tertiary);
}
/* Fix two-column layout inside cards */
.dashboard-card .two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-6, 24px);
}
/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-8);
  padding-bottom: var(--spacing-4);
  border-bottom: 2px solid var(--bg-tertiary);
}
.section-icon {
  width: 44px;
  height: 44px;
  background: var(--skinner-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-xl);
  box-shadow: var(--shadow-md);
}
.section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}
/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap-lg);
}
/* Form Elements */
.form-group {
  margin-bottom: var(--spacing-6);
}
.field-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2);
}
.field-input, .field-textarea, .field-select {
  width: 100%;
  padding: var(--input-padding);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: all var(--duration-normal) var(--ease-in-out);
  background: var(--bg-input);
  color: var(--text-primary);
}
.field-input:focus, 
.field-textarea:focus, 
.field-select:focus {
  outline: none;
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: var(--bg-secondary);
}
.field-textarea {
  min-height: 120px;
  resize: vertical;
}
/* Fix parameter controls layout */
.param-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-6, 24px);
  margin-bottom: var(--spacing-6, 24px);
}
/* Improve button group spacing */
.button-group {
  display: flex;
  gap: var(--spacing-4, 16px);
  justify-content: center;
  margin: var(--spacing-10, 40px) 0;
  flex-wrap: wrap;
}
.btn {
  padding: var(--button-padding);
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--duration-slow) var(--ease-in-out);
}
.btn:hover::before {
  left: 100%;
}
.btn-primary {
  background: var(--skinner-gradient);
  color: var(--text-white);
  box-shadow: var(--shadow-button);
}
.btn-primary:hover {
  background: var(--skinner-gradient-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-button-hover);
}
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
/* Progress Section */
.progress-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  padding: var(--card-padding);
  margin-bottom: var(--spacing-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-6);
}
.progress-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}
.progress-status {
  font-size: var(--font-size-sm);
  color: var(--text-accent);
  background: var(--bg-tertiary);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
}
.progress-bar {
  background: var(--progress-bg);
  border-radius: var(--radius-lg);
  height: var(--progress-height);
  overflow: hidden;
  margin-bottom: var(--spacing-6);
  box-shadow: var(--shadow-inner);
}
.progress-fill {
  background: var(--progress-fill);
  height: 100%;
  transition: width var(--duration-slower) var(--ease-out);
  border-radius: var(--radius-lg);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}
.progress-details {
  color: var(--text-accent);
  font-size: var(--font-size-sm);
}
/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--spacing-12) var(--spacing-6);
  color: var(--text-accent);
}
.empty-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-4);
  opacity: 0.5;
}
.empty-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2);
}
.empty-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-accent);
}
/* Fix preview section styling */
.preview-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl, 16px);
  padding: var(--spacing-6, 24px);
  margin: var(--spacing-6, 24px) 0;
  box-shadow: var(--shadow-card);
}
/* Status Toast */
.status-toast {
  position: fixed;
  top: var(--spacing-6);
  right: var(--spacing-6);
  background: var(--toast-bg);
  color: var(--toast-text);
  border-radius: var(--toast-border-radius);
  padding: var(--toast-padding);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  max-width: 400px;
  border: 1px solid var(--border-color);
}
.status-toast.show {
  transform: translateX(0);
}
.toast-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}
.toast-icon {
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}
.toast-message {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}
/* Toast Color Variants */
.status-toast.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}
.status-toast.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}
.status-toast.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-warning);
  color: var(--color-warning);
}
.status-toast.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--color-info);
  color: var(--color-info);
}
/* Mobile responsiveness fixes */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-6, 24px);
  }
  
  .dashboard-card .two-column {
    grid-template-columns: 1fr;
    gap: var(--spacing-4, 16px);
  }
  
  .dashboard-card {
    padding: var(--spacing-6, 24px);
  }
}
@media (max-width: 768px) {
  .dashboard-card {
    padding: var(--spacing-4, 16px);
  }
  
  .dashboard-card .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-2, 8px);
  }
  
  .button-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .param-controls {
    grid-template-columns: 1fr;
  }
}
/* Fix missing variables fallbacks */
:root {
  --spacing-8: 32px;
  --spacing-6: 24px;
  --spacing-4: 16px;
  --spacing-3: 12px;
  --spacing-10: 40px;
  --radius-xl: 16px;
  --radius-lg: 12px;
}
/* Ensure proper spacing for all elements */
.dashboard-card > *:last-child {
  margin-bottom: 0;
}
/* Fix any layout overflow issues */
.main-content {
  overflow-x: hidden;
}
.dashboard-card {
  overflow: hidden;
  word-wrap: break-word;
}
/* styles/components.css */
/* Modern component styles */
/* File Upload Components - Modern Design */
.file-drop-zone {
  border: 3px dashed var(--upload-border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-12) var(--spacing-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  background: var(--upload-bg);
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.file-drop-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left var(--duration-slower) var(--ease-in-out);
}
.file-drop-zone:hover::before {
  left: 100%;
}
.file-drop-zone:hover {
  border-color: var(--upload-border-hover);
  background: var(--upload-bg-hover);
  transform: translateY(-2px);
}
.file-drop-zone.selected {
  border-color: var(--color-success);
  background: var(--upload-bg-selected);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.15);
}
.upload-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-4);
  opacity: 0.7;
  transition: all var(--duration-normal) var(--ease-in-out);
}
.file-drop-zone:hover .upload-icon {
  transform: scale(1.1);
  opacity: 1;
}
.upload-title {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-2);
  color: var(--text-primary);
}
.upload-subtitle {
  color: var(--text-accent);
  font-size: var(--font-size-sm);
}
/* File Status Display */
.file-status {
  background: #ebf8ff;
  border: 2px solid #bee3f8;
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
  margin-top: var(--spacing-4);
  font-size: var(--font-size-sm);
  color: #2b6cb0;
  font-weight: var(--font-weight-medium);
}
.file-status.success {
  background: #f0fff4;
  border-color: #9ae6b4;
  color: #22543d;
}
.file-status.error {
  background: #fed7d7;
  border-color: #feb2b2;
  color: #742a2a;
}
/* Parameter Controls - Enhanced Layout */
.param-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
/* Parameter cards - Clean consistent styling */
.param-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-in-out);
  position: relative;
  overflow: hidden;
}
.param-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.05), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-in-out);
}
.param-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.param-card:hover::before {
  opacity: 1;
}
/* Parameter values - Clickable and prominent */
.param-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-2);
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px var(--spacing-2) -8px;
  transition: all 0.2s ease;
}
.param-value:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.02);
}
/* Parameter labels - Clickable and clear */
.param-label {
  font-size: var(--font-size-sm);
  color: var(--text-accent);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-3);
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px var(--spacing-3) -4px;
  transition: all 0.2s ease;
}
.param-label:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
}
/* Parameter inputs - Clean and functional */
.param-input {
  width: 100%;
  padding: var(--spacing-2) var(--spacing-3);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--duration-normal) var(--ease-in-out);
  cursor: text;
  min-height: 44px;
}
.param-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: var(--bg-input);
}
.param-input:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-input);
}
/* Expected output card - Special styling */
.param-card.expected-output {
  background: var(--skinner-gradient);
  color: var(--text-white);
  border: none;
  box-shadow: var(--shadow-lg);
  grid-column: 1 / -1;
  margin-top: 16px;
}
.param-card.expected-output .param-value {
  color: var(--text-white);
  font-size: 36px;
}
.param-card.expected-output .param-label {
  color: rgba(255, 255, 255, 0.8);
}
/* Parameter hints */
.param-hint {
  font-size: var(--font-size-xs);
  color: var(--text-accent);
  margin-top: var(--spacing-2);
  text-align: center;
  opacity: 0.8;
}
/* Parameter cards in step context - Specific overrides */
.step-card .param-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.step-card .param-card {
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 0;
}
.step-card .param-card:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}
.step-card .param-card.expected-output {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  margin-top: 16px;
}
.step-card .param-value {
  font-size: 32px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1;
}
.step-card .param-card.expected-output .param-value {
  color: white;
  font-size: 36px;
}
.step-card .param-label {
  font-size: 12px;
  color: var(--text-accent);
  font-weight: var(--font-weight-medium);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.step-card .param-card.expected-output .param-label {
  color: rgba(255, 255, 255, 0.9);
}
.step-card .param-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  text-align: center;
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transition: all 0.3s ease;
}
.step-card .param-input:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.05);
}
.step-card .param-input:focus {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.step-card .param-hint {
  font-size: 10px;
  color: var(--text-accent);
  margin-top: 8px;
  opacity: 0.8;
  line-height: 1.3;
}
.step-card .param-card.expected-output .param-hint {
  color: rgba(255, 255, 255, 0.8);
}
.step-card .param-details {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
  font-family: var(--font-family-mono, monospace);
}
/* Generation Metrics */
.generation-metrics {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin-top: var(--spacing-6);
}
.step-card .generation-metrics {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}
.metrics-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-3);
  border-bottom: 2px solid var(--bg-tertiary);
}
.step-card .metrics-title {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--spacing-4);
}
.step-card .metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.metric-item {
  text-align: center;
  padding: var(--spacing-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.step-card .metric-item {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.metric-label {
  font-size: var(--font-size-xs);
  color: var(--text-accent);
  margin-bottom: var(--spacing-1);
  font-weight: var(--font-weight-medium);
}
.step-card .metric-label {
  font-size: 10px;
  color: var(--text-accent);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metric-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-1);
}
.step-card .metric-value {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: 2px;
}
.metric-hint {
  font-size: var(--font-size-xs);
  color: var(--text-accent);
  opacity: 0.7;
}
.step-card .metric-hint {
  font-size: 9px;
  color: var(--text-accent);
  opacity: 0.7;
}
/* Parameter interaction states */
.param-card-focused {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
  transform: translateY(-2px) !important;
}
.param-card::after {
  content: '✏️';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.param-card:hover::after {
  opacity: 0.5;
}
.param-card-focused::after {
  opacity: 0.8;
}
/* Parameter validation states */
.param-input.param-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 2px rgba(245, 101, 101, 0.2);
}
.param-input.param-warning {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 2px rgba(237, 137, 54, 0.2);
}
.param-feedback {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.param-feedback-error {
  background: var(--color-error);
  color: white;
}
.param-feedback-warning {
  background: var(--color-warning);
  color: white;
}
/* Parameter generating state */
.param-card.generating {
  opacity: 0.7;
  pointer-events: none;
}
.param-card.generating .param-input {
  background: var(--bg-tertiary);
  color: var(--text-accent);
  cursor: not-allowed;
}
.param-card.generating .param-value {
  opacity: 0.5;
}
.param-card.generating .param-label {
  opacity: 0.5;
}
/* Preview Section - Consolidated Thumbnail Styles */
.preview-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin: var(--spacing-6) 0;
  box-shadow: var(--shadow-card);
}
.preview-header {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-6);
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding-bottom: var(--spacing-4);
  border-bottom: 2px solid var(--bg-tertiary);
}
.preview-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-accent);
  font-weight: var(--font-weight-normal);
  margin-left: auto;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--spacing-3);
  max-height: 400px;
  overflow-y: auto;
  padding: var(--spacing-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  max-height: 150px;
}
.preview-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--duration-normal) var(--ease-in-out);
}
.preview-item .placeholder {
  color: var(--text-accent);
  font-size: var(--font-size-sm);
  text-align: center;
  padding: var(--spacing-4);
  line-height: 1.4;
}
.preview-item .filename {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--text-white);
  font-size: var(--font-size-xs);
  padding: var(--spacing-3) var(--spacing-2);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-weight: var(--font-weight-medium);
}
/* Right-click excluded thumbnails: greyscale + dim + EXCLUDED badge */
.preview-item.excluded img {
  filter: grayscale(100%);
  opacity: 0.35;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.preview-item.excluded::after {
  content: 'EXCLUDED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: rgba(220, 38, 38, 0.85);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}
/* Gallery Components */
.output-gallery {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin: var(--spacing-6) 0;
  box-shadow: var(--shadow-card);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gallery-gap);
  margin-top: var(--spacing-4);
}
.gallery-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  transition: all var(--duration-normal) var(--ease-in-out);
}
.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}
.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item-info {
  padding: var(--spacing-4);
}
.gallery-item-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-item-meta {
  font-size: var(--font-size-xs);
  color: var(--text-accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* ---------- Per-image progress slots ---------- */
.gallery-slot {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--border-color, #555);
    border-radius: var(--radius-md, 4px);
    background: var(--bg-tile, rgba(255, 255, 255, 0.03));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.gallery-slot .slot-frame {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.gallery-slot .slot-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gallery-slot .slot-info {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    font-size: clamp(0.95rem, 1.6vw, 1.2rem);
    font-weight: 700;
    color: var(--text-primary, #fff);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 2;
}
/* Active states: shimmer on, stage text colored */
.gallery-slot.is-describing,
.gallery-slot.is-re-imagining,
.gallery-slot.is-generating,
.gallery-slot.is-loading {
    border-color: var(--color-accent, #06b6d4);
}
.gallery-slot.is-describing .slot-shimmer,
.gallery-slot.is-re-imagining .slot-shimmer,
.gallery-slot.is-generating .slot-shimmer,
.gallery-slot.is-loading .slot-shimmer {
    opacity: 1;
}
.gallery-slot.is-describing .slot-info,
.gallery-slot.is-re-imagining .slot-info,
.gallery-slot.is-generating .slot-info,
.gallery-slot.is-loading .slot-info {
    color: var(--color-accent, #06b6d4);
}
/* Pending: dim placeholder, no shimmer */
.gallery-slot.is-pending {
    opacity: 0.5;
}
/* Error: red border + warn icon prefix */
.gallery-slot.is-error {
    border-color: var(--color-error, #ef4444);
}
.gallery-slot.is-error .slot-info {
    color: var(--color-error, #ef4444);
}
.gallery-slot.is-error .slot-info::before {
    content: '⚠ ';
}
.gallery-slot.is-no-output,
.gallery-slot.is-failed {
    opacity: 0.4;
    border-color: var(--border-color, #555);
}
.gallery-slot.is-no-output .slot-shimmer,
.gallery-slot.is-failed .slot-shimmer {
    opacity: 0;
}
.gallery-slot.is-failed {
    border-color: var(--color-error, #ef4444);
}
/* Log Console */
.log-panel {
  background: var(--log-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  color: var(--log-text);
  max-height: var(--log-max-height);
  overflow-y: auto;
  margin-top: var(--spacing-4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}
.log-line {
  margin-bottom: var(--spacing-2);
  line-height: 1.5;
  padding: var(--spacing-1) 0;
  border-radius: var(--spacing-1);
  transition: background-color var(--duration-fast) var(--ease-in-out);
}
.log-line:hover {
  background-color: rgba(255, 255, 255, 0.05);
  padding-left: var(--spacing-2);
  padding-right: var(--spacing-2);
}
.log-line.success { 
  color: var(--log-success); 
}
.log-line.error { 
  color: var(--log-error);
  font-weight: var(--font-weight-medium);
}
.log-line.info { 
  color: var(--log-info); 
}
.log-line.warning { 
  color: var(--log-warning);
  font-weight: var(--font-weight-medium);
}
/* Controls and Form Elements */
.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: var(--spacing-8);
}
.control-group {
  background: var(--bg-tertiary);
  padding: var(--spacing-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  transition: all var(--duration-normal) var(--ease-in-out);
}
.control-group:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}
.control-group .field-label {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-3);
}
.control-group .field-input {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
}
/* Status Components */
.status-indicator-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-indicator-inline.online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-online);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-indicator-inline.offline {
  background: rgba(245, 101, 101, 0.1);
  color: var(--status-offline);
  border: 1px solid rgba(245, 101, 101, 0.2);
}
.status-indicator-inline.processing {
  background: rgba(66, 153, 225, 0.1);
  color: var(--status-processing);
  border: 1px solid rgba(66, 153, 225, 0.2);
}
/* Loading States */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.icon {
  position: absolute;
  font-size: var(--font-size-2xl);
  color: var(--skinner-particle-color);
  animation: float 10s infinite linear;
}
/* Mobile responsive thumbnails */
@media (max-width: 768px) {
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--spacing-2);
  }
  
  .preview-item {
    max-width: 100px;
    max-height: 100px;
  }

  .param-controls,
  .step-card .param-controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .step-card .metrics-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .step-card .param-value {
    font-size: 28px;
  }
  
  .step-card .param-card.expected-output .param-value {
    font-size: 32px;
  }

  .param-input {
    font-size: 18px;
    padding: 16px;
    min-height: 56px;
  }
}
@media (max-width: 480px) {
  .step-card .param-card {
    padding: 12px;
  }
  
  .step-card .generation-metrics {
    padding: 12px;
  }
  
  .step-card .metric-item {
    padding: 8px;
  }

  .param-value {
    font-size: 2rem;
  }
  
  .param-label {
    font-size: 14px;
  }

  .param-feedback {
    position: static;
    transform: none;
    margin-top: var(--spacing-2);
    text-align: center;
  }
}
/* Responsive Adjustments */
@media (max-width: 1024px) {
  .param-controls {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--grid-gap-sm);
  }
  
  .gallery-grid {
    gap: var(--spacing-4);
  }
}
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .log-panel {
    padding: var(--spacing-4);
    font-size: var(--font-size-xs);
  }
}
/* Hero Button Styling */
.btn-hero {
  font-size: var(--font-size-lg) !important;
  padding: 20px 40px !important;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8, #6366f1) !important;
  background-size: 200% 200% !important;
  animation: heroGradientShift 3s ease-in-out infinite !important;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 
              0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  font-weight: var(--font-weight-bold) !important;
  min-width: 200px;
  transform: scale(1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-hero:hover {
  transform: scale(1.05) translateY(-2px) !important;
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.2) !important;
  animation-duration: 1.5s !important;
}
.btn-hero:active {
  transform: scale(0.98) translateY(0) !important;
}
/* Hero button gradient animation */
@keyframes heroGradientShift {
  0%, 100% { 
    background-position: 0% 50%; 
  }
  50% { 
    background-position: 100% 50%; 
  }
}
/* Advanced Tools Section */
.advanced-tools-toggle {
  margin: var(--spacing-4) 0;
  text-align: center;
}
.btn-small {
  padding: 8px 16px !important;
  font-size: var(--font-size-sm) !important;
  min-width: auto;
}
.toggle-arrow {
  margin-left: var(--spacing-2);
  font-size: var(--font-size-xs);
  transition: transform var(--duration-normal) ease;
}
.advanced-tools-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin: var(--spacing-4) 0;
}
/* Button group spacing improvements */
.button-group {
  display: flex;
  gap: var(--spacing-4);
  justify-content: center;
  margin: var(--spacing-8) 0;
  flex-wrap: wrap;
  align-items: center;
}
/* Responsive hero button */
@media (max-width: 768px) {
  .btn-hero {
    font-size: var(--font-size-base) !important;
    padding: 16px 32px !important;
    min-width: 180px;
  }
  
  .button-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .advanced-tools-toggle {
    order: -1;
  }
}
/* Enhanced button state transitions */
.btn-primary.btn-hero {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8, #6366f1) !important;
}
.btn-disabled {
  background: var(--bg-tertiary) !important;
  color: var(--text-accent) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}
.btn-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  background: var(--bg-tertiary) !important;
}
/* Progress section enhancement */
.progress-section {
  background: var(--bg-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-8);
  margin: var(--spacing-8) 0;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}
.progress-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  animation: progressScanline 2s linear infinite;
}
@keyframes progressScanline {
  0% { left: -100%; }
  100% { left: 100%; }
}
/* Environment banner enhancement for direct execution */
.env-status-banner.success {
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.1), 
    rgba(59, 130, 246, 0.1)) !important;
  border-color: var(--color-success) !important;
}
.env-status-banner.success .env-banner-icon {
  background: var(--color-success) !important;
  color: white !important;
}
/* Page description enhancement */
.page-description {
  background: linear-gradient(90deg, 
    var(--color-primary), 
    var(--color-accent), 
    var(--color-primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 3s ease-in-out infinite;
  font-weight: var(--font-weight-semibold);
}
@keyframes shimmerText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}
/* Accessibility improvements */
.param-input:focus {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px !important;
}
/* Smooth value changes animation */
.param-value.animate-pulse {
  animation: valueChange 0.3s ease;
}
@keyframes valueChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: var(--color-primary); }
  100% { transform: scale(1); }
}
/* Value change feedback animation */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
/* Dark theme component compatibility */
.dark-professional .file-drop-zone {
  border-color: var(--upload-border-color);
  background: var(--upload-bg);
  color: var(--text-primary);
}
.dark-professional .file-drop-zone:hover {
  border-color: var(--upload-border-hover);
  background: var(--upload-bg-hover);
}
.dark-professional .file-drop-zone.selected {
  border-color: var(--color-success);
  background: var(--upload-bg-selected);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}
.dark-professional .param-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
}
.dark-professional .param-card:hover {
  border-color: var(--border-color-hover);
}
.dark-professional .param-input {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.dark-professional .param-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.dark-professional .output-gallery {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.dark-professional .gallery-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.dark-professional .gallery-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xl);
}
.dark-professional .control-group {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}
.dark-professional .control-group:hover {
  border-color: var(--border-color-hover);
}
.dark-professional .status-indicator-inline.online {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.dark-professional .status-indicator-inline.offline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.dark-professional .status-indicator-inline.processing {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
/* styles/animations.css */
/* Modern animations and keyframes */
/* Shimmer Effect for Loading States */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}
/* Smooth Float Animation for Icons */
@keyframes float {
  from {
    transform: translateY(100vh) rotate(0deg) scale(0);
    opacity: 0;
  }
  10% { 
    opacity: 1;
    transform: translateY(90vh) rotate(36deg) scale(1);
  }
  90% { 
    opacity: 1;
    transform: translateY(-10vh) rotate(324deg) scale(1);
  }
  to {
    transform: translateY(-20vh) rotate(360deg) scale(0);
    opacity: 0;
  }
}
/* Gentle Pulse Animation */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.05);
    opacity: 0.8;
  }
}
/* Smooth Slide In Animation */
@keyframes slideIn {
  from { 
    transform: translateX(100%);
    opacity: 0;
  }
  to { 
    transform: translateX(0);
    opacity: 1;
  }
}
/* Fade In Animation */
@keyframes fadeIn {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}
/* Scale In Animation with Bounce */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* Bounce In Animation */
@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* Smooth Rotation */
@keyframes rotate {
  from { 
    transform: rotate(0deg); 
  }
  to { 
    transform: rotate(360deg); 
  }
}
/* Gentle Glow Effect */
@keyframes glow {
  from { 
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.2);
  }
  to { 
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4), 0 0 30px rgba(102, 126, 234, 0.2);
  }
}
/* Gradient Shift Animation */
@keyframes gradientShift {
  0%, 100% { 
    background-position: 0% 50%; 
  }
  50% { 
    background-position: 100% 50%; 
  }
}
/* Progress Bar Fill Animation */
@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: var(--target-width, 100%);
  }
}
/* Subtle Flicker for Highlights */
@keyframes flicker {
  0%, 100% { 
    opacity: 1; 
  }
  50% { 
    opacity: 0.8; 
  }
}
/* Modal Fade In */
@keyframes modalFadeIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}
/* Toast Slide In */
@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
/* Gentle Shake for Errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
/* Loading Spin */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* Elastic Scale */
@keyframes elasticScale {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.25);
  }
  40% {
    transform: scale(0.75);
  }
  50% {
    transform: scale(1.15);
  }
  65% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
/* Skinner Special Effects */
@keyframes psychedelicBg {
  0%, 100% { 
    background-position: 0% 50%; 
    filter: hue-rotate(0deg);
  }
  25% {
    background-position: 100% 50%;
    filter: hue-rotate(90deg);
  }
  50% { 
    background-position: 100% 100%; 
    filter: hue-rotate(180deg);
  }
  75% {
    background-position: 0% 100%;
    filter: hue-rotate(270deg);
  }
}
/* Utility Animation Classes */
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
.animate-bounce {
  animation: bounceIn 0.6s ease-out;
}
.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}
.animate-slide-in {
  animation: slideIn 0.4s ease-out;
}
.animate-scale-in {
  animation: scaleIn 0.3s ease-out;
}
.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}
.animate-rotate {
  animation: rotate 2s linear infinite;
}
.animate-shimmer {
  animation: shimmer 2s infinite;
}
.animate-float {
  animation: float 12s infinite linear;
}
.animate-elastic {
  animation: elasticScale 0.6s ease-out;
}
.animate-shake {
  animation: shake 0.5s ease-in-out;
}
/* Hover Effects */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.hover-scale {
  transition: transform var(--duration-normal) var(--ease-out);
}
.hover-scale:hover {
  transform: scale(1.02);
}
.hover-glow {
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
.hover-glow:hover {
  box-shadow: var(--skinner-glow-primary);
}
.hover-bright {
  transition: filter var(--duration-normal) var(--ease-out);
}
.hover-bright:hover {
  filter: brightness(1.1);
}
/* Transition Utilities */
.transition-fast {
  transition: all var(--duration-fast) var(--ease-in-out);
}
.transition-normal {
  transition: all var(--duration-normal) var(--ease-in-out);
}
.transition-slow {
  transition: all var(--duration-slow) var(--ease-in-out);
}
.transition-colors {
  transition: color var(--duration-normal) var(--ease-in-out), 
              background-color var(--duration-normal) var(--ease-in-out),
              border-color var(--duration-normal) var(--ease-in-out);
}
.transition-transform {
  transition: transform var(--duration-normal) var(--ease-out);
}
.transition-shadow {
  transition: box-shadow var(--duration-normal) var(--ease-out);
}
/* Animation Control Classes */
.animation-paused {
  animation-play-state: paused;
}
.animation-running {
  animation-play-state: running;
}
.no-animation {
  animation: none !important;
}
.no-transition {
  transition: none !important;
}
/* Loading State Animations */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
.loading-shimmer {
  background: linear-gradient(90deg, 
    var(--bg-tertiary) 25%, 
    var(--bg-hover) 50%, 
    var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
/* Special Skinner Theme Effects */
.theme-skinner .psychedelic-bg {
  animation: psychedelicBg 15s ease-in-out infinite;
}
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .animate-pulse,
  .animate-bounce,
  .animate-fade-in,
  .animate-slide-in,
  .animate-scale-in,
  .animate-glow,
  .animate-rotate,
  .animate-shimmer,
  .animate-float,
  .animate-elastic {
    animation: none;
  }
  
  .loading-pulse,
  .loading-shimmer,
  .loading-spinner {
    animation: none;
  }
  
  .hover-lift:hover,
  .hover-scale:hover {
    transform: none;
  }
}
/* Modern Image Modal - Enhanced Lightbox Design */
/* Complete modal.css file with proper counter positioning below navigation buttons */
/* Modal Backdrop - Enhanced */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  z-index: var(--z-modal);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}
/* Modern Modal Content with Gradient Border */
.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 24px;
  padding: 4px;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.6) 0%, 
    rgba(139, 92, 246, 0.6) 50%, 
    rgba(6, 182, 212, 0.6) 100%);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-modal.show .modal-content {
  transform: scale(1);
}
/* Inner Content Container */
.modal-inner {
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}
/* Enhanced Close Button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-close:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}
.modal-close-icon {
  font-size: 16px;
  font-weight: bold;
}
.modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    min-height: 250px;
    position: relative;
    overflow: hidden;
    height: 0; /* This allows flex: 1 to work properly */
}
.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    transition: all 0.3s ease;
    /* ENSURE: Image respects container bounds */
    display: block;
}
/* Loading State */
.modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* FIXED: Info panel with proper overflow */
.modal-info {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    /* IMPROVED: More flexible height management */
    max-height: 30vh;
    min-height: auto;
    overflow-y: auto;
    flex-shrink: 0; /* Prevent info panel from shrinking */
}
/* NEW: Custom scrollbar styling */
.modal-info::-webkit-scrollbar {
    width: 8px;
}
.modal-info::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.modal-info::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}
.modal-info::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}
.modal-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-info-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
}
.modal-info-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-info-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.modal-info-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
}
.modal-info-label {
  font-size: 12px;
  color: var(--text-accent);
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* IMPROVED: Better word breaking */
.modal-info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word; /* Changed from break-all */
    line-height: 1.4;
}
/* Image Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}
.modal-action-btn {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-action-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}
/* Navigation arrows - positioned relative to modal-content */
.modal-navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary);
  transition: all 0.3s ease;
  z-index: 10;
  user-select: none;
}
.modal-navigation:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-50%) scale(1.1);
}
.modal-nav-prev {
  left: 16px;
}
.modal-nav-next {
  right: 16px;
}
/* Counter - positioned BELOW the navigation buttons relative to modal-content */
.modal-counter {
  position: absolute;
  bottom: -50px; /* Below the modal-content container */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-accent);
  font-weight: 500;
  z-index: 5;
}
/* Keyboard hint - positioned relative to modal-content */
.modal-keyboard-hint {
  position: absolute;
  bottom: -50px; /* Same level as counter */
  right: 16px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-accent);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 250px;
  text-align: center;
}
.image-modal:hover .modal-keyboard-hint {
  opacity: 1;
}
/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    margin: 16px;
  }
  
  .modal-close {
    top: 12px;
    right: 12px;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .modal-info {
    padding: 16px;
  }
  
  .modal-info-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-keyboard-hint {
    display: none; /* Hide on mobile */
  }
  
  .modal-counter {
    bottom: -40px; /* Closer on mobile */
  }
}
@media (max-width: 480px) {
  .modal-content {
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: 0;
  }
  
  .modal-inner {
    border-radius: 0;
    min-height: 100vh;
  }
  
  .modal-close {
    top: 8px;
    right: 8px;
  }
  
  .modal-image-container {
    min-height: 60vh;
  }
  
  .modal-counter {
    bottom: -30px; /* Even closer on very small screens */
  }
}
/* Animation Enhancements */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
}
.image-modal.show .modal-content {
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-modal.hiding .modal-content {
  animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Focus Management */
.image-modal:focus {
  outline: none;
}
.modal-close:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  }
  
  .modal-inner {
    background: #000000;
    border: 2px solid #ffffff;
  }
  
  .modal-close {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
  }
}
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .image-modal,
  .modal-content,
  .modal-close,
  .modal-action-btn {
    transition: none;
  }
  
  .modal-content {
    animation: none;
  }
  
  .modal-loading-spinner {
    animation: none;
  }
}
/* Source ↔ Generated comparison view */
.modal-comparison {
  display: flex;
  gap: 16px;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.modal-comparison-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  max-height: 100%;
}
.modal-comparison-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}
.modal-comparison-img {
  max-width: 100%;
  max-height: calc(90vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
/* Add to base.css or create a new header.css file */
/* Modern Header Styles */
.app-header {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--z-modal);
    min-height: 72px;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.app-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all var(--duration-normal) var(--ease-in-out);
}
.app-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.app-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.app-title {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.app-subtitle {
    font-size: 14px;
    color: var(--text-accent);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
}
.header-status {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 24px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-success);
    transition: all var(--duration-normal) var(--ease-in-out);
}
.status-pill.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}
.status-pill.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}
.status-pill.processing {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-primary);
}
/* Update app container to remove sidebar grid */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}
/* Update main content to take full width */
.main-content {
    padding: var(--section-padding);
    overflow-y: auto;
    background: var(--bg-primary);
    min-height: calc(100vh - 72px); /* Account for header height */
    width: 100%;
    flex: 1;
}
/* Remove old sidebar styles - hide them */
.sidebar {
    display: none;
}
/* Remove mobile menu toggle since we're going full header */
.mobile-menu-toggle {
    display: none;
}
/* Responsive header adjustments */
@media (max-width: 768px) {
    .app-header {
        padding: 12px 20px;
        min-height: 64px;
    }
    
    .app-brand {
        gap: 12px;
    }
    
    .app-logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    .app-subtitle {
        font-size: 12px;
    }
    
    .status-pill {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .main-content {
        padding: var(--section-padding-sm);
        min-height: calc(100vh - 64px); /* Account for smaller header */
    }
}
@media (max-width: 480px) {
    .app-header {
        padding: 12px 16px;
    }
    
    .app-brand {
        gap: 8px;
    }
    
    .app-info {
        gap: 1px;
    }
    
    .app-title {
        font-size: 16px;
    }
    
    .app-subtitle {
        font-size: 11px;
    }
    
    .status-pill {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .status-pill span:last-child {
        display: none; /* Hide text on very small screens, just show emoji */
    }
}
/* Add these styles to base.css or create workflow.css */
/* Workflow Header */
.workflow-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 0;
}
.workflow-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.workflow-subtitle {
    font-size: 18px;
    color: var(--text-accent);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}
/* Progressive Steps Layout */
.workflow-steps {
    display: grid;
    gap: 32px;
    margin-bottom: 48px;
}
.workflow-step {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.workflow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}
.workflow-step.active::before {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}
.workflow-step.completed::before {
    background: linear-gradient(90deg, #10b981, #059669);
}
.workflow-step.error::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.step-number {
    width: 56px;
    height: 56px;
    background: rgba(59, 130, 246, 0.2);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--color-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.workflow-step.active .step-number {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.workflow-step.completed .step-number {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: transparent;
}
.workflow-step.completed .step-number::before {
    content: '✓';
}
.workflow-step.error .step-number {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: transparent;
}
.step-info {
    flex: 1;
    min-width: 0;
}
.step-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.step-description {
    color: var(--text-accent);
    font-size: 16px;
    line-height: 1.4;
}
.step-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-accent);
    flex-shrink: 0;
}
.workflow-step.active .step-status {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-primary);
}
.workflow-step.completed .step-status {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}
.workflow-step.error .step-status {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}
/* Step Content */
.step-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}
.workflow-step:not(.active):not(.completed) .step-content {
    opacity: 0.6;
}
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.step-card {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.step-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.card-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.card-content {
    padding: 24px;
}
/* Action Panel Styles */
.action-panel {
    text-align: center;
    padding: 32px;
    background: rgba(51, 65, 85, 0.2);
    border-radius: 20px;
    margin-bottom: 24px;
}
.primary-actions {
    margin-bottom: 24px;
}
.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.advanced-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* Override some existing styles to work with new structure */
.dashboard-grid {
    display: none; /* Hide old dashboard grid */
}
.dashboard-card {
    display: none; /* Hide old dashboard cards */
}
/* Responsive adjustments */
@media (max-width: 1024px) {
    .step-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-header {
        margin-bottom: 32px;
        padding: 16px 0;
    }
    
    .workflow-title {
        font-size: 28px;
    }
    
    .workflow-subtitle {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .workflow-steps {
        gap: 24px;
    }
    
    .workflow-step {
        padding: 24px 20px;
    }
    
    .step-header {
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .step-number {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .step-status {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .card-header {
        padding: 16px 20px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .action-panel {
        padding: 24px 20px;
    }
    
    .secondary-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
@media (max-width: 480px) {
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .step-status {
        align-self: flex-end;
    }
    
    .workflow-title {
        font-size: 24px;
    }
    
    .workflow-subtitle {
        font-size: 14px;
    }
}
/* Enhanced Step Grid for 3-column layout in Step 1 */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
/* Step 1 specific: Force 3 columns on larger screens */
#step1 .step-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
/* Step 2 specific: Single full-width card */
#step2 .step-grid {
    grid-template-columns: 1fr;
    max-width: 1000px;
    margin: 0 auto;
}
/* Full-width card modifier */
.step-card.full-width {
    grid-column: 1 / -1;
}
/* Enhanced card sizing for parameter controls */
.step-card .param-controls {
    margin-bottom: 0; /* Remove bottom margin in cards */
}
.step-card .param-card {
    margin-bottom: 16px; /* Tighter spacing in cards */
}
.step-card .param-card:last-child {
    margin-bottom: 0;
}
/* Responsive adjustments for 3-column layout */
@media (max-width: 1200px) {
    #step1 .step-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Parameters card spans both columns on medium screens */
    #step1 .step-card:nth-child(3) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .step-grid,
    #step1 .step-grid,
    #step2 .step-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .step-card:nth-child(3) {
        grid-column: auto;
    }
}
/* Enhanced parameter card styling within step cards */
.step-card .param-controls .param-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.step-card .param-controls .param-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}
/* Generation metrics in step card */
.step-card .generation-metrics {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 16px;
}
/* Parameter card titles smaller in step context */
.step-card .param-card .param-label {
    font-size: 12px;
}
.step-card .param-card .param-value {
    font-size: 28px;
}
/* Compact metrics in step card */
.step-card .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (max-width: 480px) {
    .step-card .metrics-grid {
        grid-template-columns: 1fr;
    }
}
/* Ensure parameter inputs are clickable and accessible */
.step-card .param-controls {
    position: relative;
    z-index: 1;
}
.step-card .param-card {
    position: relative;
    z-index: 2;
    pointer-events: auto; /* Ensure click events work */
}
.step-card .param-input {
    position: relative;
    z-index: 3;
    pointer-events: auto; /* Explicitly enable clicking */
    cursor: text; /* Show text cursor on hover */
    background: var(--bg-input) !important;
    border: 2px solid var(--border-color) !important;
}
.step-card .param-input:hover {
    border-color: var(--border-color-hover) !important;
    background: var(--bg-secondary) !important;
}
.step-card .param-input:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    background: var(--bg-secondary) !important;
}
/* Fix any potential overlay issues */
.step-card .param-card::before,
.step-card .param-card::after {
    pointer-events: none; /* Don't block clicks */
}
/* Ensure the parameter value display doesn't interfere */
.step-card .param-value {
    pointer-events: none; /* Value display shouldn't block input */
    user-select: none;
}
/* Make sure the entire input area is clickable */
.step-card .param-card {
    cursor: default;
}
.step-card .param-card:hover {
    cursor: default;
}
/* Specific fix for parameter cards in step context */
.workflow-step .param-card {
    overflow: visible; /* Ensure focus outlines aren't clipped */
}
.workflow-step .param-input {
    width: 100%;
    text-align: center;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    transition: all var(--duration-normal) var(--ease-in-out);
    min-height: 44px; /* Ensure sufficient click target */
}
/* Remove any transforms that might interfere with clicking */
.workflow-step .param-card:not(:hover) {
    transform: none;
}
/* Ensure generation metrics don't interfere */
.workflow-step .generation-metrics {
    pointer-events: auto;
}
.workflow-step .generation-metrics * {
    pointer-events: auto;
}
/* Debug styles - remove after testing */
.step-card .param-input {
    border: 2px solid #ff0000 !important; /* Temporary red border to see input boundaries */
}
/* Make parameter labels clickable to focus input */
.step-card .param-label {
    cursor: pointer;
    user-select: none;
}
/* styles/themes/dark-professional.css */
/* Dark Professional Theme Specific Styles */
.dark-professional {
  /* Ensure dark theme is applied */
  background: var(--bg-primary);
  color: var(--text-primary);
}
/* Enhanced sidebar for dark professional */
.dark-professional .sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
}
/* Logo enhancement */
.dark-professional .logo {
  background: var(--skinner-gradient);
  box-shadow: var(--shadow-md);
}
.dark-professional .logo:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}
/* Navigation enhancements */
.dark-professional .nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.dark-professional .nav-item.active {
  background: var(--color-primary);
  color: var(--text-white);
}
/* Main content enhancements */
.dark-professional .main-content {
  background: var(--bg-primary);
}
/* Enhanced cards */
.dark-professional .content-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.dark-professional .content-section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-hover);
}
/* Form field enhancements */
.dark-professional .field-input:focus,
.dark-professional .field-textarea:focus,
.dark-professional .field-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
/* Button enhancements */
.dark-professional .btn-primary {
  background: var(--skinner-gradient);
  box-shadow: var(--shadow-button);
}
.dark-professional .btn-primary:hover {
  background: var(--skinner-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}
.dark-professional .btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.dark-professional .btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-color-hover);
}
/* Enhanced file drop zones */
.dark-professional .file-drop-zone {
  background: var(--upload-bg);
  border-color: var(--upload-border-color);
  color: var(--text-primary);
}
.dark-professional .file-drop-zone:hover {
  border-color: var(--color-primary);
  background: var(--upload-bg-hover);
}
/* Parameter cards enhancement */
.dark-professional .param-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
}
.dark-professional .param-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}
/* Expected output card special styling */
.dark-professional .param-card.expected-output {
  background: var(--skinner-gradient);
  border: none;
  box-shadow: var(--shadow-lg);
}
/* Modal enhancements */
.dark-professional .image-modal {
  backdrop-filter: blur(15px);
  background: var(--modal-backdrop);
}
.dark-professional .modal-content {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-modal);
}
.dark-professional .modal-close {
  background: var(--bg-overlay);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.dark-professional .modal-close:hover {
  background: var(--color-primary);
  color: var(--text-white);
}
/* Scrollbar styling for dark theme */
.dark-professional ::-webkit-scrollbar {
  width: 12px;
}
.dark-professional ::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 6px;
}
.dark-professional ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
  border-radius: 6px;
  border: 2px solid var(--bg-tertiary);
}
.dark-professional ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary-hover), var(--color-primary));
}
/* Enhanced floating icons for dark theme */
.dark-professional .icon {
  color: var(--skinner-particle-color);
  filter: drop-shadow(0 0 10px var(--color-primary));
}
/* Status enhancements */
.dark-professional .env-status-banner.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-success);
  color: var(--color-success);
}
.dark-professional .env-status-banner.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-error);
  color: var(--color-error);
}
/* You can add any other top-level styles here if needed */