/* ==========================================================================
   Design System & Modern Glassmorphism Theme
   ========================================================================== */

:root {
  /* Color Palette - Deep Futuristic Slate & Vibrant Accents */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 61, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(37, 99, 235, 0.5);

  /* Accents */
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(29, 78, 216, 0.3) 100%);
  --accent-cyan: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  --accent-indigo: #2563eb;
  --accent-purple: #3b82f6;

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Shadows & Blur */
  --glass-blur: blur(16px);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px -5px rgba(37, 99, 235, 0.25);
  --shadow-glow-emerald: 0 0 20px -5px rgba(16, 185, 129, 0.25);

  /* Transitions & Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --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-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-active: rgba(37, 99, 235, 0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

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

body {
  font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-family: 'Inter', 'Cairo', system-ui, sans-serif;
}

/* Dynamic Ambient Glow Background */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.glow-orb-1 {
  width: 500px;
  height: 500px;
  background: #1e40af;
  top: -100px;
  right: -100px;
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: #0284c7;
  bottom: -50px;
  left: -50px;
  animation-delay: -7s;
}

.glow-orb-3 {
  width: 350px;
  height: 350px;
  background: #0f766e;
  top: 40%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.1); }
  100% { transform: translate(-40px, 40px) scale(0.95); }
}

/* Main Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 26px;
  height: 26px;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .brand-title {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 20px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  max-width: 800px;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
}

/* Privacy & Offline Guarantee Banner */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

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

/* Drag & Drop Upload Zone */
.dropzone-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.dropzone-container:hover,
.dropzone-container.drag-over {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.dropzone-icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
  transition: transform var(--transition-bounce);
}

.dropzone-container:hover .dropzone-icon-wrap {
  transform: scale(1.12);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.dropzone-icon-wrap svg {
  width: 42px;
  height: 42px;
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.dropzone-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.btn-upload-trigger {
  pointer-events: auto;
  margin-top: 8px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
}

.btn-upload-trigger:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 35px rgba(217, 70, 239, 0.45);
}

.btn-upload-trigger svg {
  width: 20px;
  height: 20px;
}

/* Compression Settings Card */
.settings-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
}

.settings-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-icon {
  color: var(--accent-indigo);
  display: flex;
}

.settings-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Preset Cards Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.preset-card {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.preset-card.active {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.preset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preset-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--accent-indigo);
}

.preset-card.active .preset-icon-badge {
  background: var(--accent-gradient);
  color: #ffffff;
}

.preset-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.preset-name {
  font-size: 1rem;
  font-weight: 700;
}

.preset-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.preset-estimate {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: auto;
}

/* Custom Pro Slider Controls */
.custom-controls-drawer {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  animation: fadeIn 0.3s ease;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.custom-controls-drawer.show {
  display: grid;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.slider-val {
  color: var(--accent-indigo);
  font-weight: 700;
  background: var(--bg-glass);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-indigo);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Checkbox Toggle Group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.custom-checkbox-label input {
  accent-color: var(--accent-indigo);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Files Queue Section */
.queue-section {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.queue-section.has-files {
  display: flex;
}

.queue-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.queue-stats-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

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

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-active);
}

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

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* File Items List */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.file-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-sm);
}

.file-card.completed {
  border-color: rgba(16, 185, 129, 0.35);
}

.file-card.processing {
  border-color: rgba(99, 102, 241, 0.5);
}

/* Progress bar inside file card */
.file-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--accent-gradient);
  width: 0%;
  transition: width 0.2s ease;
}

.file-info-col {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.file-type-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-type-badge svg {
  width: 24px;
  height: 24px;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.file-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.file-size-badge {
  font-family: monospace;
  font-size: 0.85rem;
}

.file-stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-reduced {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.badge-increased {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.file-status-text {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.file-actions-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.action-icon-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-indigo);
  color: #ffffff;
}

.action-icon-btn.btn-dl {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.action-icon-btn.btn-dl:hover {
  background: var(--accent-emerald);
  color: #ffffff;
}

.action-icon-btn.btn-preview {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.action-icon-btn.btn-preview:hover {
  background: var(--accent-cyan);
  color: #ffffff;
}

/* Total Stats Summary Banner */
.overall-summary-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(217, 70, 239, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-glow);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

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

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-value.highlight-emerald {
  color: var(--accent-emerald);
}

.stat-value.highlight-indigo {
  color: #818cf8;
}

/* Feature Showcase Cards (Trust & Benefits) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.feature-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-normal);
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
}

.feature-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.feature-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Comparison Preview Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comparison-view-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.preview-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.preview-col-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.preview-canvas-wrapper {
  width: 100%;
  max-height: 480px;
  overflow: auto;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.preview-canvas-wrapper canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[dir="rtl"] .toast-container {
  left: auto;
  right: 24px;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  animation: slideToast 0.3s ease;
  min-width: 260px;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.5);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.9rem;
  }
  .app-header {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .comparison-view-container {
    grid-template-columns: 1fr;
  }
  .overall-summary-card {
    flex-direction: column;
    text-align: center;
  }
}
