/* ============================================
   TikDown - Premium TikTok Downloader
   Design System & Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Colors */
  --primary-400: #8b5cf6;
  --primary-500: #7c3aed;
  --primary-600: #6d28d9;
  --primary-700: #5b21b6;

  --accent-400: #e879f9;
  --accent-500: #d946ef;
  --accent-600: #c026d3;

  --blue-400: #60a5fa;
  --blue-500: #3b82f6;

  --success-500: #22c55e;
  --error-500: #ef4444;

  /* Neutral */
  --bg-primary: #0f0f14;
  --bg-secondary: #16161d;
  --bg-card: #1c1c27;
  --bg-card-hover: #22222f;
  --bg-input: #1a1a25;

  --text-primary: #f1f1f6;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b82;

  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #d946ef 50%, #3b82f6 100%);
  --gradient-hero: linear-gradient(160deg, #1a0533 0%, #0f0f14 30%, #0d1117 60%, #130828 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(217, 70, 239, 0.04));
  --gradient-button: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #d946ef 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.2);
  --shadow-glow-strong: 0 0 60px rgba(124, 58, 237, 0.35);

  /* Layout */
  --container-width: 1200px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Header Backgrounds */
  --bg-header: rgba(15, 15, 20, 0.75);
  --bg-header-scrolled: rgba(15, 15, 20, 0.92);
}

/* --- Light Theme Variables --- */
[data-theme="light"] {
  /* Neutral Light Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);

  /* Light Theme Gradients */
  --gradient-hero: linear-gradient(160deg, #f3e8ff 0%, #f8fafc 30%, #f1f5f9 60%, #e0e7ff 100%);
  --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(217, 70, 239, 0.02));

  /* Lighter Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Header Backgrounds */
  --bg-header: rgba(255, 255, 255, 0.75);
  --bg-header-scrolled: rgba(255, 255, 255, 0.92);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-400);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input {
  font-family: inherit;
  font-size: inherit;
}

.hidden {
  display: none !important;
}

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

/* --- Header --- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

#header.scrolled {
  background: var(--bg-header-scrolled);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-base);
}

.logo:hover {
  transform: scale(1.03);
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

/* Language Selector */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.lang-toggle,
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-toggle:hover,
.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: -10px;
  width: max-content;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.lang-option:hover {
  background: var(--bg-tertiary);
}

.lang-option.active {
  background: rgba(108, 43, 217, 0.1);
  color: var(--accent-primary);
  font-weight: 600;
}

.lang-flag {
  font-size: 1.1rem;
}

/* --- Mobile Menu Toggle --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: calc(var(--header-height) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.5), transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.4), transparent 70%);
  bottom: 10%;
  left: -10%;
  animation-delay: -7s;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
  top: 40%;
  right: 20%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 780px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.gradient-text {
  background: var(--gradient-primary);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

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

/* --- Download Form --- */
.download-form {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 4px 4px 4px 16px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.input-container:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), var(--shadow-md);
}

.input-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-right: 12px;
}

.input-container input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 16px 0;
  min-width: 0;
}

.input-container input::placeholder {
  color: var(--text-muted);
}

/* Paste & Clear Buttons */
.btn-paste,
.btn-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-paste:hover,
.btn-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-clear {
  padding: 10px 12px;
}

/* Download Button */
.btn-download {
  flex-shrink: 0;
  padding: 0 36px;
  background: var(--gradient-button);
  background-size: 200% 200%;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 58px;
}

.btn-download::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.45);
  background-position: 100% 0;
}

.btn-download:hover::before {
  opacity: 1;
}

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

.btn-download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-download .btn-text,
.btn-download .btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.spinner {
  animation: spin 1s linear infinite;
}

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

/* --- Error Message --- */
.error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: #fca5a5;
  font-size: 0.9rem;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* --- Result Section --- */
.result-section {
  max-width: 800px;
  animation: fadeInUp 0.5s ease-out;
}

/* --- Result Card --- */
.result-card {
  margin-top: 32px;
  animation: fadeInUp 0.5s ease-out;
}

.result-inner {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  text-align: left;
}

.result-preview {
  flex-shrink: 0;
  position: relative;
  width: 200px;
  border-radius: 14px;
  overflow: hidden;
}

.result-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  aspect-ratio: 9 / 16;
}

.result-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.result-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-500);
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.author-username {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.result-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.result-music {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 10px;
}

/* Download Buttons */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn-dl-primary {
  background: var(--gradient-button);
  background-size: 200% 200%;
  color: white;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.btn-dl-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
  color: white;
  background-position: 100% 0;
}

.btn-dl-hd {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

.btn-dl-hd:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(5, 150, 105, 0.4);
  color: white;
}

.btn-dl-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-dl-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-dl-audio {
  background: rgba(217, 70, 239, 0.1);
  border: 1px solid rgba(217, 70, 239, 0.2);
  color: var(--accent-400);
}

.btn-dl-audio:hover {
  background: rgba(217, 70, 239, 0.18);
  border-color: rgba(217, 70, 239, 0.35);
  color: var(--accent-400);
  transform: translateY(-1px);
}

/* --- Hero Wave --- */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
  pointer-events: none;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

/* --- Mode Tabs --- */
.mode-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 5px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.8s ease-out 0.25s both;
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-base);
  flex: 1;
  justify-content: center;
}

.mode-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.mode-tab.active {
  color: white;
  background: var(--gradient-button);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.mode-panel {
  animation: fadeInUp 0.4s ease-out;
}

/* --- Bulk Download Form --- */
.bulk-input-area {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.bulk-input-area:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), var(--shadow-md);
}

.bulk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#bulk-urls {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 12px 18px;
  resize: vertical;
  min-height: 140px;
  max-height: 400px;
}

#bulk-urls::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.bulk-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.bulk-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bulk-counter.has-links {
  color: var(--primary-400);
}

.bulk-actions {
  display: flex;
  gap: 4px;
}

.btn-bulk-paste,
.btn-bulk-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-bulk-paste:hover,
.btn-bulk-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-bulk-download {
  width: 100%;
}

.btn-bulk-download .btn-text {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* --- Bulk Progress --- */
.bulk-progress {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  animation: fadeInUp 0.4s ease-out;
}

.bulk-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bulk-progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-progress-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bulk-progress-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-400);
  background: rgba(124, 58, 237, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
}

.btn-bulk-cancel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fca5a5;
  transition: all var(--transition-fast);
}

.btn-bulk-cancel:hover {
  background: rgba(239, 68, 68, 0.1);
}

.bulk-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.bulk-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
  animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Bulk Queue --- */
.bulk-queue {
  margin-top: 16px;
  animation: fadeInUp 0.4s ease-out;
}

.bulk-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bulk-queue-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.btn-download-all-ready {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--gradient-button);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.btn-download-all-ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.bulk-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Queue Item */
.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: all var(--transition-base);
  animation: fadeInUp 0.3s ease-out;
}

.queue-item:hover {
  border-color: var(--border-hover);
}

.queue-item.status-done {
  border-color: rgba(34, 197, 94, 0.15);
}

.queue-item.status-error {
  border-color: rgba(239, 68, 68, 0.15);
}

.queue-item.status-processing {
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.08);
}

.queue-item-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.queue-item-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

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

.queue-item-info {
  flex: 1;
  min-width: 0;
}

.queue-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.queue-item-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.status-badge.processing {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-400);
}

.status-badge.processing svg {
  animation: spin 1s linear infinite;
}

.status-badge.done {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.queue-item-actions {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

.queue-dl-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.queue-dl-btn.mp4 {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-400);
}

.queue-dl-btn.mp4:hover {
  background: rgba(124, 58, 237, 0.22);
  color: var(--primary-400);
}

.queue-dl-btn.mp3 {
  background: rgba(217, 70, 239, 0.1);
  color: var(--accent-400);
}

.queue-dl-btn.mp3:hover {
  background: rgba(217, 70, 239, 0.2);
  color: var(--accent-400);
}

/* --- Profile Scraper --- */
.profile-card {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  animation: fadeInUp 0.5s ease-out;
  text-align: left;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-500);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-username {
  font-size: 0.85rem;
  color: var(--primary-400);
  font-weight: 600;
}

.profile-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scrape Options */
.scrape-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.scrape-option-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.scrape-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 220px;
}

.scrape-slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-pink));
  outline: none;
}

.scrape-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}

.scrape-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.scrape-slider-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-400);
  min-width: 28px;
  text-align: center;
}

/* Profile Stats Row */
.profile-stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.profile-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Profile Controls */
.profile-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-video-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-selected-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-400);
  background: rgba(124, 58, 237, 0.1);
  padding: 4px 12px;
  border-radius: 8px;
}

.profile-controls-right {
  display: flex;
  gap: 6px;
}

.btn-select-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
}

.btn-select-action:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.video-grid::-webkit-scrollbar {
  width: 6px;
}
.video-grid::-webkit-scrollbar-track {
  background: transparent;
}
.video-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.video-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  background: var(--bg-secondary);
  aspect-ratio: 9 / 13;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-card.selected {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2), 0 8px 24px rgba(124, 58, 237, 0.15);
}

.video-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  opacity: 0;
}

.video-card:hover .video-card-checkbox,
.video-card.selected .video-card-checkbox {
  opacity: 1;
}

.video-card.selected .video-card-checkbox {
  background: var(--primary-500);
  border-color: var(--primary-500);
}

.video-card-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.video-card-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.video-card-duration {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
}

.video-card-plays {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
}

/* Download Selected Bar */
.profile-download-bar {
  padding-top: 4px;
}

.btn-download-selected {
  width: 100%;
}

.btn-download-selected .btn-text {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* --- Features Section --- */
.features {
  padding: 80px 0 100px;
  background: var(--bg-primary);
}

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

.feature-card {
  position: relative;
  padding: 40px 32px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-align: center;
  transition: all var(--transition-slow);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border-radius: 18px;
  transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-icon-purple {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-400);
}

.feature-icon-pink {
  background: rgba(217, 70, 239, 0.12);
  color: var(--accent-400);
}

.feature-icon-blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-400);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

/* --- Section Titles --- */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

/* --- How To Section --- */
.how-to {
  padding: 100px 0;
  background: var(--bg-secondary);
  position: relative;
}

.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.step-card {
  flex: 1;
  max-width: 320px;
  text-align: center;
  padding: 40px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  position: relative;
  transition: all var(--transition-slow);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.15);
  box-shadow: var(--shadow-glow);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--gradient-button);
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.step-icon {
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0.6;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  opacity: 0.3;
  padding-top: 60px;
  flex-shrink: 0;
}

/* --- Benefits Section --- */
.benefits {
  padding: 100px 0;
  background: var(--bg-primary);
}

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

.benefit-item {
  display: flex;
  gap: 16px;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: all var(--transition-slow);
}

.benefit-item:hover {
  border-color: rgba(124, 58, 237, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.benefit-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary-400);
}

.benefit-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.benefit-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- FAQ Section --- */
.faq {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.faq-item.active {
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

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

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Footer --- */
#footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 6px 0;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-400);
  transform: translateX(4px);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ============================================
   Responsive Design
   ============================================ */

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

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 20, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .nav-link {
    font-size: 1.2rem;
    padding: 14px 32px;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--header-height) + 30px);
    min-height: auto;
    padding-bottom: 120px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    margin-bottom: 32px;
    font-size: 0.95rem;
  }

  .hero-subtitle br {
    display: none;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .btn-download {
    min-height: 54px;
    border-radius: 14px;
  }

  .btn-paste span {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 28px 24px;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    transform: rotate(90deg);
    padding: 0;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Result card responsive */
  .result-inner {
    flex-direction: column;
    padding: 16px;
  }

  .result-preview {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .result-thumbnail {
    aspect-ratio: 9 / 12;
  }

  /* Bulk responsive */
  .queue-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .queue-item-info {
    min-width: calc(100% - 60px);
  }

  .queue-item-status {
    width: 100%;
    justify-content: flex-start;
  }

  .queue-item-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .queue-dl-btn {
    flex: 1;
    justify-content: center;
  }

  .mode-tab {
    font-size: 0.82rem;
    padding: 10px 16px;
  }

  .bulk-progress-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  /* Profile responsive */
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-controls-left,
  .profile-controls-right {
    justify-content: center;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }

  .video-card-checkbox {
    opacity: 1;
  }

  .mode-tab {
    padding: 10px 12px;
    font-size: 0.78rem;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 0.88rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .step-card {
    padding: 32px 20px;
  }

  .faq-question {
    font-size: 0.88rem;
    padding: 16px 18px;
  }

  .faq-answer p {
    padding: 0 18px 16px;
    font-size: 0.85rem;
  }

  .mode-tab svg {
    display: none;
  }

  .bulk-input-footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Selection --- */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: white;
}

/* --- Content Pages (About, Privacy, etc.) --- */
.content-page {
  padding: calc(var(--header-height) + 60px) 24px 80px;
  min-height: 100vh;
  background: var(--bg-primary);
}

.content-header {
  text-align: center;
  margin-bottom: 50px;
}

.content-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.content-body {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
}

.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 30px 0 15px;
  color: var(--primary-400);
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 25px 0 10px;
  color: var(--text-primary);
}

.content-body p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-body ul, .content-body ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 20px;
}

.content-body li {
  margin-bottom: 8px;
}

.content-body a {
  color: var(--accent-pink);
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-500);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 10px;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* --- Global Footer --- */
.site-footer {
  background: rgba(10, 10, 14, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 60px 24px 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: var(--container-width);
  margin: 0 auto 40px;
}

.footer-col-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-col-brand {
    grid-column: span 2;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Blog Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.blog-thumb {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-thumb svg {
  width: 64px;
  height: 64px;
  opacity: 0.2;
}

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

.blog-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-readmore svg {
  transition: transform 0.3s ease;
}

.blog-readmore:hover svg {
  transform: translateX(4px);
}

/* Article Page */
.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.article-meta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}

.article-body h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: var(--text-primary);
}

.article-author-box {
  margin-top: 4rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid var(--border-color);
}

.article-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
}

.article-author-info h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.article-author-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Download Settings Card & Options */
.download-settings-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 24px;
  margin: 0 auto 32px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  text-align: left;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

[data-theme="light"] .download-settings-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

.settings-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color, #ff0050);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-title-container svg {
  animation: spin 12s linear infinite;
}

.settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-primary);
  user-select: none;
  position: relative;
}

.settings-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

[data-theme="light"] .custom-checkbox {
  background-color: rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(0, 0, 0, 0.25);
}

.settings-option:hover input ~ .custom-checkbox {
  border-color: var(--primary-color, #ff0050);
  box-shadow: 0 0 8px rgba(255, 0, 80, 0.3);
}

.settings-option input:checked ~ .custom-checkbox {
  background-color: var(--primary-color, #ff0050);
  border-color: var(--primary-color, #ff0050);
  box-shadow: 0 0 12px rgba(255, 0, 80, 0.4);
}

.custom-checkbox::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.settings-option input:checked ~ .custom-checkbox::after {
  display: block;
}

/* Loading Spin Animation for ZIP downloads */
.btn-loading {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

