/* ==========================================================================
   PinterestVideoDownload.online — Vibrant Colorful Modern Design System
   Fast-loading, zero-framework, Core Web Vitals & Mobile-First Responsive
   ========================================================================== */

:root {
  /* Vibrant Creator Palette */
  --pin-red: #E60023;
  --pin-coral: #FF385C;
  --pin-rose: #FB7185;
  --violet: #7C3AED;
  --violet-light: #A855F7;
  --orange: #F97316;
  --amber: #F59E0B;
  --emerald: #10B981;
  --teal: #0D9488;
  --sky: #0EA5E9;
  --cobalt: #2563EB;
  --magenta: #DB2777;

  /* Surfaces & Ink */
  --bg-page: #FFFBF9;
  --bg-surface: #FFFFFF;
  --bg-soft: #FFF5F7;
  --bg-subtle: #F8FAFC;
  --bg-dark: #0F172A;

  --ink-950: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;

  --border: #E8E4EC;
  --border-strong: #D5CDD9;

  /* Signature Gradients */
  --grad-brand: linear-gradient(135deg, #E60023 0%, #FF385C 52%, #7C3AED 100%);
  --grad-coral: linear-gradient(135deg, #E60023 0%, #FF4D6D 100%);
  --grad-sky: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
  --grad-sunset: linear-gradient(135deg, #F97316 0%, #EC4899 100%);
  --grad-violet: linear-gradient(135deg, #7C3AED 0%, #C026D3 100%);
  --grad-magenta: linear-gradient(135deg, #DB2777 0%, #E60023 100%);
  --grad-emerald: linear-gradient(135deg, #10B981 0%, #0D9488 100%);
  --grad-indigo: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
  --grad-gold: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);

  /* Elevation */
  --shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 6px 18px -4px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 14px 36px -8px rgba(124, 58, 237, 0.14), 0 6px 16px -6px rgba(230, 0, 35, 0.08);
  --shadow-lg: 0 24px 60px -12px rgba(230, 0, 35, 0.18), 0 12px 28px -10px rgba(124, 58, 237, 0.16);

  /* Radii & Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-950);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(at 8% 0%, rgba(255, 56, 92, 0.11) 0px, transparent 42%),
    radial-gradient(at 92% 4%, rgba(124, 58, 237, 0.11) 0px, transparent 42%),
    radial-gradient(at 50% 18%, rgba(14, 165, 233, 0.07) 0px, transparent 46%),
    radial-gradient(at 82% 65%, rgba(249, 115, 22, 0.06) 0px, transparent 40%);
  background-attachment: scroll;
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
}

a {
  color: var(--pin-red);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

a:hover {
  color: var(--violet);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--ink-950);
  margin-top: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.mono {
  font-family: var(--font-mono);
}

.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;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 249, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232, 228, 236, 0.9);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink-950);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink-950);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(230, 0, 35, 0.28);
  flex-shrink: 0;
}

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

.brand-tld {
  font-size: 0.78em;
  font-weight: 700;
  color: var(--ink-500);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-700);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover {
  background: rgba(230, 0, 35, 0.08);
  color: var(--pin-red);
}

.nav-links a.active {
  background: var(--grad-brand);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(230, 0, 35, 0.24);
}

.nav-links a.nav-pill-all {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(230, 0, 35, 0.12));
  color: var(--violet);
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.nav-links a.nav-pill-all:hover {
  background: var(--grad-violet);
  color: #FFFFFF;
  border-color: transparent;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--ink-950);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   Hero & Vibrant Downloader Studio
   ========================================================================== */

.site-main {
  flex: 1;
}

.hero-section {
  padding: 2.5rem 0 1.5rem;
}

.hero-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 1.75rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(230, 0, 35, 0.1), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(230, 0, 35, 0.2);
  color: var(--pin-red);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.hero-title {
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
}

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

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--ink-600);
  max-width: 700px;
  margin: 0 auto;
}

/* Studio Card with Colorful Halo */
.studio-shell {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 3px;
  border-radius: calc(var(--radius-xl) + 3px);
  background: linear-gradient(135deg, #FF385C 0%, #F97316 28%, #A855F7 65%, #0EA5E9 100%);
  box-shadow: var(--shadow-lg);
}

.studio-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

/* Mode Tabs Bar */
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.92rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.mode-tab:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.mode-tab.active[data-accent="coral"],
.mode-tab.active {
  background: var(--grad-coral);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(230, 0, 35, 0.28);
}

.mode-tab.active[data-accent="sky"] {
  background: var(--grad-sky);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}

.mode-tab.active[data-accent="sunset"] {
  background: var(--grad-sunset);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.28);
}

.mode-tab.active[data-accent="violet"] {
  background: var(--grad-violet);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.28);
}

.mode-tab.active[data-accent="magenta"] {
  background: var(--grad-magenta);
  box-shadow: 0 6px 16px rgba(219, 39, 119, 0.28);
}

.mode-tab.active[data-accent="emerald"] {
  background: var(--grad-emerald);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.mode-tab.active[data-accent="indigo"] {
  background: var(--grad-indigo);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.mode-tab.active[data-accent="gold"] {
  background: var(--grad-gold);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}

/* Single URL Input Bar */
.downloader-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.input-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  background: #F8F7FC;
  border: 2px solid #E5DFEE;
  border-radius: 18px;
  padding: 0.42rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-row:focus-within {
  background: #FFFFFF;
  border-color: var(--pin-coral);
  box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.14);
}

.url-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.url-input-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--pin-coral);
  display: inline-flex;
  pointer-events: none;
}

.url-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.88rem 0.75rem 0.88rem 2.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-950);
  outline: none;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--ink-400);
}

.btn-paste,
.btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 0.95rem;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.btn-paste:hover,
.btn-clear:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: #FAF5FF;
}

.btn-clear {
  display: none;
  padding: 0.65rem 0.75rem;
}

.btn-clear.visible {
  display: inline-flex;
}

.btn-fetch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.88rem 1.75rem;
  border: 0;
  border-radius: 14px;
  background: var(--grad-brand);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(230, 0, 35, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-fetch:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(230, 0, 35, 0.34);
  filter: brightness(1.04);
}

.btn-fetch:active:not(:disabled) {
  transform: translateY(0);
}

.btn-fetch:disabled {
  opacity: 0.75;
  cursor: wait;
}

/* Bulk Textarea Mode */
.bulk-panel {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.bulk-panel.active {
  display: flex;
}

.bulk-textarea {
  width: 100%;
  min-height: 132px;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 2px solid #E5DFEE;
  background: #F8F7FC;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink-950);
  resize: vertical;
  outline: none;
  line-height: 1.7;
}

.bulk-textarea:focus {
  background: #FFFFFF;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bulk-hint {
  font-size: 0.85rem;
  color: var(--ink-500);
}

/* Quick Sample Pins Strip */
.sample-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-500);
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px dashed #D8B4FE;
  background: #FAF5FF;
  color: var(--violet);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sample-chip:hover {
  background: var(--grad-violet);
  color: #FFFFFF;
  border-style: solid;
  border-color: transparent;
}

/* Trust Mini-Badges */
.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #F1EEF6;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-600);
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-pill svg {
  color: var(--emerald);
  flex-shrink: 0;
}

/* Loading & Status Banners */
.status-banner {
  display: none;
  margin-top: 1.15rem;
  padding: 0.95rem 1.15rem;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 600;
  align-items: center;
  gap: 0.75rem;
}

.status-banner.visible {
  display: flex;
}

.status-banner.loading {
  background: linear-gradient(135deg, #EFF6FF, #FAF5FF);
  border: 1px solid #DDD6FE;
  color: var(--violet);
}

.status-banner.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}

.status-banner.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(124, 58, 237, 0.22);
  border-top-color: var(--pin-red);
  border-radius: 50%;
  animation: pvdSpin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ==========================================================================
   Dynamic Download Result Panel
   ========================================================================== */

.result-area {
  margin-top: 1.5rem;
  display: none;
}

.result-area.visible {
  display: block;
  animation: pvdFadeUp 0.28s ease-out;
}

@keyframes pvdFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  background: #FFFFFF;
  border: 1px solid #EAE4F2;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.preview-box {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0F172A;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-sm);
}

.preview-box video,
.preview-box img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #0B1120;
}

.preview-type-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.result-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-coral { background: #FFF1F2; color: #BE123C; border: 1px solid #FECDD3; }
.badge-violet { background: #F5F3FF; color: #6D28D9; border: 1px solid #DDD6FE; }
.badge-emerald { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.badge-sky { background: #F0F9FF; color: #0369A1; border: 1px solid #BAE6FD; }
.badge-orange { background: #FFF7ED; color: #C2410C; border: 1px solid #FED7AA; }

.result-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink-950);
  word-break: break-word;
}

.result-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creator-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-500);
}

.creator-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFE4E9;
}

/* Download Options Table / List */
.dl-group-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  margin: 0.4rem 0 0.35rem;
}

.dl-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dl-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: #FAF9FC;
  border: 1px solid #ECE7F3;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dl-row:hover {
  border-color: #D8B4FE;
  background: #FFFFFF;
}

.dl-row.primary-row {
  background: linear-gradient(135deg, #FFF5F7 0%, #F5F3FF 100%);
  border: 1.5px solid #FBCFE8;
}

.dl-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.dl-format-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.58rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--grad-coral);
}

.dl-format-tag.tag-img { background: var(--grad-sky); }
.dl-format-tag.tag-gif { background: var(--grad-sunset); }
.dl-format-tag.tag-audio { background: var(--grad-emerald); }
.dl-format-tag.tag-thumb { background: var(--grad-indigo); }

.dl-quality-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-950);
}

.dl-meta-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-500);
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.58rem 1.15rem;
  border-radius: 12px;
  border: 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--grad-emerald);
  box-shadow: 0 5px 14px rgba(16, 185, 129, 0.28);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-dl:hover {
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.36);
  filter: brightness(1.04);
}

.btn-dl.btn-dl-coral {
  background: var(--grad-coral);
  box-shadow: 0 5px 14px rgba(230, 0, 35, 0.28);
}

.btn-dl.btn-dl-sky {
  background: var(--grad-sky);
  box-shadow: 0 5px 14px rgba(14, 165, 233, 0.28);
}

.btn-dl.btn-dl-violet {
  background: var(--grad-violet);
  box-shadow: 0 5px 14px rgba(124, 58, 237, 0.28);
}

.btn-dl.btn-dl-sunset {
  background: var(--grad-sunset);
  box-shadow: 0 5px 14px rgba(249, 115, 22, 0.28);
}

.btn-dl:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Media Extractor Sub-Panels (Audio / GIF) */
.tool-output-box {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ECFDF5, #F0F9FF);
  border: 1px solid #A7F3D0;
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

.tool-output-box.visible {
  display: flex;
}

.tool-output-box audio {
  width: 100%;
  height: 40px;
}

.waveform-canvas {
  width: 100%;
  height: 54px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: #E2E8F0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-brand);
  border-radius: var(--radius-pill);
  transition: width 0.22s ease;
}

/* Idea Pin / Story / Carousel Slides Grid */
.slides-section {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid #EFEAF5;
}

.slides-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem;
}

.slide-card {
  background: #FAF9FC;
  border: 1px solid #E8E4EC;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.slide-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0F172A;
  overflow: hidden;
}

.slide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-num {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.8);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
}

.slide-body {
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.slide-body .btn-dl {
  width: 100%;
  padding: 0.48rem 0.75rem;
  font-size: 0.82rem;
}

/* Bulk Results Queue */
.bulk-results {
  margin-top: 1.25rem;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.bulk-results.visible {
  display: flex;
}

.bulk-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #FAF9FC;
  border: 1px solid #E8E4EC;
}

.bulk-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.bulk-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #E2E8F0;
  flex-shrink: 0;
}

/* Recent History Strip */
.history-strip {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px dashed #E5DFEE;
  display: none;
}

.history-strip.visible {
  display: block;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-500);
}

.history-clear {
  border: 0;
  background: transparent;
  color: var(--pin-red);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--ink-700);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-chip:hover {
  border-color: var(--pin-coral);
  color: var(--pin-red);
}

/* ==========================================================================
   Content Sections, Bento Tool Grid, Steps, Device Cards & Tables
   ========================================================================== */

.section {
  padding: 3.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 245, 247, 0.72) 0%, rgba(245, 243, 255, 0.55) 100%);
  border-top: 1px solid rgba(232, 228, 236, 0.75);
  border-bottom: 1px solid rgba(232, 228, 236, 0.75);
}

.section-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 2.25rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  padding: 0.28rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.7rem;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.section-sub {
  color: var(--ink-600);
  margin: 0;
  font-size: 1.02rem;
}

/* Colorful All-Downloaders Bento Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  border: 1.5px solid #ECE7F2;
  box-shadow: var(--shadow-xs);
  color: var(--ink-950);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, var(--grad-brand));
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  color: var(--ink-950);
}

.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--card-accent, var(--grad-brand));
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.22);
}

.tool-card h3 {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--ink-600);
  margin: 0 0 1rem;
  flex: 1;
}

.tool-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--pin-red);
}

.accent-coral   { --card-accent: var(--grad-coral); }
.accent-sky     { --card-accent: var(--grad-sky); }
.accent-sunset  { --card-accent: var(--grad-sunset); }
.accent-violet  { --card-accent: var(--grad-violet); }
.accent-magenta { --card-accent: var(--grad-magenta); }
.accent-emerald { --card-accent: var(--grad-emerald); }
.accent-indigo  { --card-accent: var(--grad-indigo); }
.accent-gold    { --card-accent: var(--grad-gold); }

/* 3-Step Visual Guide */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.step-card {
  background: #FFFFFF;
  border: 1px solid #ECE7F2;
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--step-grad, var(--grad-coral));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 18px -4px rgba(230, 0, 35, 0.28);
}

.step-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.94rem;
}

/* Feature Highlights Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid #ECE7F2;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  color: #FFFFFF;
}

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

.feature-card p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.92rem;
}

/* Device Cards Row */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.device-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1.5px solid #ECE7F2;
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-xs);
  color: var(--ink-950);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.device-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--ink-950);
}

.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.36rem 0.85rem;
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.device-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.device-card p {
  color: var(--ink-600);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  flex: 1;
}

/* Clean Responsive SEO Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid #E8E4EC;
  background: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.seo-table thead {
  background: linear-gradient(135deg, #FFF1F2 0%, #F5F3FF 50%, #F0F9FF 100%);
}

.seo-table th {
  padding: 1rem 1.15rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-950);
  border-bottom: 1.5px solid #E5DFEE;
  white-space: nowrap;
}

.seo-table td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid #F1EEF6;
  color: var(--ink-700);
}

.seo-table tbody tr:last-child td {
  border-bottom: 0;
}

.seo-table tbody tr:hover {
  background: #FDFBFF;
}

/* FAQ Accordion */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.faq-item {
  background: #FFFFFF;
  border: 1.5px solid #ECE7F2;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.faq-item[open] {
  border-color: #D8B4FE;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;
  padding: 1.15rem 1.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-950);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFF1F2, #F5F3FF);
  color: var(--pin-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
  content: '−';
  background: var(--grad-brand);
  color: #FFFFFF;
}

.faq-answer {
  padding: 0 1.35rem 1.2rem;
  color: var(--ink-600);
  font-size: 0.95rem;
  line-height: 1.72;
}

/* Long-form SEO Prose Card */
.prose-card {
  background: #FFFFFF;
  border: 1px solid #ECE7F2;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
  max-width: 920px;
  margin: 0 auto;
}

.prose-card h2 {
  font-size: 1.55rem;
  margin: 1.6rem 0 0.7rem;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card h3 {
  font-size: 1.18rem;
  margin: 1.25rem 0 0.5rem;
}

.prose-card p,
.prose-card li {
  color: var(--ink-700);
  font-size: 0.98rem;
}

.prose-card ul,
.prose-card ol {
  padding-left: 1.35rem;
}

.prose-card li {
  margin-bottom: 0.45rem;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-500);
  margin-bottom: 1rem;
  justify-content: center;
}

.breadcrumb a {
  color: var(--ink-600);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--pin-red);
}

/* Keyword Cloud / Related Internal Links */
.related-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.related-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 1rem;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid #E5DFEE;
  color: var(--ink-800);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.related-pill:hover {
  background: var(--grad-brand);
  color: #FFFFFF;
  border-color: transparent;
  transform: translateY(-1px);
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--ink-800);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  background: #FAF9FC;
  color: var(--ink-950);
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--violet);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* ==========================================================================
   Colorful Deep Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(160deg, #0F172A 0%, #1E1B4B 58%, #3B0764 100%);
  color: #CBD5E1;
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.footer-brand:hover {
  color: #FFFFFF;
}

.footer-desc {
  font-size: 0.9rem;
  color: #94A3B8;
  margin: 0 0 1rem;
  max-width: 340px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: #CBD5E1;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #FB7185;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: #94A3B8;
}

/* ==========================================================================
   Responsive Breakpoints (All Devices: 320px Mobile -> Tablet -> Desktop)
   ========================================================================== */

@media (max-width: 1120px) {
  .nav-links a {
    padding: 0.45rem 0.65rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 251, 249, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
  }

  .site-header nav.open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-links a {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-size: 0.94rem;
  }
}

@media (max-width: 860px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .features-grid,
  .devices-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding: 1.6rem 0 1rem;
  }

  .studio-card {
    padding: 1.05rem;
  }

  .input-row {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .input-actions-mobile {
    display: flex;
    gap: 0.5rem;
  }

  .btn-paste,
  .btn-fetch {
    flex: 1;
    padding: 0.82rem 1rem;
  }

  .tools-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .prose-card {
    padding: 1.3rem;
  }

  .mode-tab {
    font-size: 0.8rem;
    padding: 0.42rem 0.74rem;
  }

  .dl-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-dl {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
