/* ==========================================================================
   Edupidia PDF Splitter — Complete Production Stylesheet
   Glassmorphism · Modern · Responsive · Accessible · Dark Mode
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  /* Accent */
  --accent-500: #ec4899;
  --accent-600: #db2777;

  /* Light Theme */
  --bg:           #f6f7fb;
  --bg-elev:      #ffffff;
  --surface:      rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --border:       rgba(15, 23, 42, 0.08);
  --border-strong:rgba(15, 23, 42, 0.14);
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-subtle:  #64748b;

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #0ea5e9;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-soft:  linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(236,72,153,0.1) 100%);
  --gradient-bg:    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.15), transparent 60%),
                    radial-gradient(1000px 500px at 110% 10%, rgba(236,72,153,0.12), transparent 60%),
                    linear-gradient(180deg, #f6f7fb 0%, #eef0fb 100%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 10px 30px rgba(15,23,42,0.08), 0 4px 10px rgba(15,23,42,0.04);
  --shadow-lg: 0 20px 50px rgba(79,70,229,0.18), 0 8px 20px rgba(15,23,42,0.08);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-slow: 420ms;

  /* Layout */
  --container: 1120px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg:           #0b1020;
  --bg-elev:      #111735;
  --surface:      rgba(17, 23, 53, 0.6);
  --surface-strong: rgba(17, 23, 53, 0.85);
  --border:       rgba(255, 255, 255, 0.08);
  --border-strong:rgba(255, 255, 255, 0.16);
  --text:         #e5e7eb;
  --text-muted:   #a5b0c7;
  --text-subtle:  #8a94ad;

  --gradient-bg:  radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.25), transparent 60%),
                  radial-gradient(1000px 500px at 110% 10%, rgba(236,72,153,0.18), transparent 60%),
                  linear-gradient(180deg, #0b1020 0%, #0a0f24 100%);

  --shadow-md: 0 10px 30px rgba(0,0,0,0.35), 0 4px 10px rgba(0,0,0,0.2);
  --shadow-lg: 0 20px 50px rgba(99,102,241,0.25), 0 8px 20px rgba(0,0,0,0.3);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-strong);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9em;
}

[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Navigation ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.logo-text { font-size: 1.1rem; }
.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--dur) var(--ease);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--brand-600); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}
.theme-toggle {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.theme-toggle:hover { background: var(--surface-strong); color: var(--text); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon, :root:not([data-theme]) .icon-moon { display: none; }
.mobile-menu-toggle { display: none; }

/* ---------- Hero Section ---------- */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
  animation: pulse 2s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(16,185,129,0.05); }
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 20px 0 16px;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-features {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.hero-feature svg {
  width: 20px;
  height: 20px;
  color: var(--brand-600);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.25); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.btn-ghost {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-600); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; border-radius: 16px; }

.btn-gradient {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.btn-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 700ms var(--ease);
}
.btn-gradient:hover::before { transform: translateX(100%); }
.btn-gradient:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Tool Section ---------- */
.tool-section { padding: 40px 0 80px; }
.glass-card {
  margin: 24px 0;
  padding: 32px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow-md);
  animation: fadeUp var(--dur-slow) var(--ease) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--gradient-soft);
  color: var(--brand-700);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
[data-theme="dark"] .step-pill { color: var(--brand-200); }
.section-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

/* ---------- Dropzone ---------- */
.dropzone {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 56px 24px;
  text-align: center;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(99,102,241,0.08), transparent 70%),
    var(--surface-strong);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  outline: none;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--brand-400);
  transform: translateY(-2px);
}
.dropzone.drag-over {
  border-color: var(--brand-500);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(99,102,241,0.18), transparent 70%),
    var(--surface-strong);
  transform: scale(1.005);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--success);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(16,185,129,0.12), transparent 70%),
    var(--surface-strong);
}
.dropzone-content { pointer-events: none; }
.dropzone-icon {
  width: 80px; height: 80px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: var(--gradient-soft);
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}
.dropzone-icon svg { width: 38px; height: 38px; }
.dropzone-title { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; }
.dropzone-subtitle { margin: 0 0 12px; color: var(--text-muted); }
.dropzone-help { margin: 0 0 24px; color: var(--text-subtle); font-size: 0.9rem; line-height: 1.6; }
.dropzone .btn { pointer-events: auto; }

/* ---------- Upload Progress ---------- */
.upload-progress { margin-top: 24px; }
.upload-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.upload-progress-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.upload-progress-percent { color: var(--brand-600); font-weight: 700; }
.upload-progress-status { margin: 10px 0 0; color: var(--text-subtle); font-size: 0.85rem; }

/* ---------- Progress Bars ---------- */
.progress-track {
  height: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-track-lg { height: 10px; }
.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 999px;
  width: 0%;
  transition: width var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- File Info ---------- */
.file-info {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}
.file-info-thumb {
  width: 80px; height: 108px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(99,102,241,0.15), rgba(236,72,153,0.15)),
    #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--text-subtle);
  font-size: 0.75rem;
}
.file-info-thumb img, .file-info-thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.file-info-name {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  word-break: break-word;
}
.file-info-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.file-info-meta .meta-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 2px;
}
.file-info-meta .meta-value { font-weight: 600; color: var(--text); }
.file-info-actions { display: flex; gap: 8px; }

/* ---------- Selection Toolbar ---------- */
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}
.selection-count { font-weight: 600; }
.selection-actions { display: flex; gap: 8px; }

/* ---------- Thumbnails ---------- */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.thumb {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow-xs);
  outline: none;
}
.thumb canvas { width: 100%; height: 100%; display: block; }
.thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.thumb:focus-visible { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,0.25); }
.thumb.selected {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.22), var(--shadow-md);
  transform: translateY(-2px);
}
.thumb-number {
  position: absolute;
  top: 6px; left: 6px;
  min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: rgba(15,23,42,0.72);
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  backdrop-filter: blur(6px);
}
.thumb-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--border-strong);
  display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.thumb.selected .thumb-check {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
}
.thumb-check svg { width: 14px; height: 14px; opacity: 0; transition: opacity var(--dur) var(--ease); }
.thumb.selected .thumb-check svg { opacity: 1; }

/* Skeleton */
.thumb-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.skeleton-item {
  aspect-ratio: 3/4;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-strong), var(--surface), var(--surface-strong));
  background-size: 200% 100%;
  animation: skeleton 1.4s infinite linear;
  border: 1px solid var(--border);
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Split Modes ---------- */
.split-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.mode-tab {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--dur) var(--ease);
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.mode-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.mode-icon svg { width: 18px; height: 18px; }

/* Mode Panels */
.mode-panel { display: none; animation: fadeIn var(--dur) var(--ease); }
.mode-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Fields */
.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  transition: all var(--dur) var(--ease);
  resize: vertical;
  font-family: inherit;
}
.field-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
.field-input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.field-hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-subtle); }
.field-error {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--danger);
  min-height: 1.2em;
}
.field-error:empty { display: none; }

/* Range Preview */
.range-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.range-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-700);
}
[data-theme="dark"] .range-chip { color: var(--brand-200); }

/* Info Banner */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
}
.info-banner svg { width: 18px; height: 18px; flex: none; color: var(--brand-600); margin-top: 2px; }

/* Output Settings */
.output-settings {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.output-title { margin: 0 0 16px; font-size: 1.05rem; font-weight: 700; }
.output-row { margin-bottom: 16px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.radio:hover { border-color: var(--brand-400); }
.radio input { accent-color: var(--brand-600); }
.radio-label { font-weight: 600; font-size: 0.92rem; }

/* ---------- Action Section ---------- */
.action-section { text-align: center; padding: 40px 20px; }
.action-hint { margin: 14px 0 0; color: var(--text-subtle); font-size: 0.88rem; }

/* ---------- Processing Overlay ---------- */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 200;
}
.processing-overlay:not([hidden]) {
  display: grid;
  animation: fadeIn var(--dur) var(--ease);
}
.processing-card {
  width: min(420px, 92vw);
  padding: 32px;
  text-align: center;
  border-radius: var(--r-lg);
}
.processing-spinner {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid var(--border-strong);
  border-top-color: var(--brand-500);
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-title { margin: 0 0 8px; font-size: 1.15rem; }
.processing-status { margin: 0 0 16px; color: var(--text-muted); font-size: 0.92rem; }
.processing-percent { margin: 12px 0 0; font-weight: 700; color: var(--brand-600); }

/* ---------- Success ---------- */
.success-card { text-align: center; padding: 40px 24px; }
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  animation: pop 500ms var(--ease);
}
.success-icon svg { width: 36px; height: 36px; }
@keyframes pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.success-title { margin: 0 0 8px; font-size: 1.8rem; }
.success-subtitle { margin: 0 0 24px; color: var(--text-muted); }

.success-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.stat {
  padding: 16px 24px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  min-width: 140px;
}
.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-subtle); }

.success-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 auto 24px;
  max-width: 760px;
  text-align: left;
}
.success-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}
.success-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.success-file-size { color: var(--text-subtle); font-size: 0.78rem; }
.success-file .btn { padding: 6px 10px; font-size: 0.78rem; }

.success-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Info Sections ---------- */
.info-section { padding: 80px 0; }
.info-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.step-card {
  padding: 32px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--dur) var(--ease);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}
.step-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gradient-soft);
  color: var(--brand-600);
}
.step-icon svg { width: 28px; height: 28px; }
.step-card h3 { margin: 0 0 12px; font-size: 1.15rem; }
.step-card p { color: var(--text-muted); line-height: 1.6; }

/* FAQ Section */
.faq-section { margin-top: 64px; }
.faq-section h3 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.5rem;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.faq-item {
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.faq-item h4 { margin: 0 0 10px; color: var(--brand-600); }
.faq-item p { color: var(--text-muted); line-height: 1.6; }

/* ---------- About Section ---------- */
.about-section { background: var(--surface); }
.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
.about-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--text-muted);
}
.about-text h3 { margin: 0 0 16px; font-size: 1.3rem; }
.feature-list { list-style: none; }
.feature-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.feature-list li strong { display: block; margin-bottom: 2px; }
.feature-list li span { color: var(--text-muted); font-size: 0.9rem; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat-box {
  padding: 24px;
  text-align: center;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
.stat-desc { font-size: 0.85rem; color: var(--text-subtle); }

/* Tech Stack */
.tech-stack { text-align: center; }
.tech-stack h3 { margin-bottom: 24px; }
.tech-logos {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.tech-item svg { width: 32px; height: 32px; color: var(--brand-600); }

/* ---------- Footer ---------- */

.footer{
    padding:60px 0 40px;
    background:#192546;
    border-top:1px solid rgba(255,255,255,0.1);
}

.footer-content{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:22px;
    text-align:center;
}

.footer-brand{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:1.5rem;
    font-weight:700;
    color:#fff;
}

.footer-brand img{
    width:42px;
    height:42px;
}

.footer-text{
    max-width:700px;
    color:#9ca3af;
    font-size:.95rem;
    line-height:1.7;
}

.footer-nav{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:32px;
    margin-top:8px;
}

.footer-nav a{
    color:#d1d5db;
    position:relative;
    transition:.3s;
}

.footer-nav a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-5px;
    width:0;
    height:2px;
    background:#8b5cf6;
    transition:.3s;
}

.footer-nav a:hover{
    color:#fff;
}

.footer-nav a:hover::after{
    width:100%;
}

@media (max-width:768px){

.footer{
    padding:45px 0 30px;
}

.footer-nav{
    gap:18px;
}

.footer-brand{
    font-size:1.25rem;
}

}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: toastIn var(--dur) var(--ease);
}
.toast.leaving { animation: toastOut var(--dur) var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast.success { border-color: rgba(16,185,129,0.35); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.35); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info { border-color: rgba(14,165,233,0.35); }
.toast.info .toast-icon { color: var(--info); }
.toast.warning { border-color: rgba(245,158,11,0.35); }
.toast.warning .toast-icon { color: var(--warning); }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 2px; }
.toast-msg { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-menu-toggle { display: block; }
  .hero { padding: 60px 20px 40px; }
  .hero-features { gap: 20px; }
  .tool-section { padding: 20px 0 60px; }
  .glass-card { padding: 20px; }
  .file-info { grid-template-columns: 1fr; text-align: center; }
  .file-info-actions { justify-content: center; }
  .about-content { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .mode-tab { flex: 1 1 100%; }
  .toast-container { left: 12px; right: 12px; max-width: none; }
  .success-actions { flex-direction: column; }
  .success-actions .btn { width: 100%; }
}

/* ---------- Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus Visible ---------- */
:focus:not(:focus-visible) { outline: none; }








