/* ==========================================================================
   HDGrab.com - Clean SaaS Design System (Inspired by SaveThisX)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Clean Canvas Palette */
  --bg-main: #f8fafc;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark: #0b0f19;
  --bg-dark-card: #131b2e;

  /* Borders */
  --border-light: #e2e8f0;
  --border-focus: #0284c7;
  --border-subtle: #f1f5f9;
  --border-dark: #1e293b;

  /* Brand Accents */
  --color-primary: #0f172a;        /* Sleek black/dark slate */
  --color-primary-hover: #1e293b;
  --color-blue: #0284c7;           /* Sky blue for badges & highlights */
  --color-blue-bg: #e0f2fe;
  --color-blue-dark: #0369a1;
  --color-live: #ef4444;           /* Pulsing live red */
  --color-kick: #10b981;           /* Kick green */
  --color-kick-dark: #059669;

  /* Typography */
  --text-title: #0f172a;
  --text-body: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-box: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --tr-fast: 0.18s ease;
  --tr-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header & Navbar (Sleek Segmented SaaS)
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.5px;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.brand-x {
  color: #0284c7;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

.nav-item {
  color: #64748b;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-item:hover {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-item.active {
  background: #0f172a;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  border-bottom: none !important;
}

.nav-item.active .nav-item-badge {
  background: #ef4444;
  color: #ffffff;
}

.nav-item-badge {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 48px 0 32px;
  text-align: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-blue-bg);
  color: var(--color-blue-dark);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-blue);
  box-shadow: 0 0 8px var(--color-blue);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -1px;
  line-height: 1.18;
  margin-bottom: 14px;
}

.hero-p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 34px;
  line-height: 1.55;
}

/* Search Grabber Box */
.search-card {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.02);
  display: flex;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-card:focus-within {
  border-color: #0284c7;
  box-shadow: 0 20px 45px -10px rgba(2, 132, 199, 0.16), 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.02rem;
  color: #0f172a;
  background: transparent;
  padding: 13px 0;
}

.search-input::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
}

.btn-search-paste {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 10px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-search-paste:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-search-download {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 12px 26px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.btn-search-download:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

/* Quick Samples & Tip */
.samples-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.samples-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.sample-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sample-chip:hover {
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.shortcut-tip {
  max-width: 680px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 18px;
  border-radius: 9999px;
}

.shortcut-pill {
  background: #e2e8f0;
  color: #0f172a;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Ad Slots (Only display when real code is present, zero placeholder styles) */
.ad-slot-header {
  margin: 16px auto 0;
  max-width: 728px;
  text-align: center;
}
.ad-slot-header:empty, .ad-slot-under-player:empty, .modal-ad-area:empty {
  display: none !important;
}

/* ==========================================================================
   Loading & Extraction Result Card
   ========================================================================== */
.loading-box {
  display: none;
  max-width: 800px;
  margin: 32px auto;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--color-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-section {
  display: none;
  max-width: 840px;
  margin: 32px auto;
  animation: slideUp 0.35s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-result {
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-box);
}

.card-result.live-mode {
  border-color: #fca5a5;
  box-shadow: 0 14px 34px -4px rgba(239, 68, 68, 0.12);
}

.result-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.result-thumb {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  background: #f1f5f9;
}

.result-info {
  flex: 1;
}

.result-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.platform-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-title);
  letter-spacing: 0.5px;
}

.badge-live-pulse {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 6px;
  line-height: 1.35;
}

.result-author {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Live Player */
.player-container {
  display: none;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  position: relative;
  aspect-ratio: 16 / 9;
}

.live-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Download Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.btn-option {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-title);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--tr-fast);
}

.btn-option:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.btn-option.primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
}

.btn-option.primary:hover {
  background: var(--color-primary-hover);
}

.btn-option.live-btn {
  background: var(--color-live);
  color: #ffffff;
  border: none;
}

.btn-option.kick-btn {
  background: var(--color-kick);
  color: #ffffff;
  border: none;
}

.opt-badge {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

/* Live Clip Recorder Bar */
.recorder-card {
  margin-top: 18px;
  background: #fff5f5;
  border: 1px dashed #fca5a5;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.rec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #991b1b;
}

.rec-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-select {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: var(--text-title);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.btn-rec-start {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--tr-fast);
}

.btn-rec-start:hover {
  background: #dc2626;
}

/* ==========================================================================
   Section: "How our Downloader works?" (Mockup + 1 2 3 Steps)
   ========================================================================== */
.section-works {
  padding: 64px 0 40px;
  border-top: 1px solid var(--border-light);
  margin-top: 50px;
}

.section-head-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.works-card-box {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-box);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

/* Left Mockup Card */
.mockup-post-card {
  background: #000000;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.mockup-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mockup-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.mockup-name-box {
  line-height: 1.3;
}

.mockup-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.mockup-handle {
  font-size: 0.8rem;
  color: #94a3b8;
}

.mockup-post-text {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 14px;
  color: #e2e8f0;
}

.mockup-video-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.mockup-play-btn {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.6);
}

.mockup-live-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Right Steps Column */
.works-steps-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text {
  font-size: 0.95rem;
  color: var(--text-title);
  line-height: 1.5;
  font-weight: 500;
}

.example-link-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.example-link-box strong {
  color: var(--text-title);
  display: block;
  margin-bottom: 4px;
}

.notice-copyright-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: #1e40af;
  line-height: 1.5;
}

/* ==========================================================================
   Section: 3-Step Guide (01, 02, 03 Cards)
   ========================================================================== */
.section-guide {
  padding: 60px 0;
}

.guide-pill {
  display: inline-block;
  background: var(--color-blue-bg);
  color: var(--color-blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 30px;
}

@media (max-width: 860px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.guide-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  position: relative;
  transition: all 0.25s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.guide-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.guide-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.guide-card-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
}

.guide-card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.guide-card-p {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.55;
}

/* ==========================================================================
   Section: Features Grid (Pro Features)
   ========================================================================== */
.section-features {
  padding: 60px 0;
  border-top: 1px solid var(--border-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
}

/* Compatibility Bar */
.compat-bar {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

.compat-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-title);
  font-weight: 600;
}

.compat-badge {
  color: var(--color-kick-dark);
  font-weight: 700;
}

/* ==========================================================================
   Section: FAQ Accordion
   ========================================================================== */
.section-faq {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border-light);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--tr-fast);
}

.faq-question {
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-title);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-icon {
  font-size: 1.1rem;
  color: #94a3b8;
  transition: transform var(--tr-fast);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--color-blue);
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   Footer (Dark Navy / Black)
   ========================================================================== */
/* ==========================================================================
   Footer (Dark Navy / Black Modern SaaS)
   ========================================================================== */
.site-footer {
  background: #090d16;
  color: #94a3b8;
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
}

.footer-grid, .footer-top {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer-grid, .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.footer-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 360px;
  margin-bottom: 20px;
}

.footer-trust, .footer-trust-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li {
  list-style: none;
}

.footer-links a, .footer-link {
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover, .footer-link:hover {
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateX(3px);
}

.footer-lang-grid, .lang-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-pill {
  background: #1e293b;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  display: inline-block;
}

.lang-pill:hover, .lang-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #64748b;
}

.footer-bottom-links, .footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a, .footer-legal-links a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover, .footer-legal-links a:hover {
  color: #ffffff;
  text-decoration: none;
}


/* ==========================================================================
   Countdown Interstitial Modal
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalScale 0.25s ease;
}

@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: #94a3b8;
  cursor: pointer;
}

.countdown-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--color-blue);
  background: #f0f9ff;
  color: var(--color-blue);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-modal-ready {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: none;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 850px) {
  .works-card-box {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .search-card {
    flex-direction: column;
    padding: 12px;
  }
  .btn-search-download {
    width: 100%;
    justify-content: center;
  }
  .btn-search-paste {
    display: none;
  }
}

/* ==========================================================================
   SaveThisX Exact 2-Column Result Card
   ========================================================================== */
.savethisx-card {
  max-width: 820px;
  margin: 30px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 35px -5px rgba(15, 23, 42, 0.08);
  animation: slideUp 0.3s ease;
}

.savethisx-card-header {
  background: #0b1120;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.user-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #1e293b;
}

.user-text-info {
  display: flex;
  flex-direction: column;
}

.user-display-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-display-name .badge-verify {
  color: #38bdf8;
  font-size: 0.95rem;
}

.user-subline {
  color: #94a3b8;
  font-size: 0.82rem;
}

.header-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-header-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-header-pill.primary {
  background: #0284c7;
  border-color: #0284c7;
}

.btn-header-pill.primary:hover {
  background: #0369a1;
}

.savethisx-card-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
}

.card-col-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-media-box {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #0f172a;
  border: 1px solid #e2e8f0;
  aspect-ratio: 16 / 9;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-caption {
  font-size: 0.92rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.45;
}

.preview-tags {
  font-size: 0.8rem;
  color: #0284c7;
  font-weight: 600;
}

.card-col-downloads {
  display: flex;
  flex-direction: column;
}

.dl-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.dl-subheading {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 16px;
}

.dl-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.btn-tier:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.btn-tier-blue {
  background: #0284c7;
  color: #ffffff;
}

.btn-tier-blue:hover {
  background: #0369a1;
}

.btn-tier-white {
  background: #ffffff;
  border: 1.5px solid #e0f2fe;
  color: #0f172a;
}

.btn-tier-white:hover {
  background: #f8fafc;
  border-color: #0284c7;
}

.btn-tier-orange {
  background: #f59e0b;
  color: #ffffff;
}

.btn-tier-orange:hover {
  background: #d97706;
}

.btn-tier-green {
  background: #10b981;
  color: #ffffff;
}

.btn-tier-green:hover {
  background: #059669;
}

.btn-tier-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-tier-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tier-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.tier-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.tier-badge-yellow {
  background: #fef08a;
  color: #854d0e;
}

.tier-badge-dark {
  background: #1e293b;
  color: #ffffff;
}

.btn-tier-sub {
  font-size: 0.78rem;
  opacity: 0.88;
  margin-top: 2px;
}

.btn-tier-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
}

.dl-footer-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: #10b981;
  font-weight: 700;
}

@media (max-width: 768px) {
  .savethisx-card-body {
    grid-template-columns: 1fr;
  }
  .savethisx-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ==========================================================================
   HDGrab v3 additions: accessibility, states, mobile nav, legal pages
   ========================================================================== */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; background: #0f172a; color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 3000; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }

.grabber-form { display: flex; width: 100%; align-items: center; gap: 10px; }
.search-input-wrap { position: relative; }
.btn-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: #f1f5f9; color: #64748b; width: 28px; height: 28px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.btn-search-download:disabled { opacity: .6; cursor: wait; }
.btn-live { background: #ef4444; }
.btn-live:hover { background: #dc2626; }
.hero-note { text-align: center; font-size: .8rem; color: #94a3b8; margin-top: 12px; }
.hero-note a { color: inherit; }
.hero-pill-live { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.hero-pill-live .pulsing-dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.loading-title { font-weight: 700; color: var(--text-title); margin-bottom: 6px; font-size: 1.1rem; }
.loading-sub { color: var(--text-muted); font-size: .9rem; }
.error-box { max-width: 840px; margin: 24px auto; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 16px 20px; border-radius: 14px; font-size: .95rem; }
.notice-box { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 12px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 12px; }

.result-section { display: block; }
.result-section[hidden] { display: none !important; }
.player-container { display: block; margin: 0; background: #000; }
.player-container video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.preview-media-box .player-container { position: absolute; inset: 0; z-index: 5; border-radius: 0; }
.duration-badge, .live-badge { position: absolute; bottom: 10px; right: 10px; background: rgba(15,23,42,.85); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; z-index: 4; }
.live-badge { left: 10px; right: auto; top: 10px; bottom: auto; background: #ef4444; }
.tier-badge-red { background: #fee2e2; color: #b91c1c; }
.btn-tier-sub { word-break: break-word; }
.btn-tier-right { white-space: nowrap; font-weight: 800; }
.rec-sub { font-size: .8rem; color: #7f1d1d; }
.recorder-card .rec-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.ad-slot-under-player { max-width: 840px; margin: 0 auto 24px; text-align: center; overflow: hidden; }
.ad-slot-header { overflow: hidden; }

.modal-overlay { display: flex; }
.modal-overlay[hidden] { display: none !important; }

.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-answer { display: block; }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--color-blue); }

.section-guide { max-width: 820px; margin: 0 auto; padding: 48px 0 8px; }
.section-guide .section-title { text-align: left; margin-bottom: 16px; }
.section-guide p { color: var(--text-body, #334155); line-height: 1.75; margin: 0 0 14px; font-size: 1rem; }

.footer-heading { font-size: .8rem; letter-spacing: .08em; }

.legal-page { max-width: 780px; padding: 48px 20px 80px; color: #334155; line-height: 1.75; }
.legal-page h1 { font-size: 2rem; font-weight: 800; color: #0f172a; margin: 0 0 20px; }
.legal-page h2 { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 28px 0 8px; }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page a { color: #0284c7; }

.nav-toggle { display: none; background: none; border: 1px solid #e2e8f0; border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; color: #0f172a; cursor: pointer; }

@media (max-width: 1080px) {
  .navbar { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; border-radius: 16px; padding: 8px; background: #fff; box-shadow: 0 16px 40px rgba(15,23,42,.14); z-index: 1100; }
  .nav-menu.open { display: flex; }
  .nav-item { padding: 12px 14px; font-size: .95rem; }
}

@media (max-width: 600px) {
  .grabber-form { flex-wrap: wrap; }
  .search-input-wrap { flex: 1 1 100%; }
  .btn-search-paste { display: inline-flex; flex: 1; justify-content: center; }
  .btn-search-download { flex: 2; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
}

.btn-tier.is-preparing { opacity: .85; cursor: progress; }
.btn-tier.is-preparing .btn-tier-right { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   HDGrab v4 design: colourful hero, platform chips, steps, languages, RTL
   ========================================================================== */
:root { --accent: #2563eb; --accent-2: #7c3aed; --accent-soft: #eef2ff; }
.hero-tiktok { --accent: #0f172a; --accent-2: #ff0050; --accent-soft: #fff1f5; }
.hero-instagram { --accent: #c13584; --accent-2: #f77737; --accent-soft: #fff4ec; }
.hero-facebook { --accent: #1877f2; --accent-2: #3b82f6; --accent-soft: #eaf2ff; }
.hero-twitter { --accent: #0f172a; --accent-2: #475569; --accent-soft: #f1f5f9; }
.hero-youtube { --accent: #ff0000; --accent-2: #b91c1c; --accent-soft: #fff1f1; }
.hero-kick { --accent: #16a34a; --accent-2: #22c55e; --accent-soft: #effdf0; }
.hero-twitch { --accent: #9146ff; --accent-2: #6d28d9; --accent-soft: #f5efff; }
.hero-live { --accent: #ef4444; --accent-2: #f97316; --accent-soft: #fff1f0; }

body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html[lang="ar"] body { font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', Tahoma, sans-serif; }
html[lang="ar"] .hero-h1, html[lang="ar"] .section-title { letter-spacing: 0; line-height: 1.45; }

.hero-v4 {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 12% 0%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 70%),
    radial-gradient(55% 50% at 95% 10%, color-mix(in srgb, var(--accent-2) 18%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--accent-soft) 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.hero-v4 .hero-section { padding: 44px 20px 30px; }
.hero-v4 .hero-pill-badge { background: #fff; color: var(--accent); border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.hero-v4 .pulsing-dot { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.hero-v4 .hero-h1 {
  background: linear-gradient(90deg, #0f172a 0%, var(--accent) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-v4 .search-card { border: 2px solid #e2e8f0; box-shadow: 0 24px 50px -22px var(--accent), 0 2px 8px rgba(15,23,42,.04); }
.hero-v4 .search-card:focus-within { border-color: var(--accent); }
.hero-v4 .btn-search-download { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); box-shadow: 0 8px 20px -8px var(--accent); }
.hero-v4 .btn-search-download:hover { filter: brightness(1.08); }

.platform-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto 0; max-width: 760px; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #e2e8f0; color: #0f172a; font-size: .84rem; font-weight: 700;
  text-decoration: none; box-shadow: 0 1px 3px rgba(15,23,42,.05); transition: transform .15s ease, box-shadow .15s ease;
}
.platform-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(15,23,42,.25); }
.platform-chip.is-active { border-color: currentColor; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.chip-tiktok { color: #111; } .chip-tiktok .chip-dot { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.chip-instagram { color: #c13584; } .chip-instagram .chip-dot { background: linear-gradient(135deg, #feda75, #d62976 50%, #4f5bd5); }
.chip-facebook { color: #1877f2; }
.chip-x { color: #0f172a; }
.chip-youtube { color: #e11d1d; }
.chip-kick { color: #15803d; } .chip-kick .chip-dot { background: #53fc18; }
.chip-twitch { color: #9146ff; }

.hero-note { margin-top: 16px; }

/* Steps */
.steps-v4 { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-v4 { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 20px; box-shadow: 0 4px 14px -8px rgba(15,23,42,.12); }
.step-num { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); box-shadow: 0 6px 14px -6px #4f46e5; }
.step-v4:nth-child(2) .step-num { background: linear-gradient(135deg, #db2777, #f97316); box-shadow: 0 6px 14px -6px #db2777; }
.step-v4:nth-child(3) .step-num { background: linear-gradient(135deg, #059669, #22c55e); box-shadow: 0 6px 14px -6px #059669; }
.step-title { font-size: 1.02rem; font-weight: 800; color: #0f172a; margin: 2px 0 4px; }
.step-text { font-size: .9rem; color: #64748b; line-height: 1.55; margin: 0; }

/* Features: coloured icon tiles */
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; }
.feature-1 .feature-icon { background: #eef2ff; }
.feature-2 .feature-icon { background: #fff1f2; }
.feature-3 .feature-icon { background: #fff7ed; }
.feature-4 .feature-icon { background: #ecfdf5; }

.guide-pill { background: #eef2ff; color: #4338ca; }

/* Language switcher */
.nav-actions { display: flex; align-items: center; gap: 8px; order: 3; }
.navbar .nav-menu { order: 2; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px;
  border: 1px solid #e2e8f0; border-radius: 10px; font-size: .85rem; font-weight: 800; color: #0f172a; background: #fff; user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 170px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.14); z-index: 1200; }
.lang-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: #0f172a; text-decoration: none; font-size: .9rem; font-weight: 600; }
.lang-menu a:hover, .lang-menu a.current { background: #f1f5f9; }
.footer-lang-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer-lang-grid .lang-pill { text-decoration: none; }

/* RTL (Arabic) */
[dir="rtl"] .section-guide .section-title { text-align: right; }
[dir="rtl"] .btn-clear { right: auto; left: 8px; }
[dir="rtl"] .search-card { padding: 6px 18px 6px 8px; }
[dir="rtl"] .duration-badge { right: auto; left: 10px; }
[dir="rtl"] .live-badge { left: auto; right: 10px; }
[dir="rtl"] .faq-item summary, [dir="rtl"] .legal-page { text-align: right; }

@media (max-width: 860px) {
  .steps-v4 { grid-template-columns: 1fr; gap: 10px; }
  .step-v4 { padding: 14px 16px; border-radius: 14px; }
}
@media (max-width: 1080px) {
  .nav-actions { order: 2; margin-inline-start: auto; }
}
@media (max-width: 600px) {
  .hero-v4 .hero-section { padding: 26px 16px 22px; }
  .hero-v4 .hero-h1 { font-size: 1.75rem; line-height: 1.22; margin-bottom: 10px; }
  .hero-v4 .hero-p { font-size: .95rem; margin-bottom: 20px; }
  .hero-v4 .hero-pill-badge { font-size: .72rem; padding: 5px 12px; margin-bottom: 14px; }
  .platform-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 16px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
  .platform-chips::-webkit-scrollbar { display: none; }
  .platform-chip { flex: 0 0 auto; }
  .section-works { padding: 36px 0 20px; margin-top: 24px; }
  .section-title { font-size: 1.45rem; }
  .section-head-center { margin-bottom: 22px; }
  .features-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .feature-card { padding: 14px; border-radius: 14px; }
  .feature-card h3 { font-size: .92rem; }
  .feature-card p { font-size: .8rem; line-height: 1.45; }
  .feature-icon { width: 40px; height: 40px; font-size: 1.2rem; margin-bottom: 10px; }
  .section-features, .section-faq { padding: 36px 0; }
  .section-guide { padding: 30px 0 4px; }
  .section-guide p { font-size: .94rem; }
  .lang-switch summary { height: 40px; padding: 0 10px; }
  .nav-toggle { width: 40px; height: 40px; }
}

html, body { max-width: 100%; }
[dir="rtl"] .toast-container { right: auto; left: 24px; }

.platform-chip { gap: 8px; padding: 7px 14px 7px 10px; }
[dir="rtl"] .platform-chip { padding: 7px 10px 7px 14px; }
.chip-ico { flex: 0 0 auto; display: block; }
.platform-chip.is-active { box-shadow: 0 0 0 2px currentColor inset, 0 6px 14px -8px currentColor; }

@media (max-width: 600px) {
  .platform-chips { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 16px auto 0; padding: 0; gap: 7px; }
  .platform-chip { font-size: .8rem; padding: 6px 12px 6px 9px; }
}

.hero-v4 .hero-pill-badge { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-v4 .hero-pill-badge span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* Header v4: glassy, matches the hero */
.site-header { background: rgba(255,255,255,.78); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(226,232,240,.7); box-shadow: 0 6px 20px -16px rgba(15,23,42,.35); }
.brand-icon-box { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); box-shadow: 0 6px 16px -6px #6d28d9; }
.brand-x { background: linear-gradient(90deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lang-switch summary { gap: 6px; background: rgba(255,255,255,.9); }
.lang-switch summary:hover, .nav-toggle:hover { border-color: #c7d2fe; background: #fff; }
.lang-switch[open] summary { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-caret { opacity: .55; transition: transform .15s ease; }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }
.nav-toggle { background: rgba(255,255,255,.9); border-radius: 10px; }

.lang-globe { color: #4f46e5; }
.lang-code { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 6px; background: #eef2ff; color: #4338ca; font-size: .72rem; font-weight: 800; }
.lang-menu a.current .lang-code { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; }

/* FAQ v4 */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; margin: 0; }
.faq-item:hover { border-color: #c7d2fe; }
.faq-item[open] { border-color: #a5b4fc; box-shadow: 0 12px 28px -18px #4f46e5; }
.faq-item summary.faq-question { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-size: 1rem; font-weight: 700; color: #0f172a; }
.faq-q-ico { flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #4f46e5; background: #eef2ff; transition: all .2s ease; }
.faq-item:nth-child(4n+2) .faq-q-ico { color: #db2777; background: #fdf2f8; }
.faq-item:nth-child(4n+3) .faq-q-ico { color: #ea580c; background: #fff7ed; }
.faq-item:nth-child(4n+4) .faq-q-ico { color: #059669; background: #ecfdf5; }
.faq-item[open] .faq-q-ico { color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.faq-q-text { flex: 1; line-height: 1.4; }
.faq-item .faq-icon { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: #64748b; transition: transform .25s ease, background .2s ease, color .2s ease; }
.faq-item[open] .faq-icon { transform: rotate(180deg); background: #eef2ff; color: #4f46e5; }
.faq-item .faq-answer { padding: 0 18px 18px 60px; color: #475569; font-size: .95rem; line-height: 1.65; }
[dir="rtl"] .faq-item .faq-answer { padding: 0 60px 18px 18px; }
.faq-item[open] .faq-answer { animation: faqIn .25s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .faq-item summary.faq-question { padding: 14px; gap: 10px; font-size: .93rem; }
  .faq-q-ico { flex-basis: 26px; height: 26px; border-radius: 8px; font-size: .85rem; }
  .faq-item .faq-answer { padding: 0 14px 16px 50px; font-size: .9rem; }
  [dir="rtl"] .faq-item .faq-answer { padding: 0 50px 16px 14px; }
}

/* FAQ icons: solid and readable */
.faq-q-ico { flex: 0 0 32px !important; width: 32px; min-width: 32px; height: 32px !important; border-radius: 10px; font-size: 1rem !important; color: #fff !important; background: linear-gradient(135deg, #3b82f6, #6366f1) !important; box-shadow: 0 6px 14px -6px #6366f1; }
.faq-item:nth-child(4n+2) .faq-q-ico { background: linear-gradient(135deg, #ec4899, #f43f5e) !important; box-shadow: 0 6px 14px -6px #ec4899; }
.faq-item:nth-child(4n+3) .faq-q-ico { background: linear-gradient(135deg, #f97316, #f59e0b) !important; box-shadow: 0 6px 14px -6px #f97316; }
.faq-item:nth-child(4n+4) .faq-q-ico { background: linear-gradient(135deg, #10b981, #22c55e) !important; box-shadow: 0 6px 14px -6px #10b981; }
.faq-item[open] .faq-q-ico { transform: scale(1.06); }
.faq-item .faq-icon { background: #eef2ff; color: #4f46e5; }
@media (max-width: 600px) {
  .faq-q-ico { flex-basis: 30px !important; width: 30px; min-width: 30px; height: 30px !important; }
  .faq-item .faq-answer { padding-left: 54px; }
  [dir="rtl"] .faq-item .faq-answer { padding-left: 14px; padding-right: 54px; }
}

/* FAQ v5: clean, no question-mark badges */
.faq-item { position: relative; }
.faq-item::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: linear-gradient(180deg, #2563eb, #7c3aed); opacity: 0; transition: opacity .2s ease; }
.faq-item[open]::before { opacity: 1; }
.faq-item summary.faq-question { padding: 16px 18px 16px 20px; }
.faq-item .faq-icon { width: 30px; height: 30px; flex: 0 0 30px; background: #eef2ff; color: #4f46e5; transform: none !important; }
.faq-item[open] .faq-icon { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; }
.faq-plus-v { transition: opacity .2s ease; }
.faq-item[open] .faq-plus-v { opacity: 0; }
.faq-item .faq-answer, [dir="rtl"] .faq-item .faq-answer { padding: 0 20px 18px 20px !important; }
.faq-item[open] summary .faq-q-text { color: #4338ca; }

/* Related tools */
.section-related { max-width: 980px; margin: 0 auto; padding: 40px 0 8px; }
.section-related .section-title { text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 18px; }
.related-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; color: #0f172a; font-weight: 700; font-size: .92rem; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.related-card:hover { border-color: #a5b4fc; transform: translateY(-1px); box-shadow: 0 10px 22px -16px #4f46e5; }
.related-card span:nth-child(2) { flex: 1; }
.related-arrow { color: #6366f1; }
[dir="rtl"] .related-arrow { transform: scaleX(-1); }

.install-btn { display: inline-flex; align-items: center; gap: 8px; margin: 18px auto 0; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(135deg, #0f172a, #334155); box-shadow: 0 10px 22px -12px #0f172a; }
.install-btn[hidden] { display: none !important; }
