/* ==========================================================================
   instasongdownload.com - Main Stylesheet
   Modern, Fast, Accessible & Responsive Downloader UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties & Theming - Ultra Modern Cyber-Luxe Theme
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Light Theme */
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-solid: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: rgba(226, 232, 240, 0.9);
  --border-focus: #6366f1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Accent & Gradients (Vibrant Sunset & Neon Cyber Glow) */
  --primary-color: #e11d48;
  --primary-hover: #be123c;
  --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #ec4899 30%, #a855f7 70%, #6366f1 100%);
  --primary-gradient-hover: linear-gradient(135deg, #e11d48 0%, #db2777 30%, #9333ea 70%, #4f46e5 100%);
  --logo-gradient: linear-gradient(135deg, #f43f5e 0%, #a855f7 50%, #6366f1 100%);
  
  --soft-gradient-bg: radial-gradient(circle at 50% -20%, rgba(244, 63, 94, 0.12) 0%, rgba(168, 85, 247, 0.08) 40%, rgba(248, 250, 252, 1) 90%);
  --pastel-gradient-hero: radial-gradient(circle at 50% 0%, rgba(253, 242, 248, 0.9) 0%, rgba(238, 242, 255, 0.7) 45%, rgba(248, 250, 252, 0) 100%);
  --accent-glow: rgba(236, 72, 153, 0.3);

  /* Functional Badges */
  --tint-rose: rgba(244, 63, 94, 0.12);
  --tint-indigo: rgba(99, 102, 241, 0.12);
  --tint-emerald: rgba(16, 185, 129, 0.12);
  --tint-amber: rgba(245, 158, 11, 0.12);
  --tint-cyan: rgba(6, 182, 212, 0.12);
  --tint-purple: rgba(168, 85, 247, 0.12);

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 24px 48px -12px rgba(99, 102, 241, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  --shadow-button: 0 12px 28px -6px rgba(244, 63, 94, 0.45);

  /* Layout & Sizing */
  --container-max: 1200px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables - Sleek Dark Obsidian Glass */
body.theme-dark {
  --bg-main: #070913;
  --bg-card: rgba(15, 20, 35, 0.82);
  --bg-card-solid: #0f1423;
  --bg-card-subtle: #161c32;
  --bg-input: #12172b;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: #ec4899;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #070913;

  --soft-gradient-bg: radial-gradient(circle at 50% -20%, rgba(236, 72, 153, 0.22) 0%, rgba(99, 102, 241, 0.15) 45%, rgba(7, 9, 19, 1) 90%);
  --pastel-gradient-hero: radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.2) 0%, rgba(99, 102, 241, 0.12) 50%, rgba(7, 9, 19, 0) 85%);
  --accent-glow: rgba(236, 72, 153, 0.45);
  --shadow-card: 0 24px 50px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.07) inset;
  --shadow-button: 0 12px 28px -6px rgba(236, 72, 153, 0.55);
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary-color);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

/* --------------------------------------------------------------------------
   3. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

body.theme-dark .site-header {
  background-color: rgba(11, 15, 25, 0.92);
  border-bottom-color: rgba(36, 50, 74, 0.6);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--logo-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.logo-svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo-title {
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--tint-indigo);
  color: var(--primary-color);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.main-nav {
  display: none;
}

@media (min-width: 860px) {
  .main-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Dropdown */
.lang-dropdown-wrap {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--primary-color);
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.lang-dropdown-wrap.open .dropdown-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 195px;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.35rem;
  display: none;
  z-index: 200;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.lang-menu::-webkit-scrollbar {
  width: 5px;
}

.lang-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 9999px;
}

.lang-dropdown-wrap.open .lang-menu {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.lang-option {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.lang-option:hover, .lang-option.active {
  background-color: var(--bg-card-subtle);
  color: var(--primary-color);
  font-weight: 600;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: var(--bg-card-subtle);
}

.theme-icon {
  width: 19px;
  height: 19px;
}

body.theme-light .sun-icon {
  display: none;
}

body.theme-light .moon-icon {
  display: block;
}

body.theme-dark .sun-icon {
  display: block;
}

body.theme-dark .moon-icon {
  display: none;
}

/* --------------------------------------------------------------------------
   4. Hero Section & Downloader Card
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  padding: 3.75rem 0 2.25rem;
  overflow: hidden;
  background: var(--soft-gradient-bg);
}

.hero-glow-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.aurora-orb.orb-1 {
  width: 380px;
  height: 380px;
  top: -100px;
  left: 8%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.4) 0%, rgba(244, 63, 94, 0) 70%);
}

.aurora-orb.orb-2 {
  width: 440px;
  height: 440px;
  top: -60px;
  right: 10%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0) 70%);
  animation-duration: 16s;
  animation-delay: -3s;
}

.aurora-orb.orb-3 {
  width: 320px;
  height: 320px;
  bottom: -40px;
  left: 38%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, rgba(99, 102, 241, 0) 70%);
  animation-duration: 14s;
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, 20px) scale(1.08); }
  100% { transform: translate(-20px, 35px) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

/* Live Announcement & Trust Pill */
.live-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.08);
}

body.theme-dark .live-hero-pill {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(99, 102, 241, 0.35);
  color: #cbd5e1;
}

.pulse-status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-header {
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Soundwave Equalizer Visualizer */
.audio-equalizer-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin: 1.25rem auto 0;
  max-width: 140px;
}

.eq-bar {
  width: 3.5px;
  height: 8px;
  border-radius: 4px;
  background: var(--primary-gradient);
  animation: eqAnim 1.4s ease-in-out infinite alternate;
}

.eq-bar:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.eq-bar:nth-child(3) { height: 22px; animation-delay: 0.3s; }
.eq-bar:nth-child(4) { height: 12px; animation-delay: 0.45s; }
.eq-bar:nth-child(5) { height: 20px; animation-delay: 0.2s; }
.eq-bar:nth-child(6) { height: 24px; animation-delay: 0.5s; }
.eq-bar:nth-child(7) { height: 14px; animation-delay: 0.1s; }
.eq-bar:nth-child(8) { height: 22px; animation-delay: 0.35s; }
.eq-bar:nth-child(9) { height: 10px; animation-delay: 0.6s; }
.eq-bar:nth-child(10) { height: 18px; animation-delay: 0.25s; }
.eq-bar:nth-child(11) { height: 15px; animation-delay: 0.4s; }
.eq-bar:nth-child(12) { height: 8px; animation-delay: 0.55s; }

@keyframes eqAnim {
  0% { transform: scaleY(0.3); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; filter: drop-shadow(0 0 5px rgba(236,72,153,0.7)); }
  100% { transform: scaleY(0.4); opacity: 0.7; }
}

/* Horizontal Tabs Row */
.tabs-scroll-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.tabs-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.tabs-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.tabs-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem;
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 30px -6px rgba(99, 102, 241, 0.1);
  white-space: nowrap;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition-fast);
  user-select: none;
}

.tool-tab:hover {
  color: var(--primary-color);
  background-color: var(--bg-card-subtle);
}

.tool-tab.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-button);
}

.tab-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  transition: all var(--transition-fast);
}

.tool-tab.active .tab-icon-wrap {
  background: rgba(255, 255, 255, 0.22);
}

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

.tab-micro-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.tool-tab.active .tab-micro-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* More Dropdown */
.more-dropdown-wrap {
  position: relative;
}

.more-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.4rem;
  display: none;
  z-index: 200;
  text-align: left;
}

.more-dropdown-wrap.open .more-menu {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.more-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.more-item-btn:hover {
  background-color: var(--bg-card-subtle);
  color: var(--primary-color);
}

.more-item-icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   5. Downloader Input Card (Sleek Glass Card with Dynamic Aura)
   -------------------------------------------------------------------------- */
.downloader-card {
  position: relative;
  background-color: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 50px -12px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  padding: 1.65rem;
  margin-bottom: 1.5rem;
  text-align: left;
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

body.theme-dark .downloader-card {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Target Quality Format Selector Bar */
.quality-selector-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.quality-selector-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.quality-pills-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.quality-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--bg-card-solid);
}

.quality-pill.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.2);
}

.pill-glow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
  transition: background-color var(--transition-fast);
}

.quality-pill.active .pill-glow-dot {
  background-color: var(--primary-color);
  box-shadow: 0 0 6px var(--primary-color);
}

.download-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 720px) {
  .download-form {
    flex-direction: row;
    align-items: stretch;
  }
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-icon-left {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-icon-left svg {
  width: 20px;
  height: 20px;
}

.url-input {
  width: 100%;
  padding: 1.05rem 8.5rem 1.05rem 3rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
}

.url-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.input-clear-btn {
  position: absolute;
  right: 6.75rem;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.input-clear-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-card-subtle);
}

.input-clear-btn svg {
  width: 16px;
  height: 16px;
}

.paste-btn {
  position: absolute;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background-color: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary-color);
  transition: all var(--transition-fast);
}

body.theme-dark .paste-btn {
  background-color: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.3);
  color: #f472b6;
}

.paste-btn:hover {
  background-color: rgba(244, 63, 94, 0.15);
  border-color: var(--primary-color);
  transform: scale(1.02);
}

body.theme-dark .paste-btn:hover {
  background-color: rgba(236, 72, 153, 0.25);
  color: #ffffff;
}

.paste-btn .btn-icon {
  width: 15px;
  height: 15px;
}

.kbd-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: inherit;
  background: rgba(244, 63, 94, 0.12);
  color: var(--primary-color);
  border-radius: 4px;
  margin-left: 0.2rem;
}

body.theme-dark .kbd-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

/* Submit Download Button (Gradient & Shimmer Sweep) */
.submit-download-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.05rem 2.25rem;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-button);
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 52px;
}

.submit-download-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(25deg);
  animation: btnShimmer 4s infinite;
}

@keyframes btnShimmer {
  0% { left: -60%; }
  20% { left: 140%; }
  100% { left: 140%; }
}

.submit-download-btn:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(244, 63, 94, 0.55);
}

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

.submit-download-btn .btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.submit-download-btn .download-icon {
  width: 20px;
  height: 20px;
}

/* Spinner */
.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
}

.submit-download-btn.is-loading .btn-content {
  display: none;
}

.submit-download-btn.is-loading .btn-spinner {
  display: inline-block;
}

.submit-download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Card Info & Samples */
.card-footer-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.example-pill-link {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.example-pill-link:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Feature Highlights Bar (Ultra Luxury Metrics) */
.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 2rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
  transition: all var(--transition-fast);
}

.stat-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.stat-icon-wrap {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.bg-rose-glow { background: rgba(244, 63, 94, 0.15); }
.bg-indigo-glow { background: rgba(99, 102, 241, 0.15); }
.bg-emerald-glow { background: rgba(16, 185, 129, 0.15); }
.bg-amber-glow { background: rgba(245, 158, 11, 0.15); }

/* --------------------------------------------------------------------------
   6. Result Area (States: Idle, Loading, Error, Success)
   -------------------------------------------------------------------------- */
.result-area {
  margin-bottom: 2rem;
}

/* Idle State Hints */
.state-idle {
  display: flex;
  justify-content: center;
}

.idle-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.hint-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

/* Loading State */
.state-loading {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
}

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

.loading-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.loading-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.progress-bar-track {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background-color: var(--bg-card-subtle);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.75rem;
}

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

/* Error State */
.state-error {
  background-color: var(--bg-card);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  text-align: left;
  animation: fadeIn 0.25s ease-out;
}

body.theme-dark .state-error {
  border-color: #7f1d1d;
  background-color: rgba(127, 29, 29, 0.15);
}

.error-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.theme-dark .error-icon-box {
  background-color: #7f1d1d;
  color: #fca5a5;
}

.error-icon-box svg {
  width: 24px;
  height: 24px;
}

.error-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 0.3rem;
}

body.theme-dark .error-title {
  color: #f87171;
}

.error-msg {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.875rem;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-retry, .btn-try-sample {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-retry {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-retry:hover {
  background-color: #b91c1c;
}

.btn-try-sample {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-try-sample:hover {
  border-color: var(--text-muted);
}

/* Success State */
.state-success {
  animation: fadeIn 0.3s ease-out;
}

.media-result-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  text-align: left;
}

body.theme-dark .media-result-card {
  border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .media-result-card {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.media-preview-box {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.media-preview-thumb {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
}

.media-preview-video {
  width: 100%;
  max-height: 320px;
  border-radius: var(--radius-md);
  background-color: #000000;
}

.audio-cover-art {
  width: 100%;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: #ffffff;
  gap: 0.75rem;
}

.audio-cover-art svg {
  width: 64px;
  height: 64px;
}

.media-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.media-type-badge, .media-quality-badge, .media-size-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.media-type-badge {
  background-color: var(--tint-indigo);
  color: var(--primary-color);
}

.media-quality-badge {
  background-color: var(--tint-emerald);
  color: #059669;
}

.media-size-badge {
  background-color: var(--bg-card-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.media-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.media-author {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
}

/* Audio Player Container */
.audio-player-container {
  margin-bottom: 1.25rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

.audio-element {
  width: 100%;
  height: 36px;
}

/* Final Download Action Button */
.download-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-download-final {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-button);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-download-final:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -5px rgba(99, 102, 241, 0.48);
}

.btn-download-final svg {
  width: 20px;
  height: 20px;
}

/* Extra Video Download Buttons */
.video-extra-downloads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.btn-extra-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-extra-dl:hover {
  background-color: var(--tint-indigo);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

body.theme-dark .btn-extra-dl:hover {
  background-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.secondary-btns-row {
  display: flex;
  gap: 0.6rem;
}

.btn-secondary-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: #eef2ff;
}

body.theme-dark .btn-secondary-action:hover {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.btn-secondary-action svg {
  width: 16px;
  height: 16px;
}

/* Carousel Multi-item Grid */
.carousel-items-container {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

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

.carousel-header h4 {
  font-size: 0.9375rem;
  font-weight: 700;
}

.btn-download-all-carousel {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary-gradient);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
}

.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.carousel-card-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-card-subtle);
}

.carousel-card-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.carousel-card-btn {
  width: 100%;
  padding: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg-card-solid);
  color: var(--primary-color);
  border-top: 1px solid var(--border-color);
  display: block;
}

/* --------------------------------------------------------------------------
   7. Ad-Slot Placeholder
   -------------------------------------------------------------------------- */
.ad-slot-placeholder {
  width: 100%;
  max-width: 728px;
  margin: 1.75rem auto 1rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background-color: rgba(241, 245, 249, 0.4);
  padding: 0.75rem;
  transition: all var(--transition-smooth);
}

body.theme-dark .ad-slot-placeholder {
  background-color: rgba(30, 41, 59, 0.3);
}

.ad-inner-box {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.ad-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ad-notice {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-disclaimer-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 1rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.legal-inline-link {
  color: var(--primary-color);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   8. Section Headers & Kicker
   -------------------------------------------------------------------------- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

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

/* --------------------------------------------------------------------------
   9. How-To Steps Section (Sleek Step Badges & Cards)
   -------------------------------------------------------------------------- */
.how-to-section {
  padding: 4.5rem 0 3.5rem;
  background-color: var(--bg-card-solid);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  position: relative;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0 1.5rem 2rem;
  text-align: left;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

.step-guide-image {
  display: block;
  width: 100%;
  height: 270px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #faf7ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

body.theme-dark .step-guide-image {
  background: linear-gradient(180deg, #141226 0%, #0f1423 100%);
}

.step-card .step-icon-wrap,
.step-card .step-title,
.step-card .step-desc {
  margin-left: 0;
  margin-right: 0;
}


.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

.step-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 800;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.theme-dark .step-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}

.step-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--tint-indigo);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.step-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.step-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   10. Features Grid Section
   -------------------------------------------------------------------------- */
.features-section {
  padding: 4.5rem 0 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.125rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.bg-rose-tint { background-color: var(--tint-rose); color: #f43f5e; }
.bg-indigo-tint { background-color: var(--tint-indigo); color: #6366f1; }
.bg-emerald-tint { background-color: var(--tint-emerald); color: #10b981; }
.bg-amber-tint { background-color: var(--tint-amber); color: #f59e0b; }
.bg-cyan-tint { background-color: var(--tint-cyan); color: #06b6d4; }
.bg-purple-tint { background-color: var(--tint-purple); color: #a855f7; }

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   11. Long-Form SEO Guide Article
   -------------------------------------------------------------------------- */
.seo-guide-section {
  padding: 4.5rem 0 3.5rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.guide-container {
  max-width: 880px;
}

.guide-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.guide-main-heading {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.guide-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.guide-article {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.guide-block h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  letter-spacing: -0.01em;
}

.guide-block p {
  margin-bottom: 1rem;
}

.guide-block p:last-child {
  margin-bottom: 0;
}

.platform-tabs-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.platform-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.platform-card h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.guide-ordered-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-bullet-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Comparison Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

.specs-table th {
  background-color: var(--bg-card-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.specs-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.format-pill {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.format-pill.mp3 { background-color: var(--tint-rose); color: var(--primary-color); }
.format-pill.mp4 { background-color: var(--tint-indigo); color: #6366f1; }
.format-pill.jpg { background-color: var(--tint-emerald); color: #10b981; }

/* --------------------------------------------------------------------------
   12. FAQ Accordion Section
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 4.5rem 0 3.5rem;
}

.faq-container {
  max-width: 800px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--primary-color);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.faq-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* --------------------------------------------------------------------------
   13. Blog Section
   -------------------------------------------------------------------------- */
.blog-preview-section {
  padding: 4.5rem 0 3.5rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-tag {
  font-weight: 700;
  color: var(--primary-color);
}

.blog-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.blog-title a {
  color: inherit;
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--primary-color);
}

.blog-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.blog-read-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast);
}

.blog-read-link:hover {
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  padding-top: 4rem;
  margin-top: auto;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-container {
    grid-template-columns: 1.8fr 1.2fr 1.2fr 1.2fr;
  }
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background-color: var(--tint-emerald);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a, .footer-modal-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  text-align: left;
}

.footer-links a:hover, .footer-modal-link:hover {
  color: var(--primary-color);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 0;
  background-color: var(--bg-card);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.trademark-disclaimer {
  max-width: 900px;
}

/* --------------------------------------------------------------------------
   15. Modals (Dialogs)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

/* Contact Form inside Modal */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-input, .modal-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.modal-input:focus, .modal-textarea:focus {
  border-color: var(--primary-color);
}

.btn-submit-contact {
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-submit-contact:hover {
  background: var(--primary-gradient-hover);
}

.contact-success-msg {
  background-color: var(--tint-emerald);
  color: #059669;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* --------------------------------------------------------------------------
   API Key Header Button & Settings Modal Styles
   -------------------------------------------------------------------------- */
.api-key-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.api-key-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--bg-card-subtle);
  transform: translateY(-1px);
}

.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #9ca3af;
  display: inline-block;
}

.api-status-dot.active, .api-status-dot.connected {
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.api-status-dot.warning {
  background-color: #f59e0b;
}

.api-status-dot.error {
  background-color: #ef4444;
}

.api-modal-box {
  max-width: 540px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title-icon {
  color: var(--primary-color);
}

.modal-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.api-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.api-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.status-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--tint-indigo);
  color: var(--primary-color);
}

.api-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-toggle-key-visibility {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-toggle-key-visibility:hover {
  opacity: 1;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

.api-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-test-key {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-test-key:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-save-key {
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-save-key:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-1px);
}

.btn-reset-key {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  transition: all var(--transition-fast);
}

.btn-reset-key:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.api-feedback-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-top: 1rem;
  font-weight: 600;
}

.api-feedback-msg.success {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.api-feedback-msg.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.api-guide-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
}

.api-guide-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.api-guide-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.api-guide-steps a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   16. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

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

/* --------------------------------------------------------------------------
   Static Content Pages (Privacy, Terms, About, Contact, DMCA, Blog Posts)
   -------------------------------------------------------------------------- */
.static-page-main {
  padding: 3.5rem 0 5rem;
  background: var(--soft-gradient-bg);
  min-height: 60vh;
}

.static-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.static-content h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.static-content .updated-date {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.static-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2.25rem;
  margin-bottom: 0.9rem;
}

.static-content p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.1rem;
  font-size: 1rem;
}

.static-content ul,
.static-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}

.static-content li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.static-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.static-content a:hover {
  color: var(--primary-hover);
}

.static-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.static-table th,
.static-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.static-table th {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--bg-card-subtle);
}

body.theme-dark .static-table th {
  background: rgba(255, 255, 255, 0.04);
}


@media (max-width: 767px) {
  .step-guide-image {
    height: 300px;
  }
}
