/* Root variables for color system */
:root {
  --bg-color: #0c0d12;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --accent-cyan: #00f2fe;
  --accent-pink: #fe0979;
  --accent-gradient: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-pink) 100%);
  --accent-hover-gradient: linear-gradient(135deg, #00d2da 0%, #e0076a 100%);
  --success-color: #4ade80;
  --error-color: #f87171;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --border-color: rgba(255, 255, 255, 0.08);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.08);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Ambient Background Glows */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.bg-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-cyan);
  top: -100px;
  right: -50px;
}

.bg-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-pink);
  bottom: 10%,;
  left: -150px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 18, 0.7);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: var(--transition);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-btn .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #141620;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  min-width: 160px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.lang-dropdown.show {
  display: flex;
}

.lang-dropdown a {
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.lang-dropdown a:hover, .lang-dropdown a.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 64px 0 24px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 54px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 960px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* Glassmorphic Downloader Input Box */
.downloader-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  max-width: 960px;
  margin: 0 auto;
}

/* Copywriting features badges */
.features-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  cursor: default;
  user-select: none;
}

.badge:hover {
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
  background: rgba(0, 242, 254, 0.05);
}

.badge-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

[data-theme="light"] .badge {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .badge:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.input-group {
  display: flex;
  gap: 16px;
  width: 100%;
}

.input-wrapper {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.input-icon {
  width: 24px;
  height: 24px;
  fill: var(--text-secondary);
  position: absolute;
  left: 16px;
}

.input-wrapper input {
  width: 100%;
  height: 56px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
  padding: 0 80px 0 52px;
}

.input-wrapper input::placeholder {
  color: var(--text-secondary);
}

.btn-paste {
  position: absolute;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-submit {
  background: var(--accent-gradient);
  border: none;
  color: #000;
  font-weight: 700;
  font-family: var(--font-title);
  font-size: 16px;
  padding: 0 32px;
  height: 58px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--accent-hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}

.btn-submit .icon-arrow {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: var(--transition);
}

.btn-submit:hover .icon-arrow {
  transform: translateX(4px);
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-full {
  width: 100%;
}

.icon-refresh {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Advertisement Layouts */
.ad-container {
  display: none !important;
  margin: 32px auto;
  max-width: 728px;
}

.ad-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-md);
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 2px;
}

/* Loading Spinner */
.loading-section {
  padding: 48px 0;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--accent-cyan);
  border-bottom-color: var(--accent-pink);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

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

.loading-section p {
  color: var(--text-secondary);
}

/* Error Card */
.error-section {
  padding: 32px 0;
}

.error-card {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(248, 113, 113, 0.04);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.error-icon {
  width: 48px;
  height: 48px;
  fill: var(--error-color);
  margin-bottom: 16px;
}

.error-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.error-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

/* Result Section */
.result-section {
  padding: 24px 0;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.result-preview-card, .result-actions-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 125%; /* 4:5 aspect ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  background: #181922;
}

.thumbnail-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.video-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-author {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 14px;
}

.result-actions-card {
  display: flex;
  flex-direction: column;
}

.result-actions-card h3,
.result-actions-card .action-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: auto;
  padding-bottom: 24px;
}

.btn-download {
  background: var(--accent-gradient);
  border: none;
  color: #000;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-family: var(--font-title);
  font-size: 16px;
  transition: var(--transition);
  display: block;
}

.btn-download:hover {
  background: var(--accent-hover-gradient);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.2);
}

.btn-download.btn-audio {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-download.btn-audio:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn-download.btn-subtitle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.btn-download.btn-subtitle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: none;
}

/* Info & SEO Content Section */
.info-section {
  max-width: 900px;
  margin: 64px auto 32px;
}

.info-section h2 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}

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

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 600;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.faq-container h2 {
  margin-bottom: 32px;
}

.faq-item {
  border-bottom: 1px solid var(--card-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 24px 0;
  text-align: left;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

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

.faq-arrow {
  width: 24px;
  height: 24px;
  fill: var(--text-secondary);
  transition: var(--transition);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  fill: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer p {
  padding-bottom: 24px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  background: #090a0d;
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Media Queries (Responsive) */
@media (max-width: 768px) {
  .hero-title {
    font-size: 38px;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .btn-submit {
    width: 100%;
    justify-content: center;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Light Theme Overrides (SnapSave Inspired) --- */
[data-theme="light"] {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  /* Vibrant emerald green theme */
  --accent-cyan: #10b981;
  --accent-pink: #059669;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-hover-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --success-color: #10b981;
  --error-color: #ef4444;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --border-color: #e2e8f0;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] header {
  background: rgba(248, 250, 252, 0.8);
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] footer {
  background: #f1f5f9;
  border-top-color: #e2e8f0;
}

[data-theme="light"] .lang-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="light"] .lang-btn:hover {
  background: #f1f5f9;
}

[data-theme="light"] .lang-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .lang-dropdown a {
  color: #475569;
}

[data-theme="light"] .lang-dropdown a:hover,
[data-theme="light"] .lang-dropdown a.active {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .input-wrapper {
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .input-wrapper:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .btn-paste {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .btn-paste:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .btn-submit {
  color: #ffffff;
}

[data-theme="light"] .btn-submit:hover {
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .thumbnail-wrapper {
  background: #f1f5f9;
}

[data-theme="light"] .btn-download {
  color: #ffffff;
}

[data-theme="light"] .btn-download:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .btn-download.btn-audio {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .btn-download.btn-audio:hover {
  background: #e2e8f0;
}

[data-theme="light"] .btn-download.btn-subtitle {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .btn-download.btn-subtitle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .step-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .step-num {
  color: #ffffff;
}

[data-theme="light"] .faq-question:hover {
  color: #10b981;
}

[data-theme="light"] .faq-item.active .faq-arrow {
  fill: #10b981;
}

[data-theme="light"] .spinner {
  border-color: rgba(16, 185, 129, 0.1);
  border-top-color: #10b981;
  border-bottom-color: #059669;
}

[data-theme="light"] .bg-glow {
  opacity: 0.05;
}

/* Theme Toggle Button Style */
.theme-toggle-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-toggle-btn {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #f1f5f9;
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Switcher Dropdown Style */
.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.platform-dropdown {
  position: relative;
}

.platform-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .platform-btn:hover {
  background: #f1f5f9;
}

.platform-btn .arrow-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: var(--transition);
}

.platform-dropdown.open .arrow-icon {
  transform: rotate(180deg);
}

.platform-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #141620;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  min-width: 200px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 110;
}

[data-theme="light"] .platform-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.platform-menu.show {
  display: flex;
}

.platform-menu a {
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.platform-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

[data-theme="light"] .platform-menu a {
  color: #475569;
}

[data-theme="light"] .platform-menu a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.platform-menu a.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

[data-theme="light"] .platform-menu a.active {
  color: #10b981;
}


/* Hub Specific Styles */
.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 22px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  font-weight: 700;
  transform: translateY(-1px);
}

/* Light mode specific tab enhancements */
[data-theme="light"] .tab-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .tab-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

@media (max-width: 640px) {
  .tool-tabs {
    gap: 6px 8px;
    margin-bottom: 18px;
  }
  .tab-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* Platform Matrix Cards */
.platform-matrix-section {
  margin: 60px 0 40px;
}

.section-heading {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.section-subheading {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.platform-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.platform-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.15);
}

.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.popular-badge {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

.fast-badge {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.tiktok-icon-bg {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #ffffff;
}

.instagram-icon-bg {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
}

.twitter-icon-bg {
  background: linear-gradient(135deg, #1d9bf0 0%, #0c7abf 100%);
  color: #ffffff;
}

.facebook-icon-bg {
  background: linear-gradient(135deg, #1877f2 0%, #0d5ec4 100%);
  color: #ffffff;
}

.reddit-icon-bg {
  background: linear-gradient(135deg, #ff4500 0%, #cc3700 100%);
  color: #ffffff;
}

.pinterest-icon-bg {
  background: linear-gradient(135deg, #e60023 0%, #b3001b 100%);
  color: #ffffff;
}

.threads-icon-bg {
  background: linear-gradient(135deg, #101010 0%, #282828 100%);
  color: #ffffff;
}

.xiaohongshu-icon-bg {
  background: linear-gradient(135deg, #ff2442 0%, #e0122e 100%);
  color: #ffffff;
}

.douyin-icon-bg {
  background: linear-gradient(135deg, #161823 0%, #000000 100%);
  color: #00f2fe;
}

.platform-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.platform-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.card-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-cta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.platform-card:hover .card-cta {
  gap: 10px;
}

/* Features Section */
.features-section {
  margin: 70px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px 24px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer layout */
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2.5fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 320px;
}

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

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}


/* --- Inline Video Preview Player --- */
.thumbnail-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.btn-play-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 2px solid var(--primary);
  border-radius: 50px;
  padding: 12px 24px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.btn-play-preview svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

.btn-play-preview:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--primary);
  color: #fff;
}

.btn-play-preview:hover svg {
  fill: #fff;
}

#inline-video-player {
  width: 100%;
  max-height: 480px;
  border-radius: 16px;
  display: block;
  background: #000;
}

/* --- Carousel & Photo Gallery Section --- */
.gallery-section {
  max-width: 960px;
  margin: 30px auto 0;
  
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

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

.btn-download-all {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-download-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

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

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item-footer {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
}

.gallery-item-footer span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-item-download {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-item-download:hover {
  opacity: 0.9;
}

/* --- PWA Install Banner --- */
.pwa-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
  width: 420px;
}

.pwa-banner.show {
  transform: translateX(-50%) translateY(0);
}

.pwa-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.pwa-info {
  flex-grow: 1;
}

.pwa-info h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pwa-info p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pwa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pwa-install {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-pwa-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

/* ==========================================================================
   Shared long-form / guide styles
   --------------------------------------------------------------------------
   These were originally duplicated as an inline style block in each of the
   9 tutorial pages under the platform folders. Four long-tail pages (instagram-reels,
   tiktok-mp3, tiktok-story, twitter-gif) use the same markup but never carried
   the definition, so their "Related Guides" grid rendered as unstyled links.
   Promoted here once so every page gets it. The per-page inline copies still
   win by source order (they come after this file), which is fine — the rules
   are identical.
   ========================================================================== */
.breadcrumb{font-size:.85rem;color:var(--text-secondary);margin:18px 0 6px}
.breadcrumb a{color:var(--text-secondary);text-decoration:none}
.breadcrumb a:hover{color:var(--accent-cyan)}
.guide-article{max-width:860px;margin:10px auto 30px;line-height:1.75;color:var(--text-primary)}
.guide-article h2{font-family:var(--font-title);font-size:1.5rem;margin:2.2rem 0 .9rem}
.guide-article h3{font-family:var(--font-title);font-size:1.15rem;margin:1.6rem 0 .6rem}
.guide-article p{color:var(--text-secondary);margin:.7rem 0}
.guide-article ul,.guide-article ol{color:var(--text-secondary);margin:.7rem 0 .9rem 1.4rem}
.guide-article li{margin:.35rem 0}
.guide-article a{color:var(--accent-cyan)}
.guide-article code{background:var(--card-bg);border:1px solid var(--card-border);border-radius:6px;padding:1px 6px;font-size:.9em}
.guide-article table{width:100%;border-collapse:collapse;margin:1rem 0;font-size:.95rem}
.guide-article th,.guide-article td{border:1px solid var(--card-border);padding:9px 12px;text-align:left;color:var(--text-secondary)}
.guide-article th{color:var(--text-primary);background:var(--card-bg)}
.tip-box{background:var(--card-bg);border:1px solid var(--card-border);border-left:4px solid var(--accent-cyan);border-radius:var(--radius-md);padding:14px 18px;margin:1.1rem 0}
.tip-box p{margin:.2rem 0}
.related-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:1rem 0}
.related-card{display:block;background:var(--card-bg);border:1px solid var(--card-border);border-radius:var(--radius-lg);padding:18px 20px;text-decoration:none;transition:var(--transition)}
.related-card:hover{border-color:var(--accent-cyan);transform:translateY(-2px)}
.related-card h3{color:var(--text-primary);font-size:1rem;margin:0 0 6px}
.related-card p{color:var(--text-secondary);font-size:.88rem;margin:0}
.cta-box{text-align:center;background:var(--card-bg);border:1px solid var(--card-border);border-radius:var(--radius-lg);padding:26px 20px;margin:2rem 0}
.cta-box .btn-submit{display:inline-block;width:auto;text-decoration:none}
.guides-nav a.related-card{text-decoration:none}
