/* ============================================
   Media Downloader Suite — Shared Stylesheet
   ============================================ */

/* ----- Design Tokens ----- */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #0f0b1f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --color-tiktok: #00d2ff;
  --color-tiktok-glow: rgba(0, 210, 255, 0.2);
  --color-instagram: #dc2743;
  --color-instagram-glow: rgba(220, 39, 67, 0.2);
  --color-instagram-warm: #f09433;
  --color-purple: #a855f7;
  --color-pink: #ff6b9d;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-error-border: rgba(239, 68, 68, 0.2);
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.7);
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 850px;
  --nav-height: 56px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 70% 80%, rgba(220, 39, 67, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 210, 255, 0.03) 0%, transparent 70%),
    linear-gradient(180deg, #09090b 0%, #0f0b1f 50%, #09090b 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ----- Background Effects ----- */
.bg-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 0;
}
.bg-glow--tl {
  top: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  animation: floatA 14s infinite alternate;
}
.bg-glow--br {
  bottom: -10%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(220, 39, 67, 0.1) 0%, transparent 70%);
  animation: floatB 18s infinite alternate-reverse;
}
.bg-glow--mid {
  top: 40%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.07) 0%, transparent 70%);
  animation: floatA 20s infinite alternate-reverse;
}

/* Grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
}

/* ----- Navigation ----- */
.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 40px auto;
  position: relative;
  z-index: 100;
  padding: 0 20px;
}
.nav-bar {
  display: flex;
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5px;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar {
  display: none;
}
.nav-link {
  flex: 1 0 auto;
  text-align: center;
  padding: 10px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--color-purple), var(--color-pink));
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}
.nav-link.active-tiktok {
  background: linear-gradient(135deg, var(--color-tiktok), var(--color-purple));
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.3);
}
.nav-link.active-instagram {
  background: linear-gradient(135deg, var(--color-instagram-warm), var(--color-instagram), #cc2366);
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.3);
}

/* ----- Page Layout ----- */
.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
}
.page-wrap > main {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-container {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

/* ----- Glass Card ----- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}

/* Ambient glows behind glass-card */
.glass-card.glow-tiktok::after {
  content: '';
  position: absolute;
  top: -120px;
  left: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--color-tiktok-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.glass-card.glow-instagram::after {
  content: '';
  position: absolute;
  top: -120px;
  left: -120px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--color-instagram-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ----- Hero Section ----- */
.hero {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 10;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #ff6b9d, #a855f7, #4facfe, #00f2fe);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
.hero-title .gradient-text-tiktok {
  background: linear-gradient(135deg, #00d2ff, #a855f7, #ff6b9d, #00d2ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
.hero-title .gradient-text-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}
/* ----- Tool Cards (Hub Page) ----- */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  width: 100%;
  max-width: var(--max-width);
  position: relative;
  z-index: 10;
  margin: 0 auto 60px auto;
}
@media (min-width: 650px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tool-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}
.tool-card:hover {
  transform: translateY(-8px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-xl);
}
.tool-card--tiktok:hover {
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 210, 255, 0.1);
}
.tool-card--instagram:hover {
  border-color: rgba(220, 39, 67, 0.35);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 60px rgba(220, 39, 67, 0.1);
}

.tool-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  transition: transform var(--transition-base);
}
.tool-card:hover .tool-card__icon {
  transform: scale(1.1) rotate(5deg);
}
.tool-card--tiktok .tool-card__icon {
  background: rgba(0, 210, 255, 0.1);
  color: var(--color-tiktok);
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.08);
}
.tool-card--instagram .tool-card__icon {
  background: rgba(220, 39, 67, 0.1);
  color: #ff788f;
  box-shadow: 0 8px 20px rgba(220, 39, 67, 0.08);
}

.tool-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}
.tool-card__action {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.92rem;
  gap: 6px;
  transition: gap var(--transition-base);
}
.tool-card--tiktok .tool-card__action { color: var(--color-tiktok); }
.tool-card--instagram .tool-card__action { color: #ff788f; }
.tool-card:hover .tool-card__action { gap: 12px; }

/* ----- How It Works ----- */
.how-it-works {
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}
.how-it-works__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 36px;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 600px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  transition: all var(--transition-base);
}
.step-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--color-purple), var(--color-pink));
  color: #fff;
}
.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----- FAQ Section ----- */
.faq-section {
  width: 100%;
  max-width: 650px;
  position: relative;
  z-index: 10;
  margin-bottom: 40px;
}
.faq-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 28px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}
.faq-item:hover {
  border-color: var(--border-hover);
}
.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item .faq-answer {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ----- Form Elements ----- */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
@media (min-width: 600px) {
  .form-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .form-row .input-field {
    flex: 1;
    width: auto;
  }
}
.input-field {
  height: 54px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-base);
  width: 100%;
}
.input-field::placeholder { color: #52525b; }
.input-field:focus {
  border-color: var(--color-purple);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}
.input-field--tiktok:focus {
  border-color: var(--color-tiktok);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.12);
}
.input-field--instagram:focus {
  border-color: var(--color-instagram);
  box-shadow: 0 0 0 4px rgba(220, 39, 67, 0.12);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  width: 100%;
}
@media (min-width: 600px) {
  .btn {
    width: auto;
    white-space: nowrap;
    padding: 0 32px;
  }
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-purple), var(--color-pink));
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(168, 85, 247, 0.4);
  filter: brightness(1.08);
}

.btn-tiktok {
  background: linear-gradient(135deg, #00d2ff, var(--color-purple), #ff6b9d);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.25);
}
.btn-tiktok:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 210, 255, 0.4);
  filter: brightness(1.08);
}

.btn-instagram {
  background: linear-gradient(135deg, var(--color-instagram-warm), var(--color-instagram), #cc2366);
  color: #fff;
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.25);
}
.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(220, 39, 67, 0.4);
  filter: brightness(1.08);
}

/* Pulse ring on CTA buttons */
.btn--pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
  pointer-events: none;
}

/* Download links */
.dl-link {
  display: block;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
  transition: all var(--transition-fast);
}
.dl-link--primary {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.dl-link--primary.dl-link--tiktok {
  background: linear-gradient(135deg, #00d2ff, var(--color-purple));
}
.dl-link--primary.dl-link--instagram {
  background: linear-gradient(135deg, var(--color-instagram), #cc2366);
}
.dl-link--primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.dl-link--secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.dl-link--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ----- Loading States ----- */
.loading-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
}
.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top: 3px solid var(--color-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner--tiktok { border-top-color: var(--color-tiktok); }
.spinner--instagram { border-top-color: var(--color-instagram); }
.loading-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.06) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 400% 100%;
  animation: skeletonWave 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

/* ----- Error / Alert ----- */
.alert-error {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.93rem;
  line-height: 1.6;
  word-break: break-word;
}

/* ----- Results Section ----- */
.results {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.results__heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.media-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.media-group__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-content: center;
}
@media (min-width: 480px) {
  .media-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  }
}
.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}
.media-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: var(--shadow-md);
}
.media-card__thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}
.media-card__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.media-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.media-badge--image {
  background: rgba(240, 148, 51, 0.15);
  color: #ffb061;
}
.media-badge--video {
  background: rgba(220, 39, 67, 0.15);
  color: #ff788f;
}
.media-badge--audio {
  background: rgba(168, 85, 247, 0.15);
  color: #c4a5ff;
}
.dl-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Metadata block (TikTok author/description) */
.meta-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-row {
  font-size: 0.92rem;
  line-height: 1.5;
}
.meta-row__label {
  color: var(--text-muted);
  font-weight: 600;
}
.meta-row__value {
  color: var(--text-primary);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  z-index: 10;
  position: relative;
}

/* ----- Scroll Reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* ----- Animations ----- */
@keyframes floatA {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -50px) scale(1.1); }
}
@keyframes floatB {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, 40px) scale(1.12); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes skeletonWave {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulseRing {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----- Utility ----- */
.text-center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ----- Responsive ----- */
@media (max-width: 480px) {
  .nav-bar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: var(--radius-md);
  }
  .nav-link {
    flex: 1 1 auto;
    font-size: 0.8rem;
    padding: 8px 12px;
  }
  .glass-card {
    padding: 24px 20px;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .tool-card {
    padding: 24px 20px;
  }
  .tool-card__title {
    font-size: 1.2rem;
  }
  .step-card {
    padding: 20px 16px;
  }
}

/* ----- SEO Content Styling ----- */
.seo-copy {
  width: 100%;
  max-width: 650px;
  margin: 0 auto 60px auto;
  position: relative;
  z-index: 10;
  text-align: left;
}
.seo-copy__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}
.seo-copy__body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.seo-copy__body strong {
  color: var(--text-primary);
}
.seo-guide-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.seo-guide-list li::marker {
  color: var(--color-purple);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ----- Video Preview Component ----- */
.video-preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.video-preview-container video {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: #000;
  aspect-ratio: 9/16;
  object-fit: contain;
}
.tiktok-thumbnail-preview {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.05);
}
