/* ============================================
   PRIVEX DOWNLOADER — Premium CSS
   Apple-Style Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ─── */
:root {
  --accent-1: #A855F7;
  --accent-2: #6366F1;
  --accent-3: #06B6D4;
  --accent-gradient: linear-gradient(135deg, #A855F7, #6366F1, #06B6D4);
  --accent-gradient-hover: linear-gradient(135deg, #9333EA, #4F46E5, #0891B2);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.2);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ─── Dark Mode ─── */
.dark-mode {
  --bg-primary: #0A0A0F;
  --bg-secondary: #111118;
  --bg-tertiary: #1A1A26;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(16, 16, 28, 0.85);
  --bg-nav: rgba(10, 10, 15, 0.8);

  --text-primary: #F8F8FF;
  --text-secondary: rgba(248, 248, 255, 0.65);
  --text-muted: rgba(248, 248, 255, 0.38);
  --text-accent: #A855F7;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  --orb-1: rgba(168, 85, 247, 0.15);
  --orb-2: rgba(6, 182, 212, 0.12);
  --orb-3: rgba(99, 102, 241, 0.1);
}

/* ─── Light Mode ─── */
.light-mode {
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F0F0F5;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(0, 0, 0, 0.04);
  --bg-glass: rgba(245, 245, 247, 0.9);
  --bg-nav: rgba(245, 245, 247, 0.85);

  --text-primary: #1D1D1F;
  --text-secondary: rgba(29, 29, 31, 0.65);
  --text-muted: rgba(29, 29, 31, 0.4);
  --text-accent: #7C3AED;

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.15);

  --orb-1: rgba(168, 85, 247, 0.08);
  --orb-2: rgba(6, 182, 212, 0.07);
  --orb-3: rgba(99, 102, 241, 0.06);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Ambient Background ─── */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--orb-1);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--orb-2);
  bottom: 20%;
  left: -150px;
  animation-delay: -3s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--orb-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: var(--bg-nav);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-accent {
  font-weight: 400;
  color: var(--text-secondary);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: scale(1.05);
}

.theme-icon {
  position: absolute;
  font-size: 18px;
  transition: all var(--transition);
}

.dark-mode .theme-icon.sun { opacity: 0; transform: rotate(-90deg) scale(0); }
.dark-mode .theme-icon.moon { opacity: 1; transform: rotate(0) scale(1); }
.light-mode .theme-icon.sun { opacity: 1; transform: rotate(0) scale(1); }
.light-mode .theme-icon.moon { opacity: 0; transform: rotate(90deg) scale(0); }

/* ─── Hero Section ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
}

.hero-content {
  max-width: 780px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  animation: fadeInDown 0.6s ease both;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.6); }
  50% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.9); }
}

.hero-title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text-primary);
  animation: fadeInUp 0.7s ease 0.1s both;
}

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

.hero-subtitle {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

/* ─── Download Card ─── */
.download-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border-subtle) inset;
  animation: fadeInUp 0.7s ease 0.3s both;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

/* ─── Platform Tabs ─── */
.platform-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.platform-tabs::-webkit-scrollbar { display: none; }

.platform-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
  opacity: 0.45;
  filter: grayscale(100%);
  user-select: none;
}

.platform-tab:hover {
  border-color: var(--border-strong);
}

.platform-tab.active {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.04);
}

.platform-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── Input Group ─── */
.input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  z-index: 1;
}

.url-input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
  direction: ltr;
}

.url-input::placeholder {
  color: var(--text-muted);
  direction: rtl;
  text-align: right;
}

.url-input:focus {
  border-color: var(--accent-1);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1), 0 0 20px rgba(168, 85, 247, 0.08);
}

.paste-btn {
  position: absolute;
  left: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  border-radius: var(--radius-sm);
}

.paste-btn:hover { color: var(--accent-1); }
.paste-btn svg { width: 16px; height: 16px; }

.download-btn {
  height: 54px;
  padding: 0 24px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.download-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition);
}

.download-btn:hover::before {
  background: rgba(255, 255, 255, 0.1);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.45);
}

.download-btn:active { transform: translateY(0); }

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ─── Quick Examples ─── */
.quick-examples {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.examples-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.example-chip {
  padding: 4px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.example-chip:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.35);
  color: var(--accent-1);
  transform: scale(1.03);
}

/* ─── Loading Card ─── */
.loading-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(24px);
  animation: fadeInUp 0.4s ease;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  animation: rotate 1.2s linear infinite;
}

.spinner-svg {
  width: 56px;
  height: 56px;
}

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

.loading-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.loading-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ─── Result Card ─── */
.result-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(24px);
  animation: fadeInUp 0.5s var(--spring);
  box-shadow: var(--shadow-card);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.result-platform-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.result-type-tag {
  padding: 3px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-muted);
}

.result-content {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.result-thumbnail-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.result-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.result-thumbnail-wrap:hover .thumbnail-overlay { opacity: 1; }

.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-author {
  font-size: 13px;
  color: var(--text-secondary);
}

.result-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Quality Section ─── */
.quality-section {
  margin-bottom: 20px;
}

.quality-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: right;
}

.quality-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quality-btn {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
}

.quality-btn small {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.7;
}

.quality-btn.selected {
  background: rgba(168, 85, 247, 0.12);
  border-color: var(--accent-1);
  color: var(--accent-1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.quality-btn:hover:not(.selected) {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ─── Action Buttons ─── */
.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 120px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--transition);
  text-decoration: none;
}

.action-btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.45);
}

.action-btn-secondary {
  background: var(--bg-input);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
}

.action-btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ─── Error Card ─── */
.error-card {
  width: 100%;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-xl);
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.4s ease;
}

.error-icon { font-size: 40px; }
.error-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.error-msg { font-size: 14px; color: var(--text-secondary); }

.retry-btn {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.retry-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* ─── Sections ─── */
.features-section,
.platforms-section,
.howto-section,
.faq-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
}

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: right;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
  cursor: default;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all var(--spring);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Platforms ─── */
.platforms-scroll {
  overflow: hidden;
  position: relative;
}

.platforms-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  flex-wrap: wrap;
}
.platforms-track::-webkit-scrollbar { display: none; }

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-width: 130px;
  transition: all var(--transition);
  cursor: default;
  backdrop-filter: blur(12px);
}

.platform-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.platform-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--spring);
}

.platform-card:hover .platform-logo {
  transform: scale(1.1);
}

.instagram-grad { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.facebook-grad { background: #1877F2; }
.tiktok-grad { background: linear-gradient(135deg, #010101, #FF0050, #69C9D0); }
.twitter-grad { background: #000; }
.youtube-grad { background: #FF0000; }
.snapchat-grad { background: #FFFC00; }
.pinterest-grad { background: #E60023; }

.platform-card span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.platform-card small {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── How It Works ─── */
.steps-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 220px;
  text-align: center;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
}

.step-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: var(--border-medium);
  position: relative;
  margin: 0 16px;
  flex-shrink: 0;
}

.step-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent-1);
  border-right: 2px solid var(--accent-1);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ─── FAQ ─── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}

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

.faq-question {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  text-align: right;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--accent-1); }

.faq-arrow {
  font-size: 22px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.open .faq-arrow {
  transform: rotate(90deg);
  color: var(--accent-1);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: right;
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 24px;
  background: var(--bg-nav);
  backdrop-filter: blur(24px);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-disclaimer {
  font-size: 12px !important;
  opacity: 0.6;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Intersection Observer Animations ─── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Scrollbar Styling ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-1);
}

/* ─── Selection ─── */
::selection {
  background: rgba(168, 85, 247, 0.25);
  color: var(--text-primary);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .input-group {
    flex-direction: column;
  }

  .download-btn {
    height: 48px;
    width: 100%;
    justify-content: center;
  }

  .steps-container {
    flex-direction: column;
    gap: 24px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .step-connector::after {
    transform: translate(-50%, -50%) rotate(135deg);
  }

  .platform-tabs {
    justify-content: flex-start;
  }

  .result-content {
    flex-direction: column;
  }

  .result-thumbnail-wrap {
    width: 100%;
    height: 200px;
  }

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

  .result-stats {
    justify-content: center;
  }

  .quality-options {
    justify-content: center;
  }
}

/* ─── Platform Color Themes on active tab ─── */
.platform-tab[data-platform="instagram"].active {
  background: rgba(221, 42, 123, 0.08);
  border-color: rgba(221, 42, 123, 0.35);
  color: #DD2A7B;
  box-shadow: 0 0 12px rgba(221, 42, 123, 0.12);
}

.platform-tab[data-platform="facebook"].active {
  background: rgba(24, 119, 242, 0.08);
  border-color: rgba(24, 119, 242, 0.35);
  color: #1877F2;
  box-shadow: 0 0 12px rgba(24, 119, 242, 0.12);
}

.platform-tab[data-platform="tiktok"].active {
  background: rgba(255, 0, 80, 0.08);
  border-color: rgba(255, 0, 80, 0.35);
  color: #FF0050;
  box-shadow: 0 0 12px rgba(255, 0, 80, 0.12);
}

.platform-tab[data-platform="twitter"].active {
  background: rgba(29, 161, 242, 0.08);
  border-color: rgba(29, 161, 242, 0.35);
  color: #1DA1F2;
  box-shadow: 0 0 12px rgba(29, 161, 242, 0.12);
}

.platform-tab[data-platform="youtube"].active {
  background: rgba(255, 0, 0, 0.08);
  border-color: rgba(255, 0, 0, 0.35);
  color: #FF0000;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.12);
}

/* ─── Download Progress ─── */
.progress-wrap {
  width: 100%;
  height: 4px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.4s var(--spring);
  white-space: nowrap;
}

.toast.success { border-color: rgba(34, 197, 94, 0.3); }
.toast.error { border-color: rgba(239, 68, 68, 0.3); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(16px) scale(0.92); }
}

/* ─── Caption Section ─── */
.caption-section {
  margin-top: 18px;
  margin-bottom: 24px;
  animation: fadeInUp 0.5s ease both;
  width: 100%;
}

.caption-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: right;
  letter-spacing: -0.2px;
}

.caption-container {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.caption-text-box {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  text-align: right;
  white-space: pre-wrap;
  max-height: 130px;
  overflow-y: auto;
  padding-left: 8px;
  scrollbar-width: thin;
}

.caption-text-box::-webkit-scrollbar {
  width: 4px;
}
.caption-text-box::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.copy-caption-btn {
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  font-family: inherit;
}

.copy-caption-btn:hover {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.copy-caption-btn.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* ─── Gallery Section ─── */
.gallery-section {
  margin-top: 18px;
  margin-bottom: 24px;
  animation: fadeInUp 0.5s ease both;
  width: 100%;
}

.gallery-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: right;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  justify-content: center;
}

.gallery-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.gallery-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.gallery-item-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
}

.gallery-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  color: white;
  backdrop-filter: blur(8px);
}

.gallery-item-badge.video {
  background: rgba(221, 42, 123, 0.85);
}

.gallery-item-badge.image {
  background: rgba(6, 182, 212, 0.85);
}

.gallery-item-actions {
  padding: 8px;
  display: flex;
}

.gallery-download-btn {
  width: 100%;
  padding: 8px 4px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gallery-download-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.25);
}
