:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-main: #1c1e21;
  --text-muted: #65676b;
  --accent-gradient: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  --accent-solid: #0095f6;
  --accent-hover: #0081d6;
  --border-color: #dbdbdb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 24px;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Bootstrap Overrides & Resets */
a {
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body {
  background-color: var(--bg-secondary);
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  /* Bootstrap fix */
  display: block;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--accent-solid);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* Hero Section */
.hero {
  background: var(--accent-gradient); /* User requested attractive background */
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white; /* Important for contrast */
}

/* Texture overlay for the hero */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.2),
      transparent 40%
    ),
    radial-gradient(circle at bottom left, rgba(0, 0, 0, 0.1), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Wave shape at bottom (optional, but adds flair) */
.hero::after {
  /* Keeping it simple for now to ensure clean connection with content */
  content: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem; /* Reduced from 3.5rem for Laptop */
  margin-bottom: 2rem;
  color: white; /* Force white */
  letter-spacing: -1px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3.5rem;
  font-weight: 500;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Custom Tabs - Glassmorphism on colorful bg */
.custom-tabs {
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.2); /* More transparent */
  padding: 6px;
  border-radius: 50px;
  flex-wrap: nowrap; /* Force single line */
  overflow-x: auto; /* Allow scroll on small screens */
  max-width: 95vw; /* Prevent overflow of screen */
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar */
  scrollbar-width: none;

  /* Mobile Default (Scrollable) */
  display: flex;
  justify-content: flex-start;
}

/* Laptop/Tablet - Center the tabs */
@media (min-width: 768px) {
  .custom-tabs {
    display: inline-flex;
    justify-content: center;
  }
}

.custom-tabs::-webkit-scrollbar {
  display: none;
}

.custom-tabs .nav-link {
  color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 10px 24px;
  margin: 0 2px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap; /* Prevent text wrapping */
}

.custom-tabs .nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.custom-tabs .nav-link.active {
  background: white;
  color: #cc2366; /* Match the primary gradient tone */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Search Box */
.search-container {
  background: white; /* Changed to white for cleanliness */
  padding: 6px; /* Reduced padding for tighter fit */
  border-radius: 50px; /* Fully rounded */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  flex-wrap: nowrap;
}

.search-container:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* New Wrapper */
.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  border: none;
  padding: 12px 20px;
  padding-right: 40px; /* Space for paste icon */
  font-size: 1rem;
  outline: none;
  color: #333;
  background: transparent;
  border-radius: 50px;
}

.btn-paste {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 10px; /* Relative to input-wrapper, stays inside */
  top: 50%;
  transform: translateY(-50%);
  transition: color 0.2s ease;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.btn-paste:hover {
  color: #cc2366;
}

@media (max-width: 576px) {
  .btn-paste {
    right: 5px; /* Minimal adjustment needed now */
  }
}

/* Custom Button to avoid conflict */
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px; /* Wider button */
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
  text-decoration: none;
  flex-shrink: 0; /* Important: Don't shrink */
  white-space: nowrap;
  margin-left: 5px;
}

.btn-primary-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
  opacity: 0.95;
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
  opacity: 0.95;
}

.btn-loading {
  padding-left: 40px;
  position: relative;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  bottom: 0;
  left: 16px;
  margin: auto;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Result Card */
.result-section {
  padding: 2rem 0;
  display: none; /* Hidden by default */
}

.result-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--border-color);
}

.preview-media {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  object-fit: contain;
  background: #000;
}

.download-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Features */
.features {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
  padding: 12px;
  background: rgba(0, 149, 246, 0.1);
  border-radius: 12px;
  color: var(--accent-solid);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How To Section */
.how-to {
  padding: 5rem 0;
  background-color: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 4rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step-counter;
}

.step-card {
  background: var(--bg-primary);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  border: 1px solid var(--border-color);
}

.step-card::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.step-title {
  margin: 1rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

/* FAQ Section */
.faq {
  padding: 5rem 0;
  background-color: var(--bg-primary);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-toggle-icon {
  font-size: 1.5rem;
  color: var(--accent-solid);
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* Approximate max height */
  padding-bottom: 1.5rem;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

/* Footer Expanded */
.footer {
  background-color: #111;
  color: #fff;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #aaa;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 2rem;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}
