/* =========================================================
   SnapTikTok HD - Modern Dark / Glassmorphism Stylesheet
   ========================================================= */

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12141e;
  --bg-card: rgba(22, 25, 38, 0.75);
  --bg-card-hover: rgba(30, 35, 52, 0.85);
  --bg-input: rgba(14, 17, 27, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #00f2fe;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --gradient-brand: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #8b5cf6 100%);
  --gradient-glow: linear-gradient(135deg, rgba(0, 242, 254, 0.4), rgba(139, 92, 246, 0.4));
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  --gradient-btn-hd: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  --gradient-btn-sd: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  --gradient-btn-audio: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.4);
  --border-card: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(0, 242, 254, 0.25);
  --shadow-purple-glow: 0 0 40px rgba(139, 92, 246, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}

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

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition-fast);
}

.text-cyan { color: var(--accent-cyan) !important; }

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Background Atmosphere */
.bg-glow-orb {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.bg-orb-1 {
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-cyan), var(--accent-purple));
}

.bg-orb-2 {
  bottom: 10%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-pink), var(--accent-purple));
  opacity: 0.15;
}

.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}

/* Top Ad Leaderboard */
.top-ad-wrapper {
  background: rgba(8, 9, 14, 0.9);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 101;
}

.ad-box-slot {
  position: relative;
  text-align: center;
}

.ad-top-leaderboard {
  max-width: 728px;
  margin: 0 auto;
}

.ad-pill-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.ad-content-placeholder {
  min-height: 80px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-wrap {
  width: 42px;
  height: 42px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #000;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.logo-sparkle {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 14px;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 6px;
  border: 1px solid var(--accent-cyan);
  border-radius: 6px;
  line-height: 1;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-history {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  position: relative;
}

.btn-history:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.history-badge {
  background: var(--accent-cyan);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 50px 0 30px;
  text-align: center;
}

.hero-container {
  max-width: 860px;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

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

.hero-subtitle strong {
  color: var(--text-primary);
}

/* Downloader Form Card */
.downloader-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.downloader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

.downloader-form {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.url-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 110px 16px 48px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition-fast);
}

.url-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(18, 22, 35, 0.95);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

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

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

.btn-input-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-input-action:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

.btn-paste {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.25);
}

.btn-paste:hover {
  background: rgba(0, 242, 254, 0.2);
}

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

.btn-primary-download {
  background: var(--gradient-brand);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.btn-primary-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.5);
}

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

.downloader-tip {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Loading Panel */
.loading-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  margin-top: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease-out;
}

.loading-spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

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

.loading-title {
  font-size: 20px;
  margin-bottom: 6px;
}

.loading-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.loading-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.step-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-badge.active {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.step-badge.pulse {
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.4);
  background: rgba(0, 242, 254, 0.1);
}

/* Error Banner */
.error-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 24px;
  text-align: left;
  animation: shake 0.4s ease-in-out;
}

.error-icon {
  font-size: 24px;
  color: #ef4444;
}

.error-content {
  flex: 1;
}

.error-title {
  color: #f87171;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.error-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.error-close {
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
}

.error-close:hover {
  color: #fff;
}

/* Result Card */
.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 28px;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  text-align: left;
  animation: fadeInUp 0.4s ease-out;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

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

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.author-name {
  font-size: 16px;
  font-weight: 700;
}

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

.btn-new-search {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-new-search:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-active);
}

.result-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.video-preview-wrapper {
  width: 100%;
}

.video-container {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

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

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.photo-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.video-desc-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-pill i {
  color: var(--accent-cyan);
}

/* Action Buttons Stack */
.download-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: #fff;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  position: relative;
}

.btn-hd-nowatermark {
  background: var(--gradient-btn-hd);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-hd-nowatermark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 242, 254, 0.55);
}

.ad-tag-pill {
  background: rgba(0, 0, 0, 0.4);
  color: #facc15;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  margin-right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-sd-video {
  background: var(--gradient-btn-sd);
}

.btn-sd-video:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-mp3-audio {
  background: var(--gradient-btn-audio);
}

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

.action-btn-icon {
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 14px;
  flex-shrink: 0;
}

.action-btn-text {
  flex: 1;
}

.btn-main-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.btn-sub-label {
  display: block;
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.download-icon-right {
  font-size: 16px;
  opacity: 0.8;
  margin-left: 10px;
}

.secondary-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-secondary-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* =========================================================
   Ad Gate Modal Styles (Rewarded Ad View for Full HD)
   ========================================================= */
.ad-gate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.ad-gate-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: var(--shadow-md), 0 0 50px rgba(0, 242, 254, 0.2);
  text-align: center;
  animation: fadeInUp 0.3s ease-out;
}

.ad-gate-header {
  margin-bottom: 18px;
}

.ad-gate-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  margin-bottom: 6px;
}

.ad-gate-title-wrap h3 {
  font-size: 20px;
  font-weight: 800;
}

.ad-gate-sub {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
}

.modal-ad-box {
  margin: 16px 0;
}

.modal-ad-placeholder {
  min-height: 250px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 8px;
}

.modal-ad-placeholder i {
  font-size: 36px;
  margin-bottom: 4px;
}

.ad-small-text {
  font-size: 11px;
  color: var(--text-muted);
}

.ad-timer-container {
  margin: 18px 0;
}

.ad-timer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.countdown-badge {
  background: var(--accent-cyan);
  color: #000;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
}

.ad-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.ad-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 4px;
  transition: width 1s linear;
}

.ad-gate-footer {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-cancel-ad {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-cancel-ad:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-claim-download {
  flex: 1;
  background: var(--gradient-brand);
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

.btn-claim-download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(1);
}

/* Mid Page Ad */
.mid-ad-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
}

.ad-mid-banner {
  max-width: 728px;
  margin: 0 auto;
}

/* Ad Banner Placeholders */
.ad-banner-slot {
  margin: 36px auto 0;
  max-width: 728px;
}

.ad-placeholder-box {
  height: 90px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Floating Mobile Sticky Bottom Ad */
.mobile-sticky-ad-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 11, 16, 0.95);
  border-top: 1px solid rgba(0, 242, 254, 0.3);
  backdrop-filter: blur(16px);
  z-index: 150;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

.sticky-ad-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.close-sticky-ad {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
}

/* Features Section */
.features-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

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

.section-tag {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-card);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.cyan-glow { background: rgba(0, 242, 254, 0.12); color: var(--accent-cyan); }
.purple-glow { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.emerald-glow { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.orange-glow { background: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
.pink-glow { background: rgba(236, 72, 153, 0.12); color: var(--accent-pink); }
.blue-glow { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.feature-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 3-Steps Section */
.steps-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.step-number {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.06);
}

.step-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-brand);
  color: #000;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* FAQ Accordion */
.faq-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

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

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

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

.faq-question {
  width: 100%;
  background: transparent;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

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

/* Download History Drawer */
.history-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease-out;
}

.history-drawer {
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.drawer-header h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-clear-history {
  background: transparent;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
}

.btn-close-drawer {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  align-items: center;
}

.history-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.history-info {
  flex: 1;
  overflow: hidden;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-author {
  font-size: 11px;
  color: var(--text-muted);
}

.history-download-btn {
  background: var(--gradient-brand);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.empty-history {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 14px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 60px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInUp 0.3s ease-out;
}

.toast.success { border-color: var(--accent-emerald); }
.toast.success i { color: var(--accent-emerald); }
.toast.error { border-color: #ef4444; }
.toast.error i { color: #ef4444; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  background: #07080c;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 80px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 30px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
}

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

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.disclaimer-text {
  margin-bottom: 12px;
}

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

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

/* Responsive Media Queries */
@media (max-width: 960px) {
  .features-grid, .steps-grid {
    grid-template-columns: 1fr;
  }

  .result-body {
    grid-template-columns: 1fr;
  }

  .video-container {
    height: 420px;
  }
}

@media (max-width: 680px) {
  .hero-title {
    font-size: 32px;
  }

  .downloader-form {
    flex-direction: column;
  }

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

  .nav-links .nav-link {
    display: none;
  }

  .footer-top {
    flex-direction: column;
  }
}

/* =========================================================
   ANTIGRAVITY THEME & ZERO-G INTERACTIVE PHYSICS STYLES
   ========================================================= */

/* Fixed Antigravity Canvas Layer */
.antigravity-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Antigravity Navbar Mode Button */
.btn-antigravity-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-full);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.btn-antigravity-mode:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
}

.btn-antigravity-mode .zero-g-icon {
  font-size: 14px;
  animation: zeroGAstronaut 3s ease-in-out infinite alternate;
}

.btn-antigravity-mode .zero-g-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: zeroGPulse 1.5s infinite;
}

/* 3D Antigravity Floating & Tilt Cards */
[data-tilt="antigravity"] {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  will-change: transform;
}

[data-tilt="antigravity"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

[data-tilt="antigravity"]:hover::after {
  opacity: 1;
}

/* Continuous Subtle Zero-G Ambient Levitation */
.antigravity-levitate {
  animation: zeroGLevitate 4s ease-in-out infinite alternate;
}

.antigravity-bob {
  animation: zeroGBob 3s ease-in-out infinite alternate;
}

.antigravity-float-slow {
  animation: zeroGFloatSlow 6s ease-in-out infinite alternate;
}

.antigravity-float-fast {
  animation: zeroGFloatFast 4.5s ease-in-out infinite alternate-reverse;
}

/* Glowing text aura */
.antigravity-glow-text {
  text-shadow: 0 0 35px rgba(0, 242, 254, 0.4), 0 0 70px rgba(139, 92, 246, 0.2);
}

/* Enhanced Downloader Card Hover Glow */
.downloader-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.1);
  transition: all 0.3s ease;
}

.downloader-card:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 242, 254, 0.25), 0 0 80px rgba(139, 92, 246, 0.15);
  border-color: rgba(0, 242, 254, 0.35);
}

.url-input:focus {
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.3), inset 0 0 10px rgba(0, 242, 254, 0.1);
}

/* Feature Cards Glow on Hover */
.feature-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 242, 254, 0.2);
}

/* Antigravity Keyframe Animations */
@keyframes zeroGLevitate {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
  100% {
    transform: translateY(-4px) rotate(-1.5deg);
  }
}

@keyframes zeroGBob {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px);
  }
}

@keyframes zeroGFloatSlow {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) translateX(6px) rotate(2deg);
  }
  100% {
    transform: translateY(-8px) translateX(-4px) rotate(-1deg);
  }
}

@keyframes zeroGFloatFast {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) translateX(-8px) rotate(-2.5deg);
  }
  100% {
    transform: translateY(-20px) translateX(5px) rotate(1.5deg);
  }
}

@keyframes zeroGPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

@keyframes zeroGAstronaut {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-4px) rotate(8deg);
  }
}

