/* =============================================
   AiToolbar.in — Style Sheet
   Theme: Purple-Blue Gradient (Reference Match)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #5B21B6;
  --primary-dark:  #3B0F8C;
  --primary-light: #7C3AED;
  --accent-blue:   #3B82F6;
  --accent-green:  #10B981;
  --accent-orange: #F59E0B;
  --accent-pink:   #EC4899;
  --accent-cyan:   #06B6D4;
  --accent-red:    #EF4444;
  --white:         #FFFFFF;
  --off-white:     #F5F3FF;
  --text-dark:     #1E1B4B;
  --text-body:     #4B5563;
  --text-light:    #9CA3AF;
  --card-border:   #E9D5FF;
  --shadow-sm:     0 2px 8px rgba(91,33,182,0.08);
  --shadow-md:     0 6px 24px rgba(91,33,182,0.14);
  --shadow-lg:     0 16px 48px rgba(91,33,182,0.18);
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --grad-hero:     linear-gradient(135deg, #3B0F8C 0%, #5B21B6 40%, #7C3AED 70%, #3B82F6 100%);
  --grad-btn:      linear-gradient(90deg, #5B21B6, #3B82F6);
  --grad-card-top: linear-gradient(135deg, #EDE9FE 0%, #F5F3FF 100%);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--off-white);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #F5F3FF; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 99px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(91,33,182,0.10);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Free badge in navbar */
.navbar-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--grad-btn);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.navbar-badge::before {
  content: '⚡';
  font-size: 0.9rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 5% 80px;
  color: var(--white);
}

/* Decorative blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.hero::before {
  width: 400px; height: 400px;
  background: #A78BFA;
  top: -120px; left: -100px;
}

.hero::after {
  width: 300px; height: 300px;
  background: #60A5FA;
  bottom: -80px; right: -60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.hero h1 span {
  background: linear-gradient(90deg, #FCD34D, #F9A8D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 620px;
  margin: 0 auto 10px;
  opacity: 0.92;
  font-weight: 500;
}

/* Stats row in hero */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.hero-stat {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  min-width: 110px;
}

.hero-stat strong {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.hero-stat span {
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-section {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  margin: -28px auto 0;
  position: relative;
  z-index: 10;
  padding: 0 5%;
}

.search-section input {
  flex: 1;
  height: 54px;
  border: 2px solid var(--card-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 0 20px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  outline: none;
  background: var(--white);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s;
}

.search-section input:focus {
  border-color: var(--primary-light);
}

.search-section input::placeholder {
  color: var(--text-light);
}

.search-section button {
  height: 54px;
  padding: 0 28px;
  background: var(--grad-btn);
  color: var(--white);
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.search-section button:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

/* ============================================================
   FEATURES STRIP (below search)
   ============================================================ */
.features-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 5%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.feature-item .fi-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ============================================================
   TOOLS SECTION
   ============================================================ */
.tools-section {
  max-width: 1280px;
  margin: 48px auto 0;
  padding: 0 5% 60px;
}

.tools-section h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tools-section h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--card-border), transparent);
  border-radius: 99px;
}

/* ---------- Grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

/* ---------- Individual Card ---------- */
.tool-card {
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px 20px 20px;
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-btn);
  opacity: 0;
  transition: opacity 0.22s;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #C4B5FD;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* Colour coding cards by category */
.tool-card[onclick*="meta-tag"] h3,
.tool-card[onclick*="Prompt"] h3,
.tool-card[onclick*="upscale"] h3,
.tool-card[onclick*="carbon"] h3 {
  color: var(--primary);
}

.tool-card[onclick*="JPG"] h3,
.tool-card[onclick*="PNG"] h3,
.tool-card[onclick*="WEBP"] h3,
.tool-card[onclick*="imagecompression"] h3,
.tool-card[onclick*="colour"] h3,
.tool-card[onclick*="palette"] h3,
.tool-card[onclick*="svg"] h3 {
  color: var(--accent-blue);
}

.tool-card[onclick*="PDF"] h3,
.tool-card[onclick*="TXT"] h3,
.tool-card[onclick*="JSON"] h3,
.tool-card[onclick*="Base64"] h3,
.tool-card[onclick*="url"] h3 {
  color: var(--accent-green);
}

.tool-card[onclick*="gold"] h3,
.tool-card[onclick*="cricket"] h3,
.tool-card[onclick*="stock"] h3 {
  color: var(--accent-orange);
}

.tool-card[onclick*="KtoU"] h3,
.tool-card[onclick*="CtoU"] h3,
.tool-card[onclick*="UtoK"] h3,
.tool-card[onclick*="UtoC"] h3 {
  color: var(--accent-pink);
}

.tool-card[onclick*="password"] h3,
.tool-card[onclick*="brocker"] h3 {
  color: var(--accent-red);
}

.tool-card[onclick*="bmi"] h3,
.tool-card[onclick*="unit"] h3,
.tool-card[onclick*="age"] h3,
.tool-card[onclick*="fakedata"] h3 {
  color: var(--accent-cyan);
}

/* ============================================================
   DESIGN GRID (Firebase)
   ============================================================ */
#designGrid.design-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5% 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 24px 5%;
  font-size: 0.9rem;
  font-weight: 500;
}

footer strong {
  color: #A78BFA;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
}

footer a {
  color: #93C5FD;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 52px 5% 64px; }
  .hero h1 { font-size: 2rem; }
  .search-section { margin-top: -24px; }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-stats { gap: 12px; }
  .hero-stat { padding: 10px 16px; min-width: 90px; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .navbar { padding: 0 4%; }
  .navbar-badge { display: none; }
  .hero h1 { font-size: 1.75rem; }
}

/* ============================================================
   ANIMATION
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: fadeUp 0.5s ease both; }
.hero h1    { animation: fadeUp 0.6s 0.1s ease both; }
.hero p     { animation: fadeUp 0.6s 0.2s ease both; }
.hero-stats { animation: fadeUp 0.6s 0.3s ease both; }
.search-section { animation: fadeUp 0.6s 0.35s ease both; }
.features-strip { animation: fadeUp 0.6s 0.45s ease both; }

.tool-card {
  animation: fadeUp 0.5s ease both;
}

/* ============================================================
   SEO CONTENT SECTIONS
   ============================================================ */

/* --- Shared Section Base --- */
.seo-section {
  padding: 72px 0;
  background: var(--white);
}

.seo-section--alt {
  background: var(--off-white);
}

.seo-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

/* Section Header */
.seo-section-header {
  text-align: center;
  margin-bottom: 52px;
}

.seo-label {
  display: inline-block;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.seo-section-header h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.25;
}

.seo-section-header p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-body);
}

/* --- About / Intro Grid --- */
.seo-intro-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: center;
}

.seo-intro-text .seo-label { margin-bottom: 12px; }

.seo-intro-text h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 20px;
}

.seo-highlight {
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.seo-lead {
  font-size: 1.08rem;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.65;
}

.seo-intro-text p {
  color: var(--text-body);
  margin-bottom: 14px;
  line-height: 1.7;
}

.seo-intro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-box {
  background: var(--grad-card-top);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Category Grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card .cat-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.category-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-body);
  margin-bottom: 14px;
}

.category-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-card ul li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-card ul li::before { content: '→'; font-size: 0.75rem; opacity: 0.7; }

/* Category color themes */
.category-card--purple h3 { color: var(--primary); }
.category-card--purple ul li { background: #F5F3FF; color: var(--primary); }

.category-card--blue h3 { color: var(--accent-blue); }
.category-card--blue ul li { background: #EFF6FF; color: var(--accent-blue); }

.category-card--green h3 { color: var(--accent-green); }
.category-card--green ul li { background: #F0FDF4; color: var(--accent-green); }

.category-card--pink h3 { color: var(--accent-pink); }
.category-card--pink ul li { background: #FDF2F8; color: var(--accent-pink); }

.category-card--orange h3 { color: var(--accent-orange); }
.category-card--orange ul li { background: #FFFBEB; color: #D97706; }

.category-card--cyan h3 { color: var(--accent-cyan); }
.category-card--cyan ul li { background: #ECFEFF; color: #0E7490; }

/* --- How It Works Steps --- */
.steps-grid {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: center;
}

.step-card {
  flex: 1;
  max-width: 320px;
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.step-num {
  position: absolute;
  top: -14px; left: 24px;
  background: var(--grad-btn);
  color: var(--white);
  font-family: 'Baloo 2', cursive;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.step-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
}

.step-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
}

.step-arrow {
  font-size: 2rem;
  color: var(--card-border);
  align-self: center;
  font-weight: 700;
  margin-top: 20px;
}

/* --- Why Grid --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.why-card {
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.why-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.why-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.why-card p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* --- User Grid --- */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.user-card {
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.user-emoji {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.user-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.user-card p {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* --- FAQ Grid --- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 16px;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: #C4B5FD;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.35;
}

.faq-item p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* --- CTA Section --- */
.seo-cta-section {
  padding: 60px 0;
  background: var(--grad-hero);
}

.cta-box {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 0 5%;
}

.cta-box h2 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
}

.cta-box p {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.cta-button {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 36px;
  border-radius: 99px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}

/* ============================================================
   RESPONSIVE — SEO SECTIONS
   ============================================================ */
@media (max-width: 900px) {
  .seo-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .seo-intro-stats { max-width: 380px; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); margin: 0; }
  .step-card { max-width: 100%; width: 100%; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .seo-section { padding: 52px 0; }
  .category-grid, .why-grid, .user-grid { grid-template-columns: 1fr; }
  .seo-intro-stats { grid-template-columns: 1fr 1fr; max-width: 100%; }
}
