/* ═══════════════════════════════════════════════════════════════
   IG-DOWN — style.css
   Authentic, High-Trust Consumer Utility Design
   Modern, Clean, Fast & Realistic (FastDl / SnapInsta Quality)
═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ────────────────────────────────────────── */
:root {
  --bg-page:       #f8fafc;
  --bg-card:       #ffffff;
  --bg-card-subtle:#f1f5f9;
  
  --border-subtle: #e2e8f0;
  --border-focus:  #6366f1;
  --border-card:   #e2e8f0;
  
  --text-main:     #0f172a;
  --text-body:     #334155;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  
  --brand-primary: #4f46e5;
  --brand-purple:  #7c3aed;
  --brand-pink:    #ec4899;
  --brand-orange:  #ea580c;
  --brand-emerald: #10b981;
  
  --grad-btn:      linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  --grad-btn-hover:linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6d28d9 100%);
  --grad-accent:   linear-gradient(135deg, #f59e0b, #ec4899, #7c3aed);
  
  --shadow-sm:     0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:     0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:     0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-input:  0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
  --shadow-btn:    0 4px 14px rgba(79, 70, 229, 0.35);
  --shadow-btn-h:  0 6px 20px rgba(79, 70, 229, 0.45);
  
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-full:   9999px;
  
  --transition:    all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-body);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── 3. Layout Container ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 4. Clean Header ─────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

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

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

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

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

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.2px;
}

/* ── 5. Hero Section (Clean & Realistic Utility) ─────────────── */
.hero-section {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.18;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 640px;
  line-height: 1.6;
}

/* ── 6. Input Card (High Conversion & Ergonomic) ─────────────── */
.input-card {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-input);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.input-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), var(--shadow-input);
}

.input-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  min-width: 0;
}

.input-icon-wrap {
  color: var(--text-light);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.input-card:focus-within .input-icon-wrap {
  color: var(--brand-primary);
}

.url-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  min-width: 0;
  font-weight: 500;
}

.url-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.clear-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

/* Fast Clipboard Paste Button */
.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.paste-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: var(--brand-primary);
}

.paste-btn:active {
  transform: scale(0.97);
}

.paste-btn.pasted {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* Download CTA Button */
.btn-download-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad-btn);
  box-shadow: var(--shadow-btn);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-download-main:hover {
  background: var(--grad-btn-hover);
  box-shadow: var(--shadow-btn-h);
  transform: translateY(-1px);
}

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

.btn-download-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── 7. Trust Bar & Format Pills ─────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

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

.trust-item strong {
  color: var(--text-main);
  font-weight: 700;
}

.trust-sep {
  color: #cbd5e1;
}

.format-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.chip {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* ── 8. Result Section ───────────────────────────────────────── */
.result-section {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

.result-section:not([data-state]) {
  display: none;
}

.result-card {
  display: none;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  width: 100%;
  flex-direction: column;
  gap: 20px;
}

.result-section[data-state="loading"] .loading-card { display: flex; }
.result-section[data-state="error"]   .error-card   { display: flex; }
.result-section[data-state="success"] .success-card { display: flex; }

/* Loading State */
.loading-card {
  align-items: center;
  text-align: center;
  padding: 40px 24px;
}

.spinner-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
}

.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3.5px solid #e2e8f0;
  border-top-color: var(--brand-primary);
  animation: spin 0.8s linear infinite;
}

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

.result-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.result-sublabel {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Error State */
.error-card {
  align-items: center;
  text-align: center;
  border-color: #fecaca;
  background: #fffafa;
  padding: 32px 24px;
}

.error-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  margin-bottom: 10px;
}

.error-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #991b1b;
}

.error-msg {
  font-size: 0.92rem;
  color: var(--text-body);
  max-width: 440px;
  line-height: 1.6;
}

.btn-retry {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  margin-top: 8px;
  transition: var(--transition);
}

.btn-retry:hover {
  background: #f1f5f9;
}

/* Success State */
.success-card {
  gap: 20px;
}

.media-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.media-preview video,
.media-preview img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.media-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
}

.badge-video {
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}

.badge-image {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.badge-carousel {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.media-owner {
  font-size: 0.92rem;
  color: var(--text-body);
}

.media-owner a {
  color: var(--brand-primary);
  font-weight: 700;
}

.media-caption {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-dl {
  flex: 1;
  min-width: 180px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad-btn);
  box-shadow: var(--shadow-btn);
  text-decoration: none;
  transition: var(--transition);
}

.btn-dl:hover {
  background: var(--grad-btn-hover);
  box-shadow: var(--shadow-btn-h);
  transform: translateY(-1px);
}

#dlThumb.btn-dl {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  box-shadow: var(--shadow-sm);
}

#dlThumb.btn-dl:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-view {
  padding: 12px 20px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-view:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* ── 9. Carousel Grid & Cards ────────────────────────────────── */
.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
}

.carousel-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.carousel-media-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-media-wrap video,
.carousel-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 10. Steps / How It Works ────────────────────────────────── */
.steps-section {
  padding: 64px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.step-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}

.step-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}

.step-icon {
  font-size: 2rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-card p {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ── 11. Feature Highlights ──────────────────────────────────── */
.features-section {
  padding: 64px 0;
  background: var(--bg-page);
}

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

.feature-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #eef2ff;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.feature-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* ── 12. Comparison Table (High Trust & Conversion) ──────────── */
.comparison-section {
  padding: 64px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 24px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #ffffff;
}

.comparison-table th {
  background: #f8fafc;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  border-bottom: 1.5px solid var(--border-subtle);
}

.comparison-table th.highlight {
  background: #eef2ff;
  color: var(--brand-primary);
}

.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-body);
}

.comparison-table td.highlight {
  background: rgba(99, 102, 241, 0.03);
  font-weight: 700;
  color: #10b981;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* ── 13. Exhaustive SEO Article Content ──────────────────────── */
.seo-content-section {
  padding: 64px 0;
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
}

.seo-content-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow-sm);
}

.seo-content-card h2 {
  font-size: 1.55rem;
  margin: 32px 0 14px;
  color: var(--text-main);
}

.seo-content-card h2:first-of-type {
  margin-top: 0;
}

.seo-content-card h3 {
  font-size: 1.2rem;
  margin: 24px 0 10px;
  color: var(--text-main);
}

.seo-content-card p {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 16px;
}

.seo-content-card ul, .seo-content-card ol {
  margin: 12px 0 20px 24px;
  color: var(--text-body);
}

.seo-content-card li {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.seo-callout {
  background: #f8fafc;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.seo-callout strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.seo-callout p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ── 14. Related Tools ───────────────────────────────────────── */
.related-section {
  padding: 56px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.related-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-icon {
  font-size: 1.6rem;
}

.related-card strong {
  font-size: 0.94rem;
  font-weight: 700;
}

.related-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.related-arrow {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--brand-primary);
  font-weight: 700;
}

/* ── 15. Clean FAQ Accordion ─────────────────────────────────── */
.faq-section {
  padding: 64px 0;
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
}

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

.faq-item {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-item:hover, .faq-item.open {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--brand-primary);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 22px 20px;
}

/* ── 16. Professional Footer ─────────────────────────────────── */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 0;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-grid {
  display: flex;
  gap: 56px;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

.footer-links-group strong {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-links-group a {
  font-size: 0.88rem;
  color: var(--text-body);
  transition: color 0.15s;
}

.footer-links-group a:hover {
  color: var(--brand-primary);
}

.footer-disclaimer {
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom-links a:hover {
  color: var(--brand-primary);
}

/* ── 17. Confetti Canvas (UX Success) ────────────────────────── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease;
}

/* ── 18. Mobile & Tablet Responsiveness ──────────────────────── */
@media (max-width: 860px) {
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-links-grid { gap: 32px; }
}

@media (max-width: 640px) {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .header-inner { height: 58px; }
  .logo-img { height: 38px; }
  .free-badge { padding: 4px 10px; font-size: 0.72rem; }

  .hero-section { padding: 26px 0 22px; }
  .hero-inner { gap: 14px; }
  .hero-title { font-size: clamp(1.75rem, 6.5vw, 2.3rem); line-height: 1.2; }
  .hero-desc { font-size: 0.92rem; }

  .input-card {
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    padding: 6px;
    gap: 6px;
  }

  .input-row {
    padding: 6px 10px;
    gap: 8px;
  }

  /* Prevent iOS zoom */
  .url-input {
    font-size: 16px !important;
  }

  .btn-download-main {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .trust-bar { font-size: 0.76rem; gap: 8px; }
  .trust-sep { display: none; }
  .trust-item { background: #ffffff; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-subtle); }

  .result-section { padding: 20px 0; }
  .result-card { padding: 20px 16px; border-radius: 14px; }
  .media-actions { flex-direction: column; }
  .btn-dl, .btn-view { width: 100%; min-height: 48px; }

  .steps-section { padding: 44px 0 36px; }
  .features-section { padding: 44px 0 36px; }
  .comparison-section { padding: 44px 0 36px; }
  .seo-content-section { padding: 44px 0 36px; }
  .seo-content-card { padding: 24px 18px; }
  .faq-section { padding: 44px 0 36px; }
  .related-section { padding: 40px 0 32px; }

  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .related-card { padding: 14px 12px; }

  .footer-top { flex-direction: column; gap: 28px; }
  .footer-links-grid { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; padding-bottom: max(20px, calc(14px + env(safe-area-inset-bottom))); }
}

@media (max-width: 380px) {
  .logo-img { height: 32px; }
  .hero-title { font-size: 1.6rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: 1fr; }
}