/* Custom Properties - Enhanced Design System */
:root {
  /* Refined Dark Gradient Colors - Softer, more professional */
  --bg-primary: #0a0818;
  --bg-secondary: #1a1533;
  --bg-tertiary: #2d2448;
  --bg-accent: #1e1838;
  
  /* Multi-layer Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-bg-subtle: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --glass-shadow-lg: 0 20px 60px 0 rgba(0, 0, 0, 0.5);
  
  /* Refined Neon Accents - Better contrast */
  --neon-cyan: #00e5ff;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-blue: #6366f1;
  --neon-green: #10b981;
  --neon-orange: #f59e0b;
  
  /* Extended Semantic Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-disabled: rgba(255, 255, 255, 0.25);
  
  /* Success, Warning, Error */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Spacing - More refined scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius - More variety */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions - More nuanced */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-modal: 2000;
  --z-toast: 3000;
  --z-tooltip: 4000;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Subtle noise texture overlay for premium feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-purple), var(--neon-pink));
}

/* Header */
.app-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-sm) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 20px var(--neon-cyan);
  }
  50% {
    box-shadow: 0 0 40px var(--neon-purple);
  }
}

.brand-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  position: relative;
  z-index: 10;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: white;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--neon-cyan);
}

.icon-btn {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  z-index: 10;
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.icon-btn:hover::before {
  width: 100%;
  height: 100%;
}

.icon-btn:hover {
  background: var(--glass-bg);
  border-color: var(--neon-cyan);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1440px) {
  .container {
    padding: var(--space-md);
  }
}

@media (max-width: 768px) {
  .container {
    padding: var(--space-sm);
  }
}

/* Upload Area */
.upload-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.upload-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  max-width: 600px;
  width: 100%;
}

.upload-card:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 245, 255, 0.2);
}

.upload-card.dragging {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(189, 0, 255, 0.1));
  border-color: var(--neon-purple);
  border-style: solid;
}

.upload-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.upload-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.upload-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.upload-formats {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
}

.format-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

.upload-hint {
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

#fileInput {
  display: none;
}

/* Workspace */
.workspace {
  display: none;
  animation: fadeIn 0.5s ease;
}

.workspace.active {
  display: block;
}

.workspace-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.file-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.file-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--glass-border);
}

.file-details h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.workspace-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.workspace-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-md);
}

/* Canvas Area */
.canvas-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  position: relative;
}

.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--glass-border);
}

.toolbar-group {
  display: flex;
  gap: var(--space-xs);
}

.canvas-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
}


.comparison-container {
  position: relative;
  display: inline-block;
  transition: all var(--transition-normal);
}

.comparison-container.hover-mode canvas {
  transition: opacity var(--transition-normal);
}

.comparison-container.sidebyside-mode {
  display: flex;
  gap: var(--space-sm);
}

.comparison-container.sidebyside-mode canvas {
  width: calc(50% - var(--space-sm) / 2) !important;
}

#originalCanvas,
#enhancedCanvas {
  max-width: 100%;
  max-height: 600px;
  display: block;
  border-radius: var(--radius-sm);
}

#originalCanvas {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
}

.comparison-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, 
    transparent 0%, 
    var(--neon-cyan) 20%, 
    var(--neon-purple) 50%, 
    var(--neon-cyan) 80%, 
    transparent 100%
  );
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 
    0 0 20px var(--neon-cyan),
    0 0 40px rgba(0, 245, 255, 0.5),
    0 0 60px rgba(189, 0, 255, 0.3);
  animation: sliderPulse 2s ease-in-out infinite;
}

@keyframes sliderPulse {
  0%, 100% {
    box-shadow: 
      0 0 20px var(--neon-cyan),
      0 0 40px rgba(0, 245, 255, 0.5),
      0 0 60px rgba(189, 0, 255, 0.3);
  }
  50% {
    box-shadow: 
      0 0 30px var(--neon-purple),
      0 0 60px rgba(189, 0, 255, 0.6),
      0 0 90px rgba(0, 245, 255, 0.4);
  }
}

.comparison-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, 
    rgba(0, 245, 255, 0.2), 
    rgba(189, 0, 255, 0.2)
  );
  border: 3px solid var(--neon-cyan);
  border-radius: 50%;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 0 30px var(--neon-cyan),
    inset 0 0 20px rgba(0, 245, 255, 0.3);
  transition: all var(--transition-fast);
}

.comparison-slider:hover::before {
  width: 60px;
  height: 60px;
  border-color: var(--neon-purple);
  box-shadow: 
    0 0 40px var(--neon-purple),
    inset 0 0 30px rgba(189, 0, 255, 0.4);
}

.comparison-slider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4L16 12L8 20' stroke='%2300f5ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16 4L8 12L16 20' stroke='%2300f5ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.comparison-labels {
  position: absolute;
  top: var(--space-sm);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-md);
  pointer-events: none;
  z-index: 5;
}

.comparison-label {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

/* Controls Panel */
.controls-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  position: relative;
  z-index: 1;
}

/* Fullscreen Mode Fixes */
:fullscreen,
:-webkit-full-screen,
:-moz-full-screen,
:-ms-fullscreen {
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
}

:fullscreen body,
:-webkit-full-screen body,
:-moz-full-screen body,
:-ms-fullscreen body {
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
}

:fullscreen .controls-panel,
:-webkit-full-screen .controls-panel,
:-moz-full-screen .controls-panel,
:-ms-fullscreen .controls-panel {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  max-width: 400px;
  width: 100%;
}

:fullscreen .workspace-content,
:-webkit-full-screen .workspace-content,
:-moz-full-screen .workspace-content,
:-ms-fullscreen .workspace-content {
  grid-template-columns: 1fr minmax(320px, 400px);
  gap: var(--space-md);
  height: calc(100vh - 80px);
  max-width: 100vw;
  width: 100vw;
  padding: 0;
}

:fullscreen .canvas-section,
:-webkit-full-screen .canvas-section,
:-moz-full-screen .canvas-section,
:-ms-fullscreen .canvas-section {
  height: calc(100vh - 80px);
  max-width: 100%;
  width: 100%;
}

:fullscreen .enhancement-option,
:-webkit-full-screen .enhancement-option,
:-moz-full-screen .enhancement-option,
:-ms-fullscreen .enhancement-option {
  padding: var(--space-sm);
  margin-bottom: var(--space-xs);
  flex-shrink: 0;
}

:fullscreen .enhancement-icon,
:-webkit-full-screen .enhancement-icon,
:-moz-full-screen .enhancement-icon,
:-ms-fullscreen .enhancement-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

:fullscreen .enhancement-title,
:-webkit-full-screen .enhancement-title,
:-moz-full-screen .enhancement-title,
:-ms-fullscreen .enhancement-title {
  font-size: 0.875rem;
}

:fullscreen .enhancement-subtitle,
:-webkit-full-screen .enhancement-subtitle,
:-moz-full-screen .enhancement-subtitle,
:-ms-fullscreen .enhancement-subtitle {
  font-size: 0.75rem;
}

:fullscreen .toggle-switch,
:-webkit-full-screen .toggle-switch,
:-moz-full-screen .toggle-switch,
:-ms-fullscreen .toggle-switch {
  flex-shrink: 0;
}

:fullscreen .section-content,
:-webkit-full-screen .section-content,
:-moz-full-screen .section-content,
:-ms-fullscreen .section-content {
  max-height: 400px;
  overflow-y: auto;
}

/* Hide header and footer in fullscreen */
:fullscreen .app-header,
:-webkit-full-screen .app-header,
:-moz-full-screen .app-header,
:-ms-fullscreen .app-header {
  display: none;
}

:fullscreen .app-footer,
:-webkit-full-screen .app-footer,
:-moz-full-screen .app-footer,
:-ms-fullscreen .app-footer {
  display: none;
}

:fullscreen .container,
:-webkit-full-screen .container,
:-moz-full-screen .container,
:-ms-fullscreen .container {
  padding: var(--space-md);
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

:fullscreen .workspace,
:-webkit-full-screen .workspace,
:-moz-full-screen .workspace,
:-ms-fullscreen .workspace {
  height: 100vh;
  max-width: 100%;
  width: 100%;
}

:fullscreen .workspace-header,
:-webkit-full-screen .workspace-header,
:-moz-full-screen .workspace-header,
:-ms-fullscreen .workspace-header {
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-xs);
  max-width: 100%;
}

:fullscreen .canvas-container,
:-webkit-full-screen .canvas-container,
:-moz-full-screen .canvas-container,
:-ms-fullscreen .canvas-container {
  width: 100%;
  max-width: 100%;
  height: calc(100vh - 160px);
}

:fullscreen #originalCanvas,
:fullscreen #enhancedCanvas,
:-webkit-full-screen #originalCanvas,
:-webkit-full-screen #enhancedCanvas,
:-moz-full-screen #originalCanvas,
:-moz-full-screen #enhancedCanvas,
:-ms-fullscreen #originalCanvas,
:-ms-fullscreen #enhancedCanvas {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
}

.control-section {
  margin-bottom: var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.section-header {
  padding: var(--space-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.section-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-toggle-btn:hover {
  background: var(--glass-bg-strong);
  color: var(--neon-cyan);
  transform: scale(1.1);
}

.section-toggle-btn.collapsed {
  color: var(--neon-purple);
}

.toggle-icon {
  font-size: 0.9rem;
  transition: transform var(--transition-fast);
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.section-icon {
  font-size: 1.2rem;
}

.collapse-icon {
  transition: transform var(--transition-fast);
  font-size: 0.75rem;
}

.section-header.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.section-content {
  padding: var(--space-md);
  max-height: 500px;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.section-content.collapsed {
  max-height: 0;
  padding: 0 var(--space-md);
}

/* Make enhancements section scrollable */
.section-content[data-content="enhancements"] {
  overflow-y: auto;
}

/* AI Enhancement Options */
.enhancement-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
}

.enhancement-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.enhancement-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: rgba(0, 245, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
}

.enhancement-info {
  flex: 1;
}

.enhancement-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.enhancement-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  min-width: 52px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  transition: all var(--transition-normal);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--neon-pink), #ff006e);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

/* Filter Presets */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--neon-purple) var(--glass-bg-subtle);
}

/* Webkit Scrollbar for Filter Grid */
.filter-grid::-webkit-scrollbar {
  width: 6px;
}

.filter-grid::-webkit-scrollbar-track {
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-full);
}

.filter-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.filter-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
}

.filter-preset {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.filter-preset::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.filter-preset:hover::before {
  opacity: 0.1;
}

.filter-preset:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-2px);
}

.filter-preset.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(189, 0, 255, 0.2));
  border-color: var(--neon-cyan);
}

.filter-name {
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Slider Controls */
.slider-group {
  margin-bottom: var(--space-md);
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.slider-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.slider-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neon-cyan);
  min-width: 50px;
  text-align: right;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-cyan);
  transition: all var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--neon-cyan);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px var(--neon-cyan);
  transition: all var(--transition-fast);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--neon-cyan);
}

/* Transform Tools */
.transform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

/* AI Quality Enhancement Button */
.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border: 1px solid var(--neon-cyan);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 245, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover {
  transform: none;
  box-shadow: none;
}


.btn-icon {
  font-size: 1.2rem;
  margin-right: var(--space-xs);
}

.btn-text {
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-subtitle {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Creative Effects Section - Scrollable */
.section-content[data-content="effects"] {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--space-sm);
}

.section-content[data-content="effects"]::-webkit-scrollbar {
  width: 6px;
}

.section-content[data-content="effects"]::-webkit-scrollbar-track {
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-full);
}

.section-content[data-content="effects"]::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.section-content[data-content="effects"]::-webkit-scrollbar-thumb:hover {
  background: var(--neon-purple);
}

.effects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.effect-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.effect-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 0;
}

.effect-btn:hover::before {
  opacity: 0.1;
}

.effect-btn.active::before {
  opacity: 0.15;
}

.effect-btn:hover {
  transform: translateY(-2px);
  border-color: var(--neon-cyan);
  box-shadow: 0 4px 12px rgba(0, 245, 255, 0.2);
}

.effect-btn.active {
  border-color: var(--neon-cyan);
  background: var(--glass-bg-strong);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.effect-icon {
  font-size: 1.75rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 5px currentColor);
}

.effect-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.effect-btn.active .effect-name {
  color: var(--neon-cyan);
}

.btn-block {
  width: 100%;
  display: block;
}

.crop-presets {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.crop-preset {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.crop-preset:hover,
.crop-preset.active {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border-color: transparent;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: var(--text-primary);
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.1);
}

.btn-danger {
  background: linear-gradient(135deg, #ff006e, #ff4d6d);
  color: var(--text-primary);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 0, 110, 0.4);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* History Panel */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.history-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--neon-cyan);
}

.history-item.current {
  border-color: var(--neon-purple);
  background: rgba(189, 0, 255, 0.1);
}

/* Upscale Section */
.upscale-info {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neon-cyan);
  font-family: monospace;
}

.upscale-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.upscale-preset {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.upscale-preset:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.1);
  color: var(--text-primary);
}

.upscale-preset.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(189, 0, 255, 0.2));
  border-color: var(--neon-cyan);
  color: var(--text-primary);
}

.upscale-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Export Options */
.export-grid {
  display: grid;
  gap: var(--space-md);
}

.format-selector {
  display: flex;
  gap: var(--space-xs);
}

.format-option {
  flex: 1;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 600;
}

.format-option:hover {
  border-color: var(--neon-cyan);
}

.format-option.active {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(189, 0, 255, 0.2));
  border-color: var(--neon-cyan);
}

/* Keyboard Shortcuts Overlay */
.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn var(--transition-fast);
}

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

.shortcuts-content {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.shortcuts-header .icon-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  flex-shrink: 0;
  cursor: pointer;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
}

.shortcuts-header .icon-btn:hover {
  background: var(--glass-bg);
  border-color: var(--neon-cyan);
  transform: scale(1.1);
}

.shortcuts-grid {
  display: grid;
  gap: var(--space-sm);
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.shortcut-key {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--neon-cyan);
}

/* Loading State */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  border-radius: var(--radius-lg);
}

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

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--neon-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-md);
}

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

.loading-text {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin: 0;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
  display: flex;
  gap: var(--space-xs);
  z-index: 10;
}

/* ========================================
   RESPONSIVE DESIGN - Mobile, Tablet, Desktop
   ======================================== */

/* Large Tablets & Small Desktops (1024px and below) */
@media (max-width: 1024px) {
  .workspace-content {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .controls-panel {
    max-height: none;
    order: 2;
  }
  
  .canvas-workspace {
    order: 1;
    min-height: 400px;
  }
  
  /* Header adjustments */
  .app-header {
    padding: var(--space-md) var(--space-lg);
  }
  
  .header-title {
    font-size: 1.25rem;
  }
  
  .header-subtitle {
    font-size: 0.8rem;
  }
  
  /* Button sizes for tablets */
  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
  
  /* Filter grid - 3 columns on tablets */
  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Transform grid */
  .transform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Export presets */
  .export-presets {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Fullscreen on tablets */
  :fullscreen .workspace-content,
  :-webkit-full-screen .workspace-content,
  :-moz-full-screen .workspace-content,
  :-ms-fullscreen .workspace-content {
    grid-template-columns: 1fr;
    height: 100vh;
  }
  
  :fullscreen .controls-panel,
  :-webkit-full-screen .controls-panel,
  :-moz-full-screen .controls-panel,
  :-ms-fullscreen .controls-panel {
    max-height: 50vh;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  /* Header - Mobile optimized */
  .app-header {
    padding: var(--space-sm) var(--space-md);
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  
  .header-title {
    font-size: 1.1rem;
  }
  
  .header-subtitle {
    font-size: 0.75rem;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  /* Workspace header */
  .workspace-header {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  /* Canvas adjustments */
  .canvas-workspace {
    min-height: 300px;
    padding: var(--space-sm);
  }
  
  /* Controls panel */
  .controls-panel {
    padding: var(--space-md);
  }
  
  .section-header {
    padding: var(--space-sm);
  }
  
  /* Filter grid - 2 columns on mobile */
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    max-height: 250px;
  }
  
  /* Effects grid - 2 columns on mobile */
  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }
  
  .effect-btn {
    padding: var(--space-sm);
  }
  
  .effect-icon {
    font-size: 1.5rem;
  }
  
  .effect-name {
    font-size: 0.65rem;
  }
  
  .filter-preset {
    padding: var(--space-xs);
    min-height: 60px;
  }
  
  .filter-name {
    font-size: 0.75rem;
  }
  
  /* Transform grid - 2 columns */
  .transform-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }
  
  /* Format selector - Stack vertically */
  .format-selector {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .format-option {
    padding: var(--space-sm);
  }
  
  /* Export presets - 1 column on mobile */
  .export-presets {
    grid-template-columns: 1fr !important;
    gap: var(--space-xs);
  }
  
  /* AI Enhancement Options - Mobile Responsive */
  .enhancement-option {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--space-sm);
    padding: var(--space-sm);
  }
  
  .enhancement-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  
  .enhancement-info {
    flex: 1;
  }
  
  .enhancement-title {
    font-size: 0.9rem;
  }
  
  .enhancement-subtitle {
    font-size: 0.7rem;
  }
  
  /* Buttons - Touch friendly */
  .btn {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 0.6rem 1rem;
    min-height: 40px;
    font-size: 0.85rem;
  }
  
  /* Upload section */
  .upload-section {
    padding: var(--space-lg);
    min-height: 250px;
  }
  
  .upload-icon {
    font-size: 2.5rem;
  }
  
  /* Comparison slider - Mobile touch-friendly */
  .comparison-slider {
    width: 5px; /* Wider line for visibility */
  }
  
  /* Add visible touch handle for mobile */
  .comparison-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, 
      rgba(0, 245, 255, 0.3) 0%, 
      rgba(168, 85, 247, 0.2) 50%,
      transparent 70%
    );
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 
      0 0 20px var(--neon-cyan),
      0 0 40px rgba(0, 245, 255, 0.5);
  }
  
  .comparison-slider::after {
    content: '⇔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--neon-cyan);
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-cyan);
    pointer-events: none;
  }
  
  /* Onboarding - Mobile optimized */
  .onboarding-content {
    padding: var(--space-lg);
    max-width: 90%;
    margin: 0 var(--space-sm);
  }
  
  .onboarding-title {
    font-size: 1.25rem;
  }
  
  .onboarding-description {
    font-size: 0.9rem;
  }
  
  /* Keyboard shortcuts modal */
  .shortcuts-modal-content {
    max-width: 95%;
    padding: var(--space-md);
  }
  
  .shortcut-item {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  /* Container padding */
  .container {
    padding: var(--space-xs);
  }
  
  /* Header - Compact */
  .app-header {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .header-logo {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
  
  .header-title {
    font-size: 1rem;
  }
  
  .header-subtitle {
    display: none; /* Hide subtitle on very small screens */
  }
  
  .header-actions {
    gap: var(--space-xs);
  }
  
  /* Buttons - Extra touch friendly */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    min-height: 44px;
    width: 100%;
  }
  
  .btn-sm {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    min-height: 40px;
  }
  
  /* Canvas workspace */
  .canvas-workspace {
    min-height: 250px;
    padding: var(--space-xs);
  }
  
  /* Controls panel */
  .controls-panel {
    padding: var(--space-sm);
  }
  
  .control-section {
    margin-bottom: var(--space-sm);
  }
  
  /* Section headers */
  .section-header {
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
  }
  
  .section-icon {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 0.85rem;
  }
  
  /* Filter grid - Single column on very small screens */
  .filter-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    max-height: 200px;
  }
  
  .filter-preset {
    padding: var(--space-sm);
    min-height: 50px;
  }
  
  .filter-name {
    font-size: 0.8rem;
  }
  
  /* AI Enhancement options */
  .enhancement-option {
    padding: var(--space-xs);
    margin-bottom: var(--space-xs);
    gap: var(--space-xs);
  }
  
  .enhancement-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1rem;
  }
  
  .enhancement-title {
    font-size: 0.8rem;
  }
  
  .enhancement-subtitle {
    font-size: 0.65rem;
    line-height: 1.3;
  }
  
  /* Toggle switches */
  .toggle-switch {
    width: 44px;
    height: 24px;
  }
  
  .toggle-slider::before {
    width: 18px;
    height: 18px;
  }
  
  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
  }
  
  /* Transform grid - Single column */
  .transform-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  /* Sliders */
  .slider-group {
    margin-bottom: var(--space-sm);
  }
  
  .slider-label {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
  }
  
  .slider {
    height: 40px; /* Larger hit area for touch */
  }
  
  /* Upload section */
  .upload-section {
    padding: var(--space-md);
    min-height: 200px;
  }
  
  .upload-icon {
    font-size: 2rem;
  }
  
  .upload-title {
    font-size: 1rem;
  }
  
  .upload-subtitle {
    font-size: 0.75rem;
  }
  
  /* Format selector */
  .format-option {
    padding: var(--space-sm);
    font-size: 0.8rem;
  }
  
  /* Export presets */
  .export-preset {
    padding: var(--space-sm);
    font-size: 0.75rem;
  }
  
  /* Comparison slider - Extra large for small screens */
  .comparison-slider {
    width: 6px; /* Even wider line */
  }
  
  /* Larger touch handle for small screens */
  .comparison-slider::before {
    width: 60px;
    height: 60px;
  }
  
  .comparison-slider::after {
    font-size: 1.75rem;
  }
  
  /* Onboarding */
  .onboarding-content {
    padding: var(--space-md);
    max-width: 95%;
  }
  
  .onboarding-title {
    font-size: 1.1rem;
  }
  
  .onboarding-description {
    font-size: 0.85rem;
  }
  
  .onboarding-illustration {
    font-size: 3rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .footer-section h4 {
    font-size: 0.8rem;
  }
  
  /* Toast notifications */
  .toast {
    min-width: auto;
    max-width: 100%;
  }
  
  .toast-title {
    font-size: 0.9rem;
  }
  
  .toast-message {
    font-size: 0.8rem;
  }
}

/* Landscape Orientation - Mobile/Tablet */
@media (max-height: 500px) and (orientation: landscape) {
  .app-header {
    padding: var(--space-xs) var(--space-md);
  }
  
  .header-logo {
    width: 32px;
    height: 32px;
  }
  
  .header-title {
    font-size: 0.9rem;
  }
  
  .header-subtitle {
    display: none;
  }
  
  .canvas-workspace {
    min-height: 200px;
  }
  
  .filter-grid {
    max-height: 150px;
  }
  
  .onboarding-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Enhance touch targets */
  .btn,
  .filter-preset,
  .enhancement-option,
  .format-option,
  .section-header {
    min-height: 44px; /* Apple's recommended touch target */
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  .filter-preset:hover,
  .format-option:hover {
    transform: none;
  }
  
  /* Add active states for better feedback */
  .btn:active {
    transform: scale(0.95);
    opacity: 0.9;
  }
  
  .filter-preset:active,
  .format-option:active {
    transform: scale(0.97);
  }
  
  /* Comparison slider - Touch optimized */
  .comparison-slider {
    width: 5px;
    cursor: grab;
  }
  
  .comparison-slider:active {
    cursor: grabbing;
  }
  
  /* Larger scrollbars on touch devices */
  .filter-grid::-webkit-scrollbar {
    width: 8px;
  }
  
  /* Prevent text selection during interactions */
  .btn,
  .filter-preset,
  .slider,
  .toggle-switch,
  .comparison-slider {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Smoother scrolling on touch */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* High DPI Displays (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Sharper borders */
  .btn,
  .filter-preset,
  .controls-panel,
  .canvas-workspace {
    border-width: 0.5px;
  }
  
  /* Crisp shadows */
  .btn,
  .filter-preset.active {
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3),
                0 0 30px rgba(168, 85, 247, 0.2);
  }
}

/* Print Styles */
@media print {
  .app-header,
  .controls-panel,
  .header-actions,
  .toast-container,
  .onboarding-overlay,
  .shortcuts-modal {
    display: none !important;
  }
  
  .canvas-workspace {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .workspace-content {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .comparison-slider {
    transition: none;
  }
}

/* Dark Mode Support (if system prefers dark) */
@media (prefers-color-scheme: dark) {
  /* Already dark by default, but enhance if needed */
  :root {
    --bg-primary: #050308;
    --bg-secondary: #0d0a1a;
  }
}

/* Warning Notification System */
.warning-notification {
  position: fixed;
  top: 80px;
  right: -400px;
  width: 360px;
  background: linear-gradient(135deg, 
    rgba(255, 107, 107, 0.95), 
    rgba(255, 77, 77, 0.95)
  );
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  z-index: 3000;
  box-shadow: 
    0 20px 60px rgba(255, 0, 0, 0.4),
    0 0 40px rgba(255, 107, 107, 0.3);
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% {
    box-shadow: 
      0 20px 60px rgba(255, 0, 0, 0.4),
      0 0 40px rgba(255, 107, 107, 0.3);
  }
  50% {
    box-shadow: 
      0 20px 60px rgba(255, 0, 0, 0.6),
      0 0 60px rgba(255, 107, 107, 0.5);
  }
}

.warning-notification.show {
  right: var(--space-lg);
}

.warning-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.warning-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  animation: warningShake 0.5s ease-in-out infinite;
}

@keyframes warningShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.warning-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.warning-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.warning-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.warning-message {
  color: white;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.warning-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: monospace;
}

.warning-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.warning-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.warning-btn-primary {
  background: white;
  color: #ff6b6b;
}

.warning-btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.warning-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.warning-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Success Notification */
.success-notification {
  position: fixed;
  top: 80px;
  right: -400px;
  width: 360px;
  background: linear-gradient(135deg, 
    rgba(0, 245, 255, 0.95), 
    rgba(0, 200, 210, 0.95)
  );
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  z-index: 3000;
  box-shadow: 
    0 20px 60px rgba(0, 245, 255, 0.4),
    0 0 40px rgba(0, 245, 255, 0.3);
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-notification.show {
  right: var(--space-lg);
}

.success-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  animation: successScale 0.5s ease-in-out;
}

@keyframes successScale {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Footer */
.app-footer {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  margin-top: var(--space-xl);
  padding: var(--space-xl) var(--space-md) var(--space-md);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.app-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--neon-cyan) 25%, 
    var(--neon-purple) 50%, 
    var(--neon-cyan) 75%, 
    transparent
  );
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-xl);
  align-items: start;
}

.footer-section {
  min-width: 0;
}

.footer-section-brand {
  max-width: 320px;
}

.footer-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.footer-logo {
  width: 56px;
  height: 56px;
  min-width: 56px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.footer-brand > div {
  flex: 1;
  min-width: 0;
}

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  word-wrap: break-word;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-wrap: break-word;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  display: inline-block;
  cursor: pointer;
  position: relative;
  padding-left: 0;
  pointer-events: auto;
  z-index: 1;
}

.footer-links a::before {
  content: '›';
  position: absolute;
  left: -15px;
  opacity: 0;
  transition: all var(--transition-fast);
  color: var(--neon-cyan);
}

.footer-links a:hover {
  color: var(--neon-cyan);
  transform: translateX(8px);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -12px;
}

.footer-links a:active {
  transform: translateX(10px) scale(0.98);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.social-link:hover::before {
  opacity: 0.2;
}

.social-link:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

.social-link svg {
  position: relative;
  z-index: 1;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: var(--space-md);
  width: 100%;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.footer-bottom-links a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.footer-bottom-links span {
  color: var(--text-muted);
}

/* Footer Sections */
.footer-section h4 {
  color: var(--neon-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-md);
}

.footer-section-stats {
  display: flex;
  justify-content: flex-end;
}

.footer-stats {
  margin: 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-width: 180px;
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Footer Author Profile */
.footer-author-profile {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.author-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.author-card:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(0, 245, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 245, 255, 0.1);
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.author-card:hover .author-image {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.author-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.author-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.author-title {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Responsive Author Card */
@media (max-width: 768px) {
  .footer-author-profile {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .author-card {
    padding: var(--space-sm) var(--space-md);
  }
  
  .author-image {
    width: 50px;
    height: 50px;
  }
  
  .author-name {
    font-size: 0.9rem;
  }
  
  .author-title {
    font-size: 0.8rem;
  }
}

/* Newsletter Form */
.newsletter-form {
  width: 100%;
  max-width: 100%;
}

.newsletter-input-group {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  width: 100%;
  max-width: 100%;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.newsletter-input::placeholder {
  color: var(--text-muted);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

.newsletter-btn {
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.4);
}

/* Footer Stats */
.footer-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all var(--transition-normal);
  z-index: 1500;
  box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.5);
}

.back-to-top:active {
  transform: translateY(-3px);
}

.back-to-top svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Footer Responsive */
@media (max-width: 1280px) {
  .footer-content {
    max-width: 100%;
    padding: 0 var(--space-lg);
  }
  
  .footer-bottom-content {
    max-width: 100%;
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding: 0 var(--space-md);
  }
  
  .footer-bottom-content {
    padding: 0 var(--space-md);
  }
  
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
  
  .footer-section:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .app-footer {
    padding: var(--space-lg) var(--space-sm) var(--space-md);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: 0 var(--space-xs);
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    padding: 0 var(--space-xs);
    gap: var(--space-sm);
  }
  
  .footer-brand {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .footer-brand h3 {
    font-size: 1.1rem;
  }
  
  .footer-brand p {
    font-size: 0.8rem;
  }
  
  .newsletter-input-group {
    flex-direction: column;
    width: 100%;
  }
  
  .newsletter-input,
  .newsletter-btn {
    width: 100%;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-stats {
    margin-top: var(--space-sm);
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  
  .footer-section:first-child {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .app-footer {
    padding: var(--space-md) var(--space-xs) var(--space-sm);
  }
  
  .footer-content {
    gap: var(--space-md);
    padding: 0;
  }
  
  .footer-bottom-content {
    padding: 0;
  }
  
  .footer-section h4 {
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
  }
  
  .footer-links a {
    font-size: 0.8rem;
  }
  
  .footer-brand h3 {
    font-size: 1rem;
  }
  
  .footer-brand p {
    font-size: 0.75rem;
  }
  
  .footer-logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
  }
  
  .social-link svg {
    width: 18px;
    height: 18px;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .newsletter-input,
  .newsletter-btn {
    font-size: 0.8rem;
    padding: var(--space-xs);
  }
  
  .footer-bottom-content p,
  .footer-bottom-links {
    font-size: 0.75rem;
  }
  
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .back-to-top {
    bottom: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
  }
  
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Advanced Toast Notification System */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--glass-shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  pointer-events: all;
  animation: toastSlideIn 0.3s var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
}

.toast.success::before {
  background: var(--color-success);
}

.toast.error::before {
  background: var(--color-error);
}

.toast.warning::before {
  background: var(--color-warning);
}

.toast.info::before {
  background: var(--color-info);
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}

.toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-success);
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-error);
}

.toast.warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-warning);
}

.toast.info .toast-icon {
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-info);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  animation: toastProgress 3s linear forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Advanced Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s, opacity 0.6s;
  opacity: 0;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
  opacity: 0.3;
  transition: 0s;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Stagger Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 0.5s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Button States */
.btn-glow {
  position: relative;
  overflow: visible;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
  filter: blur(10px);
}

.btn-glow:hover::before {
  opacity: 0.7;
  animation: rotat 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* Tooltip System */
.tooltip {
  position: relative;
}

.tooltip::before,
.tooltip::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.tooltip::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: var(--z-tooltip);
}

.tooltip::after {
  content: '';
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  z-index: var(--z-tooltip);
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }

/* Onboarding Tutorial */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  animation: fadeIn var(--transition-normal);
}

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

.onboarding-content {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 600px;
  width: 90%;
  box-shadow: var(--glass-shadow-lg);
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.onboarding-header h2 {
  font-size: 1.75rem;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.onboarding-header .icon-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
}

.onboarding-header .icon-btn:hover {
  background: var(--glass-bg);
  border-color: var(--neon-cyan);
  transform: scale(1.1);
}

.onboarding-steps {
  position: relative;
  min-height: 200px;
}

.onboarding-step {
  display: none;
  text-align: center;
  animation: fadeIn var(--transition-normal);
}

.onboarding-step.active {
  display: block;
}

.step-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: float 3s ease-in-out infinite;
}

.onboarding-step h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.onboarding-step p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.onboarding-footer {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-dots {
  display: flex;
  gap: var(--space-xs);
}

.onboarding-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.onboarding-dots .dot.active {
  width: 24px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}

.onboarding-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.onboarding-actions .btn {
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  min-width: 100px;
  font-weight: 600;
}

.onboarding-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive Toast Notifications */
@media (max-width: 768px) {
  .section-content[data-content="effects"] {
    max-height: 350px;
  }
  
  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .effect-btn {
    padding: var(--space-sm);
    font-size: 0.8rem;
  }
  
  .effect-icon {
    font-size: 1.2rem;
  }
  
  
  .toast-container {
    right: 10px;
    left: 10px;
    top: 70px;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  .onboarding-content {
    padding: var(--space-lg);
  }
  
  .onboarding-header h2 {
    font-size: 1.25rem;
  }
  
  .step-icon {
    font-size: 3rem;
  }
}
