/* ==========================================================================
   INSTAFETCH SUITE - STYLESHEET WITH AD MONETIZATION UNITS
   Aesthetic: Ultra-Modern Dark Glassmorphism, Responsive SPA Layout
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Color System */
  --bg-dark: #08090d;
  --bg-card: rgba(18, 20, 29, 0.75);
  --bg-card-hover: rgba(25, 28, 41, 0.88);
  --bg-input: rgba(10, 12, 18, 0.8);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-focus: rgba(253, 29, 29, 0.4);

  /* Instagram Palette */
  --insta-purple: #833ab4;
  --insta-pink: #fd1d1d;
  --insta-orange: #fcb045;
  --insta-gradient: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  --insta-gradient-hover: linear-gradient(135deg, #9b45d4 0%, #ff3333 50%, #ffbd59 100%);

  /* Text Colors */
  --text-main: #f0f3f8;
  --text-muted: #8e99ac;
  --text-dim: #5a6474;

  /* Functional Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.3);

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 35px rgba(253, 29, 29, 0.18);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 90px; /* Space for sticky bottom anchor ad */
}

/* Ambient Background Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
}

.glow-1 { width: 500px; height: 500px; background: var(--insta-purple); top: -100px; left: -150px; }
.glow-2 { width: 600px; height: 600px; background: var(--insta-pink); top: 20%; right: -200px; }
.glow-3 { width: 450px; height: 450px; background: var(--insta-orange); bottom: 5%; left: 10%; }

/* Layout Container */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  position: relative;
  z-index: 1;
}

/* Header Navbar */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drawer-toggle-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  order: -1;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-md) !important;
  padding: 8px 12px !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.drawer-toggle-btn:hover {
  background: rgba(253, 29, 29, 0.15) !important;
  border-color: rgba(253, 29, 29, 0.4) !important;
}

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

.brand-logo-img {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(253, 29, 29, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-logo-img.small {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(253, 29, 29, 0.25);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .sub-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Glassmorphism Cards Base */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

/* SPA Panels Routing */
.view-panel {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.view-panel.active {
  display: block;
}

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

/* HOME VIEW HERO & FEATURE CARDS */
.home-hero {
  text-align: center;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-xl);
  color: #c084fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulseRing 1.5s infinite;
}

.home-hero h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-glass);
}

.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  touch-action: manipulation;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(253, 29, 29, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(253, 29, 29, 0.2);
}

.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--insta-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 20px;
}

.card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--insta-pink);
  font-weight: 700;
  font-size: 0.9rem;
}

.feature-card:hover .card-action svg {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* LEFT-TO-RIGHT SLIDE DRAWER SIDEBAR */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  transition: opacity 0.3s ease;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(290px, calc(100vw - 24px));
  height: 100vh;
  background: #0f111a;
  border-right: 1px solid var(--border-glass);
  z-index: 95;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  padding: 20px;
  overflow-y: auto;
}


.app-drawer.open {
  transform: translateX(0);
}

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

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin: 16px 0 6px 10px;
}

.drawer-link {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.drawer-link:hover,
.drawer-link.active {
  background: rgba(253, 29, 29, 0.12);
  color: #fff;
}

.drawer-link.active {
  border-left: 3px solid var(--insta-pink);
}

.drawer-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-badge {
  text-align: center;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* Form Inputs Grid */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.input-grid.single-col {
  grid-template-columns: 1fr;
}

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

.input-group label {
  font-size: 0.88rem;
  font-weight: 600;
}

.required { color: var(--insta-pink); }

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

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s ease;
}

.input-wrapper input:focus {
  border-color: var(--border-glass-focus);
}

.icon-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Buttons System */
.form-actions { display: flex; justify-content: flex-end; }

.btn-primary {
  background: var(--insta-gradient);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(253, 29, 29, 0.3);
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-xl);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-action:hover {
  background: rgba(253, 29, 29, 0.15);
  border-color: rgba(253, 29, 29, 0.4);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Status & Error Cards */
.status-card { border-left: 4px solid var(--insta-pink); display: flex; flex-direction: column; gap: 16px; }
.status-content { display: flex; align-items: center; gap: 16px; }
.status-indicator { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.status-dot { width: 12px; height: 12px; background: var(--insta-pink); border-radius: 50%; z-index: 2; }
.pulse-ring { position: absolute; width: 24px; height: 24px; background: rgba(253, 29, 29, 0.4); border-radius: 50%; animation: pulseRing 1.5s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.progress-bar-container { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 20%; background: var(--insta-gradient); border-radius: 4px; transition: width 0.4s ease; }

.error-card { background: var(--error-bg); border: 1px solid var(--error-border); display: flex; align-items: center; gap: 16px; color: #fca5a5; }
.error-icon { color: var(--error); flex-shrink: 0; }
.error-details h3 { font-size: 1rem; color: #fff; }

/* MEDIA RESULTS DISPLAY */
.media-results-card { display: flex; gap: 24px; align-items: center; }
.media-preview-container { width: 280px; max-height: 420px; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--border-glass); }
.media-preview-container video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-details-container { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.media-user-info { display: flex; align-items: center; gap: 12px; }
.user-badge { font-weight: 700; color: #fff; font-size: 1.1rem; }
.meta-tag { background: rgba(253, 29, 29, 0.18); border: 1px solid rgba(253, 29, 29, 0.3); color: var(--insta-pink); font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-md); }
.media-caption { font-size: 0.92rem; color: #cbd5e1; line-height: 1.5; }
.download-btn { padding: 16px 28px; font-size: 1rem; }

.song-layout { align-items: flex-start; }
.audio-artwork-container { width: 160px; height: 160px; border-radius: var(--radius-lg); overflow: hidden; background: #1e2330; border: 2px solid var(--border-glass); flex-shrink: 0; }
.audio-artwork-container img { width: 100%; height: 100%; object-fit: cover; }
.artist-name { color: var(--insta-orange); font-weight: 600; font-size: 0.95rem; }
.audio-player-wrapper audio { width: 100%; margin-top: 8px; border-radius: var(--radius-md); }

/* ==========================================================================
   AD MONETIZATION UNITS STYLING
   ========================================================================== */

.ad-unit {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label, .ad-label-mini {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ad-slot {
  background: rgba(15, 17, 26, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

/* Placement 1: Medium Rectangle (300x250) */
.ad-300x250 {
  width: 300px;
  height: 250px;
  margin: 0 auto;
}

/* Placement 2: Responsive Banner (728x90) */
.ad-728x90 {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
}

.ad-placeholder-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px;
}

.ad-placeholder-text small {
  color: var(--insta-orange);
  font-size: 0.76rem;
}

/* In-Feed Native Ad Card */
.infeed-ad-card {
  background: rgba(131, 58, 180, 0.08);
  border: 1px dashed rgba(253, 29, 29, 0.3);
}

/* Placement 3: Sticky Bottom Anchor Bar Ad */
.sticky-footer-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(10, 12, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  z-index: 80;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.sticky-ad-wrapper {
  position: relative;
  width: 100%;
  max-width: 728px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.close-sticky-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 26px;
  height: 26px;
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease;
}

.close-sticky-btn:hover {
  background: var(--insta-pink);
}

.sticky-ad-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ad-slot-sticky {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-frame {
  display: block;
  max-width: 100%;
  border: 0;
}

.ad-slot-sticky .ad-frame {
  width: min(728px, 100%);
  height: auto;
  aspect-ratio: 728 / 90;
}

.drawer-ad-container .ad-frame {
  width: min(300px, 100%);
  height: auto;
  aspect-ratio: 300 / 250;
}

.ad-sticky-text {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
}

.ad-sticky-text small {
  color: var(--success);
}

/* SECURITY MODAL STYLING */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(10px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { max-width: 640px; width: 100%; margin: 0; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-glass); }

.security-banner { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.85rem; color: var(--success); margin-bottom: 14px; }
.sec-badge { font-weight: 700; margin-bottom: 2px; }

.warning-banner { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); padding: 14px; border-radius: var(--radius-md); display: flex; gap: 12px; color: #fde68a; font-size: 0.85rem; margin-bottom: 20px; }
.warning-banner svg { color: var(--warning); flex-shrink: 0; }

.tab-nav { display: flex; gap: 8px; border-bottom: 1px solid var(--border-glass); margin-bottom: 16px; }
.tab-btn, .legal-tab-btn { background: none; border: none; color: var(--text-muted); padding: 10px 18px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active, .legal-tab-btn.active { color: #fff; border-bottom-color: var(--insta-pink); }

.tab-content, .legal-tab-content { display: none; margin-bottom: 20px; }
.tab-content.active, .legal-tab-content.active { display: block; }

.step-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.step-list li { display: flex; gap: 12px; align-items: flex-start; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--insta-gradient); color: #fff; font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-text { font-size: 0.88rem; color: #cbd5e1; }
.step-text code { background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; color: var(--insta-orange); font-family: monospace; }

.email-box { background: rgba(255, 255, 255, 0.06); padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-glass); margin: 12px 0; display: flex; gap: 10px; align-items: center; }

/* FOOTER LEGAL NOTICE & LINKS */
.app-footer { margin-top: 50px; text-align: center; border-top: 1px solid var(--border-glass); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.footer-legal-notice { max-width: 800px; margin: 0 auto; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass); padding: 14px 18px; border-radius: var(--radius-md); }
.disclaimer-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; text-align: justify; }

.footer-links { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-legal-link { background: none; border: none; color: var(--insta-orange); font-size: 0.82rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.btn-legal-link:hover { color: #fff; }
.dot-sep { color: var(--text-dim); }

.copyright-text { font-size: 0.78rem; color: var(--text-dim); }
.hidden { display: none !important; }

/* INTERSTITIAL DOWNLOAD AD MODAL STYLING */
.ad-interstitial-card {
  max-width: 480px;
  border-left: 4px solid var(--insta-pink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(253, 29, 29, 0.25);
}

.ad-timer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ad-spinner-dot {
  width: 14px;
  height: 14px;
  background: var(--insta-pink);
  border-radius: 50%;
  animation: pulseRing 1.2s infinite;
}

.highlight-timer {
  color: var(--insta-orange);
  font-size: 1.2rem;
  font-weight: 700;
}

.ad-notice-banner {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.text-center {
  text-align: center;
}

.ad-modal-controls {
  margin-top: 16px;
}

/* RESPONSIVE VIDEO / DISPLAY AD SLOT */
.ad-video-responsive-slot {
  width: 100%;
  max-width: 480px;
  min-height: 250px;
  height: auto;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.ad-video-responsive-slot iframe {
  width: min(300px, 100%) !important;
  height: auto !important;
  aspect-ratio: 300 / 250;
  max-width: 100% !important;
}

/* ==========================================================================
   INSTAGRAM AND FACEBOOK MODULE STYLES
   ========================================================================== */

/* 3-Column Grid on Desktop */
.home-cards-grid.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

/* Platform Card Theme Hover & Borders */
.card-instagram:hover {
  border-color: rgba(253, 29, 29, 0.45);
  box-shadow: 0 14px 35px rgba(253, 29, 29, 0.22);
}

.card-facebook:hover {
  border-color: rgba(24, 119, 242, 0.5);
  box-shadow: 0 14px 35px rgba(24, 119, 242, 0.25);
}

/* Platform Icons */
.icon-instagram {
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.25) 0%, rgba(253, 29, 29, 0.25) 100%);
  border: 1px solid rgba(253, 29, 29, 0.3);
}

.icon-facebook {
  background: rgba(24, 119, 242, 0.16);
  border: 1px solid rgba(24, 119, 242, 0.35);
}

/* Status Pill on Cards */
.card-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-xl);
}

.pulse-dot-green.mini {
  width: 6px;
  height: 6px;
}

/* Platform Top Nav Bar inside dedicated modules */
.platform-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-back-hub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-hub:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(-2px);
}

.platform-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.platform-indicator.instagram-theme {
  background: rgba(253, 29, 29, 0.1);
  border: 1px solid rgba(253, 29, 29, 0.3);
  color: #ff758c;
}

.platform-indicator.facebook-theme {
  background: rgba(24, 119, 242, 0.1);
  border: 1px solid rgba(24, 119, 242, 0.3);
  color: #58a6ff;
}

/* Sub-Tabs for Instagram (Video vs Song) */
.platform-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.platform-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.platform-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.platform-tab-btn.active {
  background: rgba(253, 29, 29, 0.15);
  border-color: rgba(253, 29, 29, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(253, 29, 29, 0.18);
}

.sub-panel {
  display: block;
}

.sub-panel.hidden {
  display: none !important;
}

/* Platform Button Variants */
.btn-facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%) !important;
  box-shadow: 0 4px 20px rgba(24, 119, 242, 0.3) !important;
}

.btn-facebook:hover {
  background: linear-gradient(135deg, #2b87ff 0%, #1670ea 100%) !important;
  box-shadow: 0 6px 25px rgba(24, 119, 242, 0.45) !important;
}

.facebook-border {
  border-color: rgba(24, 119, 242, 0.2) !important;
}

.video-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin: 8px 0 6px 0;
  line-height: 1.4;
}

.dual-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.safe-note {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #4ade80;
  font-weight: 500;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 900px) {
  .home-cards-grid.three-col { grid-template-columns: 1fr; }
  .media-results-card { flex-direction: column; align-items: stretch; }
  .media-preview-container { width: 100%; max-height: 360px; }
  .ad-728x90 { min-height: 60px; }
}

@media (max-width: 600px) {
  .app-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-actions { width: 100%; justify-content: space-between; }
  .audio-artwork-container { width: 120px; height: 120px; }
  .sticky-footer-ad { padding: 4px 8px; }
  .sticky-ad-wrapper { max-width: calc(100vw - 16px); }
  .sticky-ad-content { min-width: 0; }
  .close-sticky-btn { right: 0; }
  .ad-slot-sticky { min-height: 46px; }
  .ad-slot-sticky .ad-frame { width: 100%; }
  .home-hero h2 { font-size: 1.8rem; }
  .hero-stats-row { width: 100%; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
  .stat-label { font-size: 0.68rem; }
  .platform-nav-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dual-actions { flex-direction: column; }
}

/* Premium finish: calmer depth, clearer hierarchy, and responsive touch states. */
:root {
  --bg-dark: #080a12;
  --bg-card: rgba(17, 20, 32, 0.82);
  --bg-card-hover: rgba(25, 29, 45, 0.94);
  --border-glass: rgba(226, 232, 255, 0.12);
  --border-glass-focus: rgba(192, 132, 252, 0.62);
  --insta-gradient: linear-gradient(125deg, #8757ff 0%, #dc4d9b 55%, #ff9365 100%);
  --insta-gradient-hover: linear-gradient(125deg, #a27dff 0%, #ec65ad 55%, #ffad79 100%);
  --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.38);
}

body {
  background-image: radial-gradient(ellipse at 50% -20%, rgba(104, 79, 190, .18), transparent 52%),
    linear-gradient(180deg, #0a0c15 0%, #080a12 52%, #0b0c14 100%);
  background-attachment: fixed;
}

.bg-glow { opacity: .13; filter: blur(160px); }
.app-container { max-width: 1160px; }
.app-header { padding: 10px 4px 22px; }
.brand-logo-img { box-shadow: 0 8px 28px rgba(145, 93, 255, .28); }
.glass-card, .feature-card {
  border-color: rgba(226, 232, 255, .11);
  background: linear-gradient(145deg, rgba(23, 26, 41, .92), rgba(13, 15, 24, .88));
  box-shadow: 0 20px 65px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .035);
}
.glass-card:hover, .feature-card:hover {
  border-color: rgba(197, 164, 255, .32);
  box-shadow: 0 26px 72px rgba(0, 0, 0, .38), 0 0 34px rgba(129, 91, 230, .09);
}
.home-hero { padding-top: 22px; }
.home-hero h2 { letter-spacing: -.045em; text-wrap: balance; }
.home-hero > p { max-width: 680px; line-height: 1.8; }
.hero-badge-pill { background: rgba(142, 113, 255, .1); border-color: rgba(166, 139, 255, .24); }
.feature-card { min-height: 270px; overflow: hidden; position: relative; }
.feature-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: var(--insta-gradient); opacity: .72;
}
.feature-icon { filter: drop-shadow(0 8px 16px rgba(180, 111, 255, .2)); }
.ad-slot { border-style: solid; border-color: rgba(226, 232, 255, .08); background: rgba(255, 255, 255, .018); }
button, .drawer-link, .feature-card { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, .feature-card:focus-visible {
  outline: 2px solid #c4a5ff; outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Clear download feedback and preview metadata */
.media-caption:empty { display: none; }
.preview-error {
  padding: 10px 12px;
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  color: #fde68a;
  background: rgba(245, 158, 11, .09);
  font-size: .86rem;
}
.download-error-toast {
  position: fixed;
  z-index: 120;
  top: 18px;
  left: 50%;
  width: min(560px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 18px 20px;
  border: 1px solid rgba(248, 113, 113, .48);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  background: rgba(26, 20, 27, .97);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .55);
}
.download-error-toast strong { display: block; margin-bottom: 6px; color: #fecaca; }
.download-error-toast p { margin-bottom: 12px; color: #e2d8df; font-size: .9rem; }
.download-error-toast button { min-height: 36px; padding: 6px 14px; }
