/* ==========================================================================
   TrollTube — Modern Multi-Platform Video Downloader
   Clean, Lightweight, Accessible CSS3 with Dark/Light Theme System
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Light Theme Colors */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-text: #ffffff;
  
  --accent: #0284c7;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1200px;
}

[data-theme="dark"] {
  --bg-body: #0b1120;
  --bg-surface: #131d35;
  --bg-surface-alt: #1a2744;
  --bg-input: #0f172a;
  --border: #233354;
  --border-focus: #60a5fa;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e293b;
  --primary-text: #ffffff;
  
  --accent: #38bdf8;
  --success: #34d399;
  --success-bg: #064e3b;
  --danger: #f87171;
  --danger-bg: #450a0a;
  --warning: #fbbf24;
  --warning-bg: #451a03;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.45);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  background-color: var(--bg-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

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

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

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.main-content {
  flex: 1 0 auto;
  padding-bottom: 60px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.brand-name {
  display: flex;
  align-items: baseline;
}

.brand-name span {
  color: var(--primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-alt);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-alt);
}

.menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  color: var(--text-main);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 18px;
}

/* Downloader Tool Card */
.downloader-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.downloader-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.input-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.url-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.05rem;
  outline: none;
  padding: 10px 4px;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-subtle);
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-alt);
}

.btn-paste {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-paste:hover {
  background-color: var(--border);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--primary);
  color: var(--primary-text);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-download:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-download:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.legal-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

/* Loading State */
.loading-box {
  display: none;
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.loading-box.active {
  display: block;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

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

/* Error Box */
.error-box {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background-color: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.error-box.hidden {
  display: none !important;
}

.error-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Results Card */
.result-card {
  display: none;
  margin-top: 28px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.result-card.active {
  display: block;
}

.result-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .result-header {
    flex-direction: row;
  }
}

.result-thumb-wrapper {
  position: relative;
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-surface-alt);
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

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

.duration-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.result-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 8px;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 12px;
  word-break: break-word;
}

.formats-section {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.formats-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 14px;
}

.format-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .format-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

.format-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-alt);
  transition: var(--transition);
}

.format-item:hover {
  border-color: var(--primary);
  background-color: var(--bg-surface);
}

.format-info {
  display: flex;
  flex-direction: column;
}

.format-quality {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.format-ext {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.btn-format-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-format-dl:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-direct-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.btn-direct-link:hover {
  background-color: var(--bg-surface-alt);
  color: var(--primary);
  border-color: var(--primary);
}

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

.spin-icon {
  animation: spin-anim 0.8s linear infinite;
}

/* Platform Shortcut Badges / Cards with Small Icons */
.platform-shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  max-width: 860px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 4px 8px;
}

.platform-shortcuts::-webkit-scrollbar {
  display: none;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-height: 38px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.platform-chip:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--primary);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.12);
}

.platform-chip:active {
  transform: scale(0.97);
}

.platform-chip.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

/* Small Platform Icons */
.chip-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.platform-chip:hover .chip-icon {
  transform: scale(1.12);
}

.chip-icon.all-icon { color: var(--text-muted); }
.chip-icon.fb-icon { color: #1877f2; }
.chip-icon.ig-icon { color: #e1306c; }
.chip-icon.tt-icon { color: #fe2c55; }
.chip-icon.pin-icon { color: #e60023; }
.chip-icon.x-icon { color: var(--text-main); }
[data-theme="dark"] .chip-icon.x-icon { color: #ffffff; }

/* Platform Tools Grid (Homepage) */
.tools-section {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 10px;
}

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

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

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

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.5rem;
  background-color: var(--primary-light);
  color: var(--primary);
}

.tool-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.tool-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* Editorial / Long-form SEO Content */
.article-section {
  padding: 48px 0;
}

.article-content {
  max-width: 860px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-top: 36px;
  margin-bottom: 16px;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.article-content ol, .article-content ul {
  padding-left: 24px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 10px;
  font-size: 1.025rem;
  line-height: 1.6;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0 36px;
}

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

.step-card {
  padding: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-section {
  padding: 48px 0;
  background-color: var(--bg-surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

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

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

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

.faq-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-item.active .faq-content {
  display: block;
}

/* Keywords Tags Cloud */
.tags-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.tags-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Monetization Ad Slots */
.ad-slot {
  margin: 24px auto;
  padding: 16px;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  max-width: 728px;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.ad-placeholder {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* Social Bar Overlay (Dismissible) */
.social-bar-overlay {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 40;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 380px;
  animation: slideUp 0.3s ease-out;
}

.social-bar-overlay.dismissed {
  display: none !important;
}

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

.social-bar-text {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.4;
}

.social-bar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.social-bar-close:hover {
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
}

/* Global Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

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

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 12px;
  max-width: 320px;
  line-height: 1.5;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

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

.footer-link {
  color: var(--text-muted);
  font-size: 0.925rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Responsive adjustments & Mobile Comfort UI */
@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 60px;
  }
  .header-inner {
    height: 60px;
  }
  .brand-link {
    font-size: 1.2rem;
    gap: 8px;
  }
  .brand-logo-icon {
    width: 32px;
    height: 32px;
  }
  .theme-toggle-btn, .menu-toggle-btn {
    width: 38px;
    height: 38px;
  }
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .hero-section {
    padding: 24px 0 16px;
  }
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .hero-subtitle {
    font-size: 0.925rem;
    margin-bottom: 18px;
    line-height: 1.5;
  }
  .hero-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  /* Mobile Platform Bar with Small Icons */
  .platform-shortcuts {
    justify-content: flex-start;
    padding: 2px 2px 10px;
    margin: 12px 0 18px;
    gap: 6px;
  }
  .platform-chip {
    padding: 6px 11px;
    font-size: 0.78rem;
    min-height: 34px;
    gap: 5px;
  }
  .chip-icon {
    width: 14px;
    height: 14px;
  }

  /* Mobile Downloader Box & Input */
  .downloader-box {
    padding: 14px 12px;
    border-radius: var(--radius-md);
  }
  .input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
    border-radius: var(--radius-sm);
  }
  .url-input {
    font-size: 16px !important; /* Critical: prevents iOS Safari auto-zoom */
    padding: 8px 4px;
    width: 100%;
    min-height: 42px;
  }
  .input-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .btn-icon {
    width: 40px;
    height: 40px;
  }
  .btn-paste {
    flex: 1;
    min-height: 42px;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0 12px;
  }
  .btn-download {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1.02rem;
    font-weight: 700;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .legal-notice {
    font-size: 0.78rem;
    margin-top: 10px;
  }

  /* Result Card Mobile Comfort */
  .result-card {
    padding: 14px 12px;
    margin-top: 20px;
  }
  .result-thumb-wrapper {
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
  .result-title {
    font-size: 1.05rem;
    margin-bottom: 8px;
  }
  .format-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .format-info {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .format-actions {
    width: 100%;
  }
  .btn-format-dl {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    font-size: 0.95rem;
  }
  .btn-direct-link {
    min-height: 46px;
    padding: 0 14px;
  }
  .btn-download-another {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .social-bar-overlay {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* Reset / Download Another Video Button */
.result-reset-wrapper {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-download-another {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 106, 255, 0.25);
}

.btn-download-another:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 106, 255, 0.35);
}

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

/* Adsterra 320x50 Banner Slot Styling */
.ad-banner-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 18px auto;
  text-align: center;
  width: 100%;
  max-width: 340px;
  min-height: 56px;
}

.ad-banner-slot iframe {
  width: 320px;
  height: 50px;
  border: 0;
  overflow: hidden;
  display: block;
}
