/* ============================================================
   Simple PDF Tools — Webpage to PDF Converter
   Main Stylesheet — Premium Light Blue Design System
   ============================================================ */

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --cyan-400: #22d3ee;

  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --success: #10b981;
  --success-light: #d1fae5;
  --error: #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 3px rgba(15,23,42,0.06);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.08);
  --shadow: 0 4px 20px rgba(15,23,42,0.10);
  --shadow-md: 0 8px 32px rgba(15,23,42,0.12);
  --shadow-lg: 0 16px 48px rgba(15,23,42,0.14);
  --shadow-blue: 0 8px 32px rgba(59,130,246,0.18);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);

  --header-height: 68px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-700); }

img { max-width: 100%; display: block; }

/* ─── Container ────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HEADER ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(203,213,225,0.5);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(59,130,246,0.12);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-800);
  text-decoration: none;
}

.brand:hover { color: var(--gray-800); }

.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-500), var(--sky-500));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.brand-name strong { color: var(--blue-600); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
}

.site-nav a:hover { background: var(--blue-50); color: var(--blue-600); }

.site-nav .nav-cta {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
  display: flex; align-items: center; gap: 6px;
}

.site-nav .nav-cta:hover {
  color: white;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: 4px;
}

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
  background: linear-gradient(160deg, #f0f7ff 0%, #e0effe 40%, #f5f8ff 100%);
}

.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(60px);
}

.shape-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(147,197,253,0.4), transparent);
  top: -150px; right: -100px;
}

.shape-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34,211,238,0.25), transparent);
  bottom: -50px; left: 10%;
}

.shape-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99,179,237,0.3), transparent);
  top: 40%; left: 40%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue-600), var(--sky-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 500px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.trust-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--blue-100);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-700);
  box-shadow: var(--shadow-xs);
}

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

/* Mockup illustration */
.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--blue-100);
  width: 100%;
  max-width: 360px;
  animation: float 4s ease-in-out infinite;
}

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

.mockup-bar {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.mockup-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gray-200);
}
.mockup-bar span:first-child { background: #ff5f57; }
.mockup-bar span:nth-child(2) { background: #febc2e; }
.mockup-bar span:nth-child(3) { background: #28c840; }

.mockup-url {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.mockup-arrow {
  text-align: center;
  font-size: 2rem;
  color: var(--blue-400);
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.mockup-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border: 1px solid var(--blue-200);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--blue-700);
  font-weight: 700;
  font-size: 1rem;
}

.mockup-pdf i { font-size: 1.8rem; color: var(--blue-500); }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-lg { padding: 14px 28px; font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  box-shadow: 0 3px 12px rgba(59,130,246,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
  transform: translateY(-1px);
  color: white;
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white;
  color: var(--blue-600);
  border: 1.5px solid var(--blue-200);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
  box-shadow: var(--shadow-sm);
}

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

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
}

.btn-ghost:hover {
  background: white;
  color: var(--gray-800);
  border-color: var(--gray-300);
}

.btn-convert {
  width: 100%;
  justify-content: center;
  padding: 15px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  margin-top: 8px;
}

/* ─── PLAN BANNER ───────────────────────────────────────── */
.plan-banner {
  padding: 16px 24px;
}

.plan-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-200);
  flex-wrap: wrap;
}

.plan-indicator.free { border-left: 3px solid var(--blue-400); }
.plan-indicator.paid { border-left: 3px solid var(--success); }

.plan-indicator i { color: var(--blue-500); font-size: 1.1rem; }

.plan-upgrade-link {
  margin-left: auto;
  font-weight: 600;
  color: var(--blue-600);
  display: flex; align-items: center; gap: 4px;
  font-size: 0.85rem;
}

/* ─── TOOL SECTION ──────────────────────────────────────── */
.tool-section {
  padding: 12px 0 60px;
}

.tool-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

/* ─── TABS ──────────────────────────────────────────────── */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 22px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.tab-btn:hover { color: var(--blue-600); background: rgba(59,130,246,0.04); }

.tab-btn.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-500);
  background: white;
}

.tab-badge {
  background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── TAB CONTENT ───────────────────────────────────────── */
.tab-content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  min-height: 400px;
}

.form-col {
  padding: 32px;
  border-right: 1px solid var(--gray-100);
}

.status-col {
  padding: 32px;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── FORM ELEMENTS ─────────────────────────────────────── */
.field-group {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.optional {
  font-weight: 400;
  color: var(--gray-400);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: white;
  transition: all var(--transition);
  outline: none;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: white;
}

.field-input::placeholder { color: var(--gray-400); }

.field-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.code-editor {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 120px;
  color: var(--gray-700);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 5px;
  line-height: 1.5;
}

.field-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* URL Input */
.url-input-wrap { position: relative; }
.url-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--blue-400);
  font-size: 1.1rem;
  pointer-events: none;
}
.url-input { padding-left: 36px; }

/* Filename wrap */
.filename-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: all var(--transition);
}
.filename-wrap:focus-within {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.filename-wrap .field-input {
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
}
.filename-wrap .field-input:focus { box-shadow: none; }
.filename-ext {
  padding: 0 14px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 0.88rem;
  font-weight: 600;
  border-left: 1.5px solid var(--gray-200);
  height: 100%;
  display: flex;
  align-items: center;
}

/* Settings grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* Margins grid */
.margins-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.margin-field { font-size: 0.82rem; }

/* Toggles */
.toggles-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-700);
  user-select: none;
}

.toggle-label input { display: none; }

.toggle-switch {
  width: 38px; height: 22px;
  border-radius: 100px;
  background: var(--gray-200);
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  top: 3px; left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-switch {
  background: var(--blue-500);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* ─── DROPZONE ──────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--blue-200);
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 16px;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--blue-400);
  background: rgba(59,130,246,0.06);
}

.dropzone-inner {
  padding: 40px 20px;
  text-align: center;
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--blue-400);
  margin-bottom: 12px;
  line-height: 1;
}

.dropzone-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.dropzone-sub { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 8px; }
.dropzone-types { font-size: 0.78rem; color: var(--gray-400); }

/* File info card */
.file-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.file-info-icon { font-size: 1.8rem; color: var(--blue-500); }

.file-info-details { flex: 1; min-width: 0; }

.file-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size { font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }

.file-remove-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.file-remove-btn:hover { background: var(--error-light); color: var(--error); }

/* ASPX notice */
.aspx-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--warning-light);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.aspx-notice i { color: var(--warning); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.aspx-notice strong { display: block; color: var(--gray-800); margin-bottom: 3px; }
.aspx-notice p { color: var(--gray-600); line-height: 1.5; }

/* File action row */
.file-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

/* ─── ASPX ANALYSIS CARD ─────────────────────────────────── */
.aspx-analysis-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-top: 16px;
}

.analysis-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-header.compatible { background: var(--success-light); color: #065f46; }
.analysis-header.partial { background: var(--warning-light); color: #92400e; }
.analysis-header.incompatible { background: var(--error-light); color: #991b1b; }

.analysis-body { padding: 20px; }

.analysis-summary { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 16px; line-height: 1.6; }

.analysis-deps h5 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.dep-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.dep-item {
  font-size: 0.82rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dep-item i { color: var(--warning); }

.fallback-options h5 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.fallback-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.fallback-btn:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
}

.fallback-btn strong { display: block; font-size: 0.88rem; color: var(--gray-800); margin-bottom: 2px; }
.fallback-btn p { font-size: 0.78rem; color: var(--gray-500); line-height: 1.4; }

/* ─── PROGRESS / STATUS AREA ────────────────────────────── */
.job-status-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.status-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-card-body { padding: 20px; }

.stage-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-600);
  margin-bottom: 8px;
}

.progress-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--sky-500));
  border-radius: 100px;
  transition: width 0.4s ease;
  position: relative;
  overflow: hidden;
}

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

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

.progress-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-600);
}

.status-message {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

.cancel-btn-row {
  display: flex;
  justify-content: center;
}

.btn-cancel {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-cancel:hover { background: var(--error-light); border-color: var(--error); color: var(--error); }

/* Status spinner */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--blue-100);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ─── SUCCESS CARD ──────────────────────────────────────── */
.success-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--success);
  box-shadow: 0 4px 20px rgba(16,185,129,0.12);
  overflow: hidden;
  animation: slideIn 0.4s ease;
}

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

.success-header {
  background: var(--success-light);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-icon { font-size: 1.4rem; color: var(--success); }
.success-title { font-weight: 700; color: #065f46; }

.success-body { padding: 20px; }

.file-meta {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.file-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--gray-600);
  padding: 3px 0;
}

.file-meta-row strong { color: var(--gray-800); }

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(16,185,129,0.3);
}

.download-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 6px 20px rgba(16,185,129,0.4);
  transform: translateY(-1px);
}

.convert-another-btn {
  width: 100%;
  text-align: center;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}

.convert-another-btn:hover { background: var(--gray-50); color: var(--gray-800); }

/* ─── ERROR CARD ────────────────────────────────────────── */
.error-card {
  background: var(--error-light);
  border: 1.5px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: slideIn 0.3s ease;
}

.error-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.error-card-msg { font-size: 0.85rem; color: #7f1d1d; line-height: 1.5; margin-bottom: 12px; }

/* ─── CANCELLED CARD ────────────────────────────────────── */
.cancelled-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.cancelled-card i { font-size: 2rem; color: var(--gray-400); margin-bottom: 8px; }
.cancelled-card p { font-size: 0.85rem; color: var(--gray-500); }

/* ─── ESC HINT ──────────────────────────────────────────── */
.esc-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

kbd {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-700);
}

/* ─── PAID GATE ─────────────────────────────────────────── */
.paid-gate {
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gate-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border: 2px solid var(--blue-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--blue-500);
  margin-bottom: 8px;
}

.paid-gate h3 { font-size: 1.3rem; color: var(--gray-800); }
.paid-gate p { color: var(--gray-500); max-width: 440px; font-size: 0.9rem; line-height: 1.6; }

.gate-sub { font-size: 0.82rem; color: var(--gray-500); }
.gate-sub a { color: var(--blue-600); font-weight: 600; }

/* ─── BATCH TOOL ────────────────────────────────────────── */
.batch-input-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
  gap: 0;
}

.batch-input-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.batch-input-tab.active { color: var(--blue-600); border-bottom-color: var(--blue-500); }
.batch-input-panel { display: none; }
.batch-input-panel.active { display: block; }

/* Batch queue */
.batch-queue {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.batch-queue-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gray-50);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}

.batch-queue-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.84rem;
  align-items: center;
}

.batch-queue-item .item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gray-700);
}

.batch-queue-item .item-type {
  color: var(--gray-400);
  font-size: 0.78rem;
}

.batch-item-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.item-status-pending { background: var(--gray-100); color: var(--gray-500); }
.item-status-running { background: var(--blue-100); color: var(--blue-700); }
.item-status-done { background: var(--success-light); color: #065f46; }
.item-status-error { background: var(--error-light); color: #991b1b; }

/* ─── SECTION STYLES ────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── HOW IT WORKS ──────────────────────────────────────── */
.how-section {
  padding: 80px 0;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  position: relative;
  transition: all var(--transition-slow);
}

.step-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
  background: white;
}

.step-num {
  font-size: 4rem;
  font-weight: 900;
  color: var(--blue-100);
  line-height: 1;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.step-icon {
  font-size: 2rem;
  color: var(--blue-500);
  margin-bottom: 16px;
}

.step-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-800); margin-bottom: 10px; }
.step-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; }

/* ─── TYPES ─────────────────────────────────────────────── */
.types-section {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--blue-50), white);
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.type-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--blue-100);
  padding: 28px 24px;
  transition: all var(--transition-slow);
}

.type-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-blue);
  transform: translateY(-3px);
}

.type-card i {
  font-size: 2rem;
  color: var(--blue-500);
  margin-bottom: 14px;
  display: block;
}

.type-card h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.type-card p { font-size: 0.84rem; color: var(--gray-500); line-height: 1.6; }

.badge-sm {
  background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
  color: white;
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* ─── WHY SECTION ───────────────────────────────────────── */
.why-section {
  padding: 80px 0;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.why-item:hover { border-color: var(--blue-200); background: var(--blue-50); }

.why-item > i {
  font-size: 1.6rem;
  color: var(--blue-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.why-item h4 { font-size: 0.95rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.why-item p { font-size: 0.84rem; color: var(--gray-500); line-height: 1.6; }

/* ─── UPGRADE SECTION ───────────────────────────────────── */
.upgrade-section {
  padding: 80px 0;
  background: linear-gradient(160deg, #eff6ff, #f0f9ff, #ecfdf5);
}

.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 780px;
  margin: 0 auto;
}

.upgrade-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.paid-card {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-blue);
}

.plan-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.plan-badge.free { background: var(--gray-100); color: var(--gray-600); }
.plan-badge.paid { background: linear-gradient(135deg, var(--blue-500), var(--sky-500)); color: white; }

.upgrade-card h3 { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 24px; }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--gray-700);
}

.plan-features li i { font-size: 1rem; }
.plan-features .bi-check-circle-fill { color: var(--success); }
.plan-features .neg { color: var(--gray-300); }
.plan-features .neg ~ span { color: var(--gray-400); }

.plan-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

/* ─── FAQ ───────────────────────────────────────────────── */
.faq-section {
  padding: 80px 0;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover { border-color: var(--blue-200); }

.faq-item summary {
  padding: 18px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--blue-500);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 24px 20px;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ─── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  padding: 40px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.footer-brand .brand-icon {
  background: linear-gradient(135deg, var(--blue-500), var(--sky-500));
}

.footer-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  padding: 5px 12px;
  color: var(--gray-400);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.footer-nav a:hover { color: white; background: rgba(255,255,255,0.08); }

.footer-copy {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  width: 100%;
}

.footer-copy p {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.8;
}

.footer-copy strong { color: var(--gray-400); }

/* ─── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideIn 0.3s ease;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--gray-100);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: all var(--transition);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-icon { font-size: 2.5rem; color: var(--blue-500); margin-bottom: 12px; }
.modal-box h3 { font-size: 1.2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.modal-box p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 20px; line-height: 1.6; }

.modal-err { color: var(--error); font-size: 0.82rem; margin-top: 8px; }

/* ─── CONFETTI OVERLAY ──────────────────────────────────── */
.confetti-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
}

#confettiCanvas { width: 100%; height: 100%; }

/* ─── BATCH PROGRESS ────────────────────────────────────── */
.batch-progress-area {
  margin-bottom: 16px;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-content-grid { grid-template-columns: 1fr; }
  .status-col { border-right: none; border-top: 1px solid var(--gray-100); }
  .form-col { border-right: none; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-illustration { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .margins-grid { grid-template-columns: 1fr 1fr; }
  .file-action-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 16px; }

  .form-col, .status-col { padding: 20px 16px; }

  .tab-btn { padding: 12px 14px; font-size: 0.82rem; }

  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 2rem; }

  .paid-gate { padding: 40px 20px; }

  .batch-queue-header, .batch-queue-item {
    grid-template-columns: 1fr auto;
  }
  .batch-queue-header span:nth-child(2),
  .batch-queue-item .item-type { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .tool-card { border-radius: var(--radius-lg); }
  .tabs-nav { gap: 0; }
  .tab-btn { padding: 12px 10px; }
  .plan-indicator { flex-direction: column; align-items: flex-start; }
  .plan-upgrade-link { margin-left: 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; justify-content: center; }
}

/* ─── Accessibility ─────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
