:root {
  --bg: #07090f;
  --surface: rgba(19, 24, 38, 0.86);
  --surface-solid: #131826;
  --surface-2: rgba(28, 35, 54, 0.85);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #06b6d4;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-2: #f1f5f9;
  --border: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background 0.25s, color 0.25s;
}

/* Ambient Background Glows */
.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
}

.bg-glow-2 {
  top: 120px;
  right: -160px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px;
}

.hidden {
  display: none !important;
}

/* Navbar */
.vf-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .vf-nav {
  background: rgba(255, 255, 255, 0.82);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.badge-auto {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid rgba(6, 182, 212, 0.3);
  vertical-align: middle;
  letter-spacing: 0.06em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.icon-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: 54px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #06b6d4, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-subtitle code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--accent-2);
}

/* Fetch Card */
.fetch-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.url-bar {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 6px 8px 6px 14px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.url-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.url-icon {
  color: var(--accent-2);
  font-size: 1.15rem;
}

#urlInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  min-width: 0;
  padding: 9px 0;
}

#batchInput {
  width: 100%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

#batchInput:focus {
  border-color: var(--accent);
}

.paste-btn, .clear-btn {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.paste-btn:hover, .clear-btn:hover {
  border-color: var(--accent);
}

/* Controls Row */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.quality-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Toggle Switch */
.auto-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.auto-switch input {
  display: none;
}

.slider {
  width: 42px;
  height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}

.slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}

.auto-switch input:checked + .slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.auto-switch input:checked + .slider::after {
  transform: translateX(18px);
  background: var(--accent-2);
}

.switch-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}

.btn-primary, .btn-secondary {
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, filter 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust-strip i {
  color: var(--accent-2);
}

/* Platforms Strip */
.platforms-section {
  padding: 18px 0 34px;
  text-align: center;
}

.platforms-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.p-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Jobs Container */
.jobs-container {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
}

.job-thumb {
  width: 96px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.5rem;
}

.job-body {
  flex: 1;
  min-width: 0;
}

.job-title {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.job-status {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.job-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dl-btn {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Inspect Container */
.inspect-container {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  text-align: left;
}

.inspect-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.format-list {
  display: grid;
  gap: 8px;
}

.format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.format-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

/* History */
.history-section {
  margin-top: 28px;
  text-align: left;
}

.section-header-sm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

/* Features & FAQ */
.features-section, .faq-section {
  padding: 44px 0;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 28px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.icon-purple {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.icon-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.icon-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-item p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.vf-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }
  .job-card {
    flex-direction: column;
    align-items: stretch;
  }
  .job-thumb {
    width: 100%;
    height: 140px;
  }
  .nav-link {
    display: none;
  }
}
