@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Dark Premium Color System */
  --bg-primary: #0a0813;
  --bg-secondary: #121020;
  --bg-card: rgba(20, 18, 36, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.25);
  
  /* HSL tailored glow gradients */
  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --gradient-brand: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --gradient-card-glow: radial-gradient(circle at top left, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  
  /* Text colors */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Transition timings */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 10% 20%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(236, 48, 153, 0.07) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(10, 8, 19, 0.85);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  transition: var(--transition-smooth);
}

.logo-icon {
  background: var(--gradient-brand);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: #ffffff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Layout */
.page-container {
  padding-top: 3.5rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-image: var(--gradient-card-glow);
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 10px 40px 0 rgba(139, 92, 246, 0.12);
}

/* Downloader Widget */
.downloader-widget {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.widget-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ffffff, #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.widget-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 2.25rem auto;
  line-height: 1.6;
}

/* Downloader Form */
.download-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 680px;
  margin: 0 auto;
}

.input-container {
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  padding: 1.15rem 3.5rem 1.15rem 1.5rem;
  background-color: rgba(10, 8, 19, 0.6);
  border: 1.5px solid var(--border-color);
  border-radius: 0.75rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-smooth);
  outline: none;
}

.input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background-color: rgba(10, 8, 19, 0.8);
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  display: none;
  transition: var(--transition-smooth);
}

.clear-btn:hover {
  color: #ffffff;
}

.submit-btn {
  background: var(--gradient-brand);
  border: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.15rem 2rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.25);
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: 0.5s;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
}

.error-text {
  color: #ef4444;
  font-size: 0.925rem;
  text-align: left;
  margin-top: 0.25rem;
  display: none;
}

/* Spinner */
.loading-container {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3.5px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loading-text {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

/* Results Section */
.results-panel {
  display: none;
  margin-top: 2.5rem;
  text-align: left;
  animation: fadeIn 0.4s ease-out;
}

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

/* Result Cards Layout */
.result-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  background: rgba(10, 8, 19, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.preview-container {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/5;
  max-height: 400px;
}

.preview-container img, .preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meta-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meta-info-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding-bottom: 0.5rem;
}

.meta-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.meta-val {
  font-weight: 500;
  font-size: 0.9rem;
}

.action-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.action-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #ffffff;
}

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

/* Carousel layouts */
.carousel-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Profile zoom card */
.profile-card {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  object-fit: cover;
}

.profile-details {
  flex: 1;
}

.profile-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.profile-username {
  color: var(--accent-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Captions / Hashtags card */
.text-card {
  background-color: rgba(10, 8, 19, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.text-box {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.toast-alert {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 1000;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-alert.show {
  transform: translateX(-50%) translateY(0);
}

/* SEO Content Section */
.seo-section {
  max-width: 960px;
  margin: 0 auto;
}

.seo-section h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.seo-section h2:first-of-type {
  margin-top: 0;
}

.seo-section h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: #ffffff;
}

.seo-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.seo-section ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.seo-section ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
}

.seo-section ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.step-item {
  background-color: rgba(10, 8, 19, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.step-num {
  background: var(--gradient-brand);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

.step-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.step-item p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Device Guides */
.device-guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.device-box {
  background-color: rgba(10, 8, 19, 0.3);
  border-left: 3px solid var(--accent-primary);
  padding: 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.device-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.device-box p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
  max-width: 960px;
  margin: 0 auto;
}

.faq-section h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.faq-item h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

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

.footer-col h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-disclaimer-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  text-align: center;
}

.copyright-note {
  color: var(--text-muted);
  font-size: 0.825rem;
  max-width: 800px;
  margin: 0 auto 1rem auto;
  line-height: 1.5;
}

.copyright-year {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.copyright-year a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.copyright-year a:hover {
  text-decoration: underline;
}

/* Support and internal links styling */
.support-link, .internal-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.support-link:hover, .internal-link:hover {
  text-decoration: underline;
}

.divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 2.5rem 0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-top-grid {
    grid-template-columns: 1.5fr repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: rgba(10, 8, 19, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  
  .nav-menu.show {
    display: flex;
  }
  
  .nav-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
  }

  .widget-header h1 {
    font-size: 2rem;
  }
  
  .page-container {
    padding-top: 2rem;
    gap: 2.5rem;
  }
  
  .glass-card {
    padding: 1.5rem;
  }

  .steps-grid, .device-guides {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .result-card {
    grid-template-columns: 1fr;
  }
  
  .preview-container {
    max-width: 100%;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .brand-col p {
    max-width: 100%;
  }
  
  .profile-card {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-stats {
    justify-content: center;
  }
}
