/* styles.css — Beige-first theme, improved spacing & tool separators
   Replaces color palette, increases spacing, and adds clear separators
   while preserving original layout & responsive behavior.
*/

/* ---------- CSS variables (tweakable) ---------- */
:root{
  /* Beige-first palette */
  --bg-900: #f3efe6;        /* warm paper */
  --bg-800: #efe9dd;        /* slightly darker */
  --text: #2b2b23;          /* dark olive for readability */
  --muted: rgba(43,43,35,0.68); /* secondary text */
  --teal: #0e9e94;          /* accent (kept teal) */
  --soft: #c6efe6;          /* lighter teal */
  --accent: #d38a2a;        /* warm ochre accent for badges */
  --card-border: rgba(43,43,35,0.06);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(250,246,240,0.94));
  --max-w: 1200px;
  --container-padding: 18px;
  --glass-blur: 6px;
  --header-radius: 12px;
  --header-height: 72px;
  --focus-ring: 4px;
  --ease: cubic-bezier(.16,.84,.32,1);
  --tools-gap: 20px;
  --tile-divider: rgba(43,43,35,0.06); /* divider line color */
}

/* ---------- Reset & base ---------- */
*{box-sizing:border-box}
html,body{height:100%;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
/* ---------- Premium Animated Background ---------- */
@keyframes meshFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  /* Dynamic Mesh Gradient: Beige base with Teal and Gold flows */
  background: 
    radial-gradient(at 0% 0%, rgba(14, 158, 148, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(211, 138, 42, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(14, 158, 148, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(243, 239, 230, 1) 0px, transparent 50%),
    #f8f5f0; /* Fallback beige */
  
  background-size: 120% 120%;
  animation: meshFlow 15s ease infinite;
  
  color: var(--text);
  font-family: 'Outfit', Inter, sans-serif; /* We will add 'Outfit' font for a modern look */
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- Container ---------- */
.container{
  width:94%;
  max-width:var(--max-w);
  margin:0 auto;
  padding:18px var(--container-padding);
  position:relative;
}

/* If header spacer missing, keep content readable */
main.container{ margin-top: var(--header-height); }

/* ---------- Skip link (accessibility) ---------- */
.skip-link{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; z-index:9999; }
.skip-link:focus{ left:12px; top:12px; width:auto; height:auto; padding:10px 14px; background:#222; color:#fff; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,0.3); }

/* ---------- Header ---------- */
/* ---------- LOGO STYLES (With Mini Text) ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 158, 148, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(14, 158, 148, 0.1);
  transition: transform 0.3s ease;
  flex-shrink: 0; /* Prevents logo from squishing on small phones */
}

.logo:hover .logo-mark {
  transform: rotate(-5deg) scale(1.05);
  background: rgba(14, 158, 148, 0.12);
}

/* Text Container */
.logo-text {
  display: flex;
  flex-direction: column; /* Stacks text vertically */
  justify-content: center;
  line-height: 1.1; /* Tightens the gap */
}

/* Main Text: Hinglish Tools */
.logo-main {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #052b28;
}

.logo-contrast {
  color: var(--teal);
}

/* Subtitle: Kaam Aasaan Karo */
.logo-sub {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.75rem; /* Small & crisp */
  color: #888;        /* Muted color */
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* Mobile Tweak: Ensure text doesn't break layout */
@media (max-width: 400px) {
  .logo-main { font-size: 1.1rem; }
  .logo-sub { font-size: 0.7rem; }
  .logo-mark { width: 38px; height: 38px; }
}
.logo-text{font-weight:700;font-size:18px;line-height:1;color:var(--text)}
.logo-sub{font-weight:500;font-size:12px;color:var(--muted);margin-left:4px}
.logo-contrast{ color: var(--muted); font-weight:600; }

/* Header spacer (should be in HTML) */
#header-spacer{ height: var(--header-height); width:100%; pointer-events:none; user-select:none; display:block; }

/* ---------- Header actions / nav ---------- */
.header-actions { display:flex; align-items:center; gap:12px; }

/* Main nav (desktop default) */
.main-nav{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  transition: none;
}
.main-nav a{
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  font-weight:600;
  display:inline-block;
  background: transparent;
}
.main-nav a:hover,
.main-nav a:focus{
  background: rgba(14,158,148,0.06);
  color: var(--text);
  transform: translateY(-2px);
}

/* open state for mobile nav — will be toggled by JS */
.main-nav.open{
  display:flex;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,240,0.96));
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  padding: 12px;
  border-radius: 12px;
  flex-direction: column;
  width: calc(100% - 48px);
}

/* Hamburger (mobile) */
.menu-toggle{
  display:none; /* shown on small screens */
  background:transparent;
  border:0;
  color:var(--text);
  font-size:20px;
  padding:8px;
  border-radius:8px;
}
.menu-toggle:focus{ outline:none; box-shadow:0 0 0 var(--focus-ring) rgba(14,158,148,0.12); }

/* ---------- Hero ---------- */
.hero{
  padding: 28px 0 26px;
  display:block;
}
.hero h1{
  margin: 0 0 8px 0;
  font-size: clamp(20px, 5vw, 36px);
  line-height: 1.05;
  color: var(--text);
}
.hero .lead{
  margin: 0 0 18px 0;
  color: var(--muted);
  max-width: 66ch;
}
.home-cta{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  text-decoration:none;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
  background:transparent;
  border: 1px solid rgba(0,0,0,0.06);
  color:var(--text);
  cursor: pointer;
}
.btn[disabled]{ opacity: 0.6; cursor: not-allowed; }
.btn.primary{
  background: linear-gradient(90deg,var(--teal),var(--soft));
  color: #073634;
  border: none;
}
.btn.shimmer{position:relative;overflow:hidden}
.btn.shimmer::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: translateX(-120%);
  transition: transform 700ms ease;
}
.btn.shimmer:hover::after{ transform: translateX(120%); }

/* ---------- Clusters list ---------- */
.clusters-overview{
  margin-top: 22px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ---------- Cards ---------- */
.card{
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.03);
}
.calc-card{ padding:16px; }
.card.content{ padding:16px; line-height:1.45; }

/* ---------- Cluster card (keeps compatibility) ---------- */
/* ---------- Premium Glass Cards ---------- */
.cluster-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px;
  
  /* The Glass Effect */
  background: rgba(255, 255, 255, 0.65); /* More transparent */
  backdrop-filter: blur(12px);            /* Blurs the mesh background behind it */
  -webkit-backdrop-filter: blur(12px);
  
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px; /* Softer curves */
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.02), 
    0 10px 30px rgba(14, 158, 148, 0.05), /* Teal glow */
    inset 0 0 0 1px rgba(255, 255, 255, 0.5); /* Inner light ring */
    
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy hover */
}

.cluster-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 0 0 2px rgba(14, 158, 148, 0.2); /* Focus ring effect */
}

/* Typography inside cards */
.cluster-card h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: #1a202c;
}

.cluster-card p {
  font-size: 0.9rem;
  color: #4a5568;
}
.cluster-card:focus-within,
.cluster-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.06);
}
.cluster-card .icon-wrap{ width:72px; height:72px; display:flex; align-items:center; justify-content:center; position:relative; border-radius:10px; background: linear-gradient(135deg,var(--teal),var(--soft)); color:#042d2a; }

/* Lottie / fallback */
.lottie-wrap{ width:64px; height:64px; display:flex; align-items:center; justify-content:center; border-radius:8px; overflow:hidden; position:relative; }
.icon-fallback{ position:absolute; width:44px; height:44px; }

/* Lottie loaded state */
.lottie-loaded .icon-fallback{ opacity:0; transform:scale(0.96); transition: opacity 300ms ease, transform 300ms ease; }
.lottie-initialized{ width:64px; height:64px; display:block; }

/* ---------- Reveal animation ---------- */
.reveal{ opacity:0; transform: translateY(6px) scale(0.998); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.show{ opacity:1; transform: none; }

/* ---------- Tools grid & tiles (spacing + separators) ---------- */
.tools-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--tools-gap);
  margin-top: 20px;
}

/* ---------- Polished Tool Tiles ---------- */
/* ---------- Premium Glassy Tool Tiles (Inner Pages) ---------- */
.tool-tile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  
  /* The Glass Look */
  background: rgba(255, 255, 255, 0.55); /* Transparent glass */
  backdrop-filter: blur(12px);            /* Blur the mesh behind it */
  -webkit-backdrop-filter: blur(12px);
  
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 24px;
  
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.01),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4); /* Inner shine */
    
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.tool-tile:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(255, 255, 255, 0.85); /* Whiter on hover */
  box-shadow: 
    0 20px 40px -5px rgba(14, 158, 148, 0.15), /* Teal glow */
    0 0 0 1px rgba(14, 158, 148, 0.2);
}

/* The Accent Bar (Left side) */
.tool-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), transparent);
  opacity: 0.6;
}

.tool-tile:hover::before {
  opacity: 1;
  width: 6px;
}

/* ensure body content doesn't overlap the accent */
.tool-tile .tile-body{ margin-left: 8px; }

/* when grid rows wrap we add a subtle horizontal divider between rows */
.tools-grid > * + * {
  /* nothing destructive here — grid gap handles vertical spacing,
     we add a faint border to each tile's bottom on narrow screens for extra separation */
}

/* tile icon styling */
.tile-icon{
  flex:0 0 64px;
  width:64px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background: linear-gradient(135deg,var(--teal),var(--soft));
  color:#052b28;
  font-size:22px;
  box-shadow: 0 6px 18px rgba(14,158,148,0.05);
}
.tile-body h3{ margin:0 0 8px 0; font-size:16px; color:var(--text); }
.tile-body p{ margin:0; color:var(--muted); font-size:13px; }

/* Add roomy spacing between tile content and meta (button) */
.tool-tile .meta { margin-left: auto; display:flex; align-items:center; gap:8px; }

/* optional small tag / label style inside tile */
.tool-tile .tag { font-size:12px; color:var(--muted); background: rgba(0,0,0,0.02); padding:4px 8px; border-radius:8px; }

/* ---------- Tool section & layout ---------- */
.tool-section{ margin-top:28px; }
.tool-header h2{ margin:0 0 6px 0; font-size:20px; color:var(--text) }
.tool-body{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap:20px;
  align-items:start;
  margin-top:12px;
}
@media (max-width:920px){
  .tool-body{ grid-template-columns: 1fr; }
}

/* ---------- Forms / inputs / labels ---------- */
l/* ---------- Chunky Inputs for Mobile ---------- */
input[type="text"], input[type="number"], textarea, select {
  height: 48px; /* Taller touch target */
  padding: 0 16px;
  border-radius: 12px; /* Softer corners */
  border: 1px solid rgba(43, 43, 35, 0.15); /* Slightly darker border for visibility */
  background: #ffffff;
  font-size: 16px; /* Prevents iOS zoom on focus */
  transition: all 0.2s ease;
}

textarea {
  height: auto;
  padding: 12px 16px;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(14, 158, 148, 0.15); /* Nice teal glow */
  background: #fff;
}
.form-actions{ margin-top:12px; display:flex; gap:12px; flex-wrap:wrap; align-items:center; }

/* small grid helper */
.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width:600px){ .grid-2{ grid-template-columns: 1fr; } }

/* ---------- Results & charts (UPDATED) ---------- */
.result {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.6); /* Glassy white background */
  border: 1px solid var(--teal);       /* Teal border */
  border-left: 6px solid var(--teal);  /* Thick accent bar on left */
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(14, 158, 148, 0.08); /* Soft glow */
  transition: all 0.3s ease;
}

/* Make the number/answer stand out big */
.result strong {
  display: block;
  font-size: 1.6rem;    /* Big text size */
  font-weight: 800;
  color: #0e857d;       /* Darker teal for contrast */
  margin-top: 4px;
}

/* Specific fix for Typing Test results to look good side-by-side */
#typing30 .result, #typing60 .result {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

canvas{ max-width:100%; height:auto; display:block; }
/* ---------- Ad slot fallback sizing ---------- */
.ad-slot{
  min-height:64px;
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.02);
  border-radius:10px;
  border:1px dashed rgba(0,0,0,0.04);
  color:var(--muted);
  font-size:13px;
}

/* ---------- FAQ styles ---------- */
.faq-list details{ margin:8px 0; background: rgba(0,0,0,0.02); padding:10px; border-radius:8px; border:1px solid rgba(0,0,0,0.03); }
.faq-list summary{ cursor:pointer; font-weight:700; list-style:none; outline:none; color:var(--text) }
.faq-list p{ margin:8px 0 0 0; color:var(--muted); font-weight:500; }

/* ---------- Small helpers ---------- */
.muted{ color:var(--muted); font-weight:600; font-size:12px; display:inline-block }

/* ---------- Footer ---------- */
.site-footer{ margin-top:28px; padding:18px 0; color:var(--muted); border-top:1px solid rgba(0,0,0,0.04); background: transparent; }
.footer-inner{ text-align:center; }

/* ---------- Responsive ---------- */
/* ---------- Ultimate Floating Mobile Menu ---------- */
@media (max-width: 920px) {
  /* 1. The Container - A Floating Glass Island */
  .main-nav {
    display: none;
    position: fixed;
    
    /* Dynamic Positioning */
    top: calc(var(--header-height) + 12px); /* Gap from header */
    left: 16px;  /* Margin from left edge */
    right: 16px; /* Margin from right edge */
    width: auto; /* Auto width based on margins */
    max-height: calc(100vh - 120px); /* Prevent cutting off on small phones */
    
    /* The Glass Look */
    background: rgba(255, 255, 255, 0.85); /* Slightly transparent */
    backdrop-filter: blur(20px) saturate(180%); /* Heavy Premium Blur */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    /* Borders & Shadow */
    border-radius: 24px; /* Large, modern rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
      0 20px 40px -10px rgba(0, 0, 0, 0.15), /* Deep shadow */
      0 0 0 1px rgba(0, 0, 0, 0.02); /* Outline for crispness */
    
    /* Layout */
    flex-direction: column;
    padding: 10px; /* Padding inside the island */
    gap: 6px;      /* Gap between links */
    z-index: 1750;
    overflow-y: auto;
  }

  /* 2. Open Animation - Pop and Fade */
  .main-nav.open {
    display: flex;
    animation: islandPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy pop effect */
  }

  /* Toggle button visible */
  .menu-toggle{ display:inline-flex; }

  /* 3. The Links - Bubble Style */
  .main-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    
    background: transparent; /* Clean look by default */
    border-radius: 16px;     /* Matches container curves */
    border: none;
    
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
  }

  /* 4. Interaction States */
  .main-nav a:active {
    transform: scale(0.97); /* Click press effect */
    background: rgba(0,0,0,0.03);
  }

  /* 5. Active Page (The current page) */
  .main-nav a.active {
    background: var(--teal);
    color: white;
    box-shadow: 0 8px 16px -4px rgba(14, 158, 148, 0.4);
  }

  /* 6. Badge for PDF */
  .main-nav a.badge-new::after {
    content: "NEW";
    font-size: 0.65rem;
    background: var(--accent);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-left: auto;
  }

  /* 7. Animation Keyframes */
  @keyframes islandPop {
    from {
      opacity: 0;
      transform: translateY(-20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

/* Lock scroll when nav open */
html.nav-open, body.nav-open{ height:100%; overflow: hidden; }

/* Small screens: header inner spacing tweaks */
@media (max-width: 520px) {
  .header-inner{ padding:8px 12px; }
  .logo-text{ font-size:15px }
  .logo-mark{ width:44px; height:44px }
  .cluster-card{ padding:12px; }
  .tile-icon{ width:48px; height:48px; flex:0 0 48px; }
  .tool-tile{ padding:14px; }
  .tools-grid{ gap:14px; }
}

/* ---------- Accessibility focus ring for actionable elements ---------- */
a:focus, button:focus, input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 var(--focus-ring) rgba(14,158,148,0.10); border-radius: 8px; }

/* ---------- Small safety clamps ---------- */
* { box-sizing: border-box; }
html, body { max-width:100%; overflow-x:hidden; -webkit-overflow-scrolling: touch; }
[style="width:1200px"], [style="width:1000px"], [style="min-width"] { max-width:100% !important; min-width:0 !important; box-sizing:border-box !important; }

/* ---------- End of updated stylesheet ---------- */


/* ------------------------------------------------------
   SECTION SEPARATORS BETWEEN TOOLS
   ------------------------------------------------------ */

/* Add spacing between major tool sections */
.tool-section {
  margin-top: 42px;               /* big breathing room */
  padding-top: 32px;
  position: relative;
}

/* Soft horizontal separator line */
.tool-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 1px;
  background: rgba(0,0,0,0.08);   /* soft beige-friendly line */
}

/* Extra spacing for readability */
.tool-section .tool-header h2 {
  margin-top: 0;
  padding-top: 0;
}

/* On very small screens, reduce spacing slightly */
@media (max-width: 520px) {
  .tool-section {
    margin-top: 50px;
    padding-top: 54px;
  }
}


/* WhatsApp Share Button - High Visibility */
.wa-share-btn {
  background: #25D366 !important; /* Official WhatsApp Green */
  color: white !important;
  border: none;
  width: 100%;
  margin-top: 12px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-share-btn:hover {
  background: #128C7E !important; /* Darker Green on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 211, 102, 0.35);
}

.wa-share-btn:active {
  transform: translateY(0);
}


/* ---------- TYPING CONTROL PANEL (Theme Harmonized) ---------- */
.control-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed rgba(0,0,0,0.1); /* Separator line */
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start; /* Align left looks better on tools */
}

/* Control Panel Buttons - Using your Teal/Beige Theme */
.control-panel .btn {
    font-size: 0.85rem;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--card-border);
    color: var(--text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.control-panel .btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 158, 148, 0.15);
}

/* Export/Action buttons stand out slightly */
#type30-export-csv, #type60-export-csv,
#type30-export-chart, #type60-export-chart {
    background: rgba(14,158,148,0.08); /* Very light teal tint */
    border-color: rgba(14,158,148,0.2);
}

/* Ghost/Clear button */
.control-panel .btn.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px dashed rgba(0,0,0,0.2);
    box-shadow: none;
}
.control-panel .btn.ghost:hover {
    color: #e53e3e; /* Red for delete action */
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
}


/* ---------- PDF Page Specifics (Roadmap & Notify) ---------- */

/* The Glassy Notify Card */
.notify-box {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--teal);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(14, 158, 148, 0.1);
  margin-top: 12px;
}

/* Roadmap List */
.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 12px;
}

.roadmap-list li {
  background: white;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 4px solid var(--muted);
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Highlight the active phase */
.roadmap-list li.active-phase {
  border-left-color: var(--teal);
  background: #f0fdfc;
  font-weight: 600;
}

.roadmap-list li::before {
  content: "📌"; 
  font-size: 1.1em;
}

.roadmap-list li.active-phase::before {
  content: "🚀";
}

/* Voting Buttons (Chips) */
.vote-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.vote-btn {
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: #f0fdfc;
  transform: translateY(-2px);
}

.vote-btn:active {
  transform: scale(0.95);
}

/* Notification Input Group */
.notify-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.notify-group input {
  flex: 1;
  min-width: 200px;
  border: 2px solid rgba(0,0,0,0.08);
}

.notify-group input:focus {
  border-color: var(--teal);
}

/* ---------- HOMEPAGE SPECIFIC STYLES ---------- */

.hero-wrapper {
  text-align: center;
  padding: 0px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(14, 158, 148, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive giant text */
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);;
}

.text-gradient {
  background: linear-gradient(135deg, var(--teal) 0%, #2c7a7b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Premium Search Bar */
.hero-search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto 24px;
}

.hero-search-container input {
  width: 100%;
  padding: 18px 50px; /* Space for icon */
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  font-size: 1.1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.hero-search-container input:focus {
  background: white;
  border-color: var(--teal);
  box-shadow: 0 15px 35px rgba(14, 158, 148, 0.15);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

.shortcut-hint {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #ddd;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #999;
  background: rgba(255,255,255,0.5);
}

/* Quick Tags */
.quick-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  color: #666;
}

.tag-pill {
  background: white;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.tag-pill:hover {
  transform: translateY(-2px);
  color: var(--teal);
}

/* Icon Boxes in Cards */
.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.finance-icon { background: #e6fffa; color: #319795; }
.student-icon { background: #ebf8ff; color: #3182ce; }
.health-icon { background: #fff5f5; color: #e53e3e; }
.utility-icon { background: #fffaf0; color: #dd6b20; }
.pdf-icon { background: #fff5f7; color: #d53f8c; }

.arrow-btn {
  margin-left: auto;
  opacity: 0.3;
  font-weight: bold;
}

/* Trust Section */
.seo-trust {
  margin-top: 60px;
  text-align: center;
  padding: 40px;
  background: rgba(255,255,255,0.4);
  border-radius: 24px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.trust-emoji {
  font-size: 2rem;
  background: white;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}


/* ---------- PREMIUM MEGA FOOTER (Unique Classes) ---------- */
.site-footer {
  margin-top: 80px;
  padding-top: 60px;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.06);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

/* --- Unique Footer Logo Styles --- */
.ft-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 16px;
}

.ft-logo-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 158, 148, 0.05); /* Lighter than navbar */
  border-radius: 12px;
  border: 1px solid rgba(14, 158, 148, 0.1);
}

.ft-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}

.ft-logo-main {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #052b28;
}

.ft-logo-contrast { color: var(--teal); }

.ft-logo-sub {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.02em;
}

.brand-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 24px;
}

/* --- Footer Social Icons --- */
.ft-social-links {
  display: flex;
  gap: 12px;
}

.ft-social-links a {
  width: 40px; 
  height: 40px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  border-radius: 12px;
  background: #f0fdfc;
  color: var(--teal);
  transition: all 0.2s ease;
  border: 1px solid rgba(14, 158, 148, 0.1);
}

.ft-social-links a:hover {
  background: var(--teal);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(14, 158, 148, 0.2);
}

/* --- Footer Links --- */
.footer-links h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #1a202c;
}

.footer-links a {
  display: block;
  color: #666;
  text-decoration: none;
  margin-bottom: 14px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--teal);
  padding-left: 4px;
}

.ft-tag {
  font-size: 0.7rem;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.04);
  padding: 24px 0;
  background: #fafafa;
  font-size: 0.85rem;
  color: #888;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* =========================================
   MASTER OVERRIDES: HEADER & FOOTER
   (Paste this at the very bottom of styles.css)
   ========================================= */

/* 1. RESET HEADER TO FLOATING PILL */
.site-header {
  position: fixed !important;
  top: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  
  width: 92% !important;
  max-width: 1080px !important;
  height: 72px !important;
  
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  
  border-radius: 100px !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  
  box-shadow: 
    0 12px 30px -10px rgba(14, 158, 148, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    
  z-index: 1700 !important;
  margin: 0 !important;
}

.header-inner {
  height: 100%;
  padding: 0 12px 0 24px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 2. ENSURE LOGO LOOKS CORRECT */
.logo, .ft-logo {
  text-decoration: none;
  border: none !important;
}

.logo-mark, .ft-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 158, 148, 0.08);
  border: 1px solid rgba(14, 158, 148, 0.1);
  flex-shrink: 0;
}

.logo-text, .ft-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  margin-left: 12px;
}

.logo-main, .ft-logo-main {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #052b28;
}

.logo-sub, .ft-logo-sub {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

/* 3. MOBILE HEADER (Reset to Docked) */
@media (max-width: 920px) {
  .site-header {
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    height: 64px !important;
    transform: none !important;
    left: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  }
}

/* 4. FOOTER STYLES (Unique Classes Only) */
.site-footer {
  margin-top: 80px;
  padding-top: 60px;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.06);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

/* Footer Social Icons */
.ft-social-links { display: flex; gap: 12px; margin-top: 16px; }
.ft-social-links a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #f0fdfc;
  color: #0e9e94;
  border: 1px solid rgba(14, 158, 148, 0.1);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- SEARCH RESULTS DROPDOWN ---------- */
.search-results {
  position: absolute;
  top: 110%; /* Just below the input */
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 
    0 10px 40px -10px rgba(0,0,0,0.15),
    0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  z-index: 2000;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(14, 158, 148, 0.2); /* Teal hint */
  animation: slideDown 0.2s ease;
}

.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s;
}

.search-item:last-child { border-bottom: none; }

.search-item:hover {
  background: #f0fdfc; /* Light Teal hover */
  color: var(--teal);
}

.search-name {
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
}

.search-arrow {
  color: #ccc;
  font-weight: bold;
}

/* Scrollbar for results */
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }



/* =========================================
   DARK MODE THEME (The "Nuclear" Fix)
   ========================================= */
[data-theme="dark"] {
  /* Core Colors */
  --bg-900: #020617;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --teal-glow: #2dd4bf;
  --border-color: #1e293b;
}

/* 1. FORCE BODY & MAIN BACKGROUND */
[data-theme="dark"] body, 
[data-theme="dark"] main,
[data-theme="dark"] section {
  background-color: #020617 !important;
  color: #ffffff !important;
}

/* 2. FORCE ALL CARDS & BOXES TO BE DARK (The Fix) */
/* This targets every possible card class you might have */
[data-theme="dark"] .card, 
[data-theme="dark"] .tool-tile, 
[data-theme="dark"] .cluster-card,
[data-theme="dark"] .result-box, 
[data-theme="dark"] .white-box,
[data-theme="dark"] .container-white {
  background-color: #020617 !important; /* Force Black */
  background: #020617 !important;
  border: 1px solid #1e293b !important; /* Dark Blue Border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.8) !important;
  color: #ffffff !important;
}

/* 3. FIX THE TEXT INSIDE CARDS */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] strong,
[data-theme="dark"] b {
  color: #ffffff !important; /* Pure White Headings */
}

[data-theme="dark"] p, 
[data-theme="dark"] li, 
[data-theme="dark"] span, 
[data-theme="dark"] label,
[data-theme="dark"] small {
  color: #cbd5e1 !important; /* Readable Light Grey/Blue */
}

/* 4. FIX THE TYPING TEST & HISTORY TABLES (From Screenshot 4) */
[data-theme="dark"] .history-table, 
[data-theme="dark"] .table-responsive,
[data-theme="dark"] table {
  background-color: #020617 !important;
  color: #ffffff !important;
}

/* 5. FIX INPUTS & DROPDOWNS (So they aren't white) */
[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea,
[data-theme="dark"] .form-control {
  background-color: #0f172a !important; /* Dark Slate */
  border: 1px solid #334155 !important;
  color: #ffffff !important;
}

/* 6. FIX THE HEADER & FOOTER */
[data-theme="dark"] .site-header, 
[data-theme="dark"] .site-footer {
  background-color: #020617 !important;
  border-color: #1e293b !important;
}

/* 7. FIX THE "RESULT" BOXES (Like in EMI Calc) */
[data-theme="dark"] .result, 
[data-theme="dark"] .output-area {
  background: rgba(45, 212, 191, 0.1) !important; /* Very dark teal tint */
  border: 1px solid var(--teal-glow) !important;
  color: #ffffff !important;
}

/* 8. HOVER EFFECTS (Make them glow) */
[data-theme="dark"] .tool-tile:hover, 
[data-theme="dark"] .cluster-card:hover {
  border-color: #2dd4bf !important;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(45, 212, 191, 0.2) !important;
}

/* 9. SEARCH DROPDOWN FIX */
[data-theme="dark"] .search-results-dropdown {
  background: #020617 !important;
  border: 1px solid #1e293b !important;
}
[data-theme="dark"] .search-results-dropdown a {
  color: #ffffff !important; 
  background: #020617 !important;
}
[data-theme="dark"] .search-results-dropdown li:hover,
[data-theme="dark"] .search-results-dropdown a:hover {
  background: #1e293b !important;
}

/* =========================================
   FINAL DARK MODE FIX (Paste at the VERY BOTTOM of styles.css)
   ========================================= */

/* 1. Fix the "Solve Your Problem" & "Most Searched" Cards */
[data-theme="dark"] .curiosity-card,
[data-theme="dark"] .trend-card,
[data-theme="dark"] .spotlight-banner,
[data-theme="dark"] .faq-list details,
[data-theme="dark"] .notify-box,
[data-theme="dark"] .roadmap-list li,
[data-theme="dark"] .vote-btn {
  background-color: #020617 !important;
  background: #020617 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

/* 2. Fix the Text inside those cards (Make it visible) */
[data-theme="dark"] .curiosity-card h3,
[data-theme="dark"] .curiosity-card p,
[data-theme="dark"] .trend-name,
[data-theme="dark"] .c-content h3,
[data-theme="dark"] .c-content p {
  color: #ffffff !important;
}

[data-theme="dark"] .curiosity-card .c-icon {
  background: rgba(45, 212, 191, 0.15) !important; /* Dark teal circle */
  color: #2dd4bf !important;
}

/* 3. Hover Effects (Glow instead of turning white) */
[data-theme="dark"] .curiosity-card:hover,
[data-theme="dark"] .trend-card:hover {
  background: #020617 !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.15) !important;
  transform: translateY(-4px);
}

/* 4. Fix the Calculator Result Boxes (e.g. EMI, Pregnancy) */
[data-theme="dark"] .result {
  background: rgba(14, 158, 148, 0.1) !important; /* Dark Transparent Teal */
  border: 1px solid #2dd4bf !important;
  color: #ffffff !important;
}
[data-theme="dark"] .result strong {
  color: #2dd4bf !important; /* Neon Teal Numbers */
}

/* =========================================
   FIX FOR INLINE STYLED TIPS & ALERTS
   (Overrides style="background:..." in HTML)
   ========================================= */

/* 1. Fix the Teal "Pro Tip" Boxes */
[data-theme="dark"] div[style*="#e6fffa"],
[data-theme="dark"] div[style*="background:#e6fffa"], 
[data-theme="dark"] div[style*="background: #e6fffa"] {
  background-color: rgba(14, 158, 148, 0.15) !important; /* Dark Teal Tint */
  border: 1px solid #2dd4bf !important;                  /* Neon Teal Border */
  color: #ffffff !important;
}

/* 2. Fix the Red "Warning/Error" Boxes */
[data-theme="dark"] div[style*="#fff5f5"],
[data-theme="dark"] div[style*="background:#fff5f5"],
[data-theme="dark"] div[style*="background: #fff5f5"] {
  background-color: rgba(229, 62, 62, 0.15) !important;  /* Dark Red Tint */
  border: 1px solid #fc8181 !important;                  /* Neon Red Border */
  color: #ffffff !important;
}

/* 3. Fix the Yellow "Note" Boxes (if any) */
[data-theme="dark"] div[style*="#fffaf0"],
[data-theme="dark"] div[style*="background:#fffaf0"] {
  background-color: rgba(214, 158, 46, 0.15) !important; /* Dark Gold Tint */
  border: 1px solid #f6e05e !important;                  /* Neon Gold Border */
  color: #ffffff !important;
}

/* 4. Ensure the text inside Pro Tips is visible */
[data-theme="dark"] strong, 
[data-theme="dark"] b {
  color: #ffffff !important;
}

/* =========================================
   PDF TOOLS PAGE DARK MODE FIX
   (Overrides internal HTML styles)
   ========================================= */

/* 1. The Main Workspace Container */
[data-theme="dark"] .workspace {
  background: #020617 !important; /* Pure Black */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8) !important;
}

/* 2. The Tool Navigation Buttons (Chips) */
[data-theme="dark"] .tool-chip {
  background: #020617 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .tool-chip:hover {
  border-color: #2dd4bf !important; /* Teal Glow */
  background: #0f172a !important;
}

[data-theme="dark"] .tool-chip.active {
  background: #2dd4bf !important; /* Neon Teal */
  color: #000000 !important;      /* Black text on Teal */
  border-color: #2dd4bf !important;
  font-weight: 800 !important;
}

/* 3. The Drop Zone (Where you upload files) */
[data-theme="dark"] .drop-zone {
  background: rgba(15, 23, 42, 0.6) !important; /* Dark Blue tint */
  border: 2px dashed rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .drop-zone:hover {
  background: #020617 !important;
  border-color: #2dd4bf !important;
}

[data-theme="dark"] .drop-zone h3 {
  color: #ffffff !important;
}

[data-theme="dark"] .drop-zone p.muted {
  color: #cbd5e1 !important;
}

/* 4. The Controls Panel (Sliders & Options) */
[data-theme="dark"] .controls-panel {
  background: #020617 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .control-group label {
  color: #ffffff !important;
}

[data-theme="dark"] .controls-panel input[type="text"],
[data-theme="dark"] .controls-panel input[type="password"] {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* 5. PDF Grid Items (Thumbnails) */
[data-theme="dark"] .merge-item,
[data-theme="dark"] .page-item {
  background: #020617 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

[data-theme="dark"] .merge-item span,
[data-theme="dark"] .page-num {
  color: #cbd5e1 !important;
}

/* 6. Mini Buttons inside Grid */
[data-theme="dark"] .mini-btn {
  background: #0f172a !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
[data-theme="dark"] .mini-btn:hover {
  background: #2dd4bf !important;
  color: #000 !important;
}

/* 7. Toast Notifications */
[data-theme="dark"] .toast {
  background: #0f172a !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left-width: 4px !important; /* Keep the colored left border */
}

/* 8. Loader Text */
[data-theme="dark"] .loader-overlay {
  background: rgba(2, 6, 23, 0.9) !important;
  color: #fff !important;
}
/* =========================================
   1. TRENDING SECTION (Horizontal Scroll)
   ========================================= */
.trending-section {
  margin-top: 30px;
  margin-bottom: 30px;
}

.section-title span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #fff, #f0fdfc);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(14, 158, 148, 0.2);
  color: var(--teal);
  box-shadow: 0 2px 10px rgba(14, 158, 148, 0.05);
  display: inline-block;
}

/* Desktop Grid (Standard) */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 15px;
}

.trend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6); /* Glass */
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.trend-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(14, 158, 148, 0.15);
  border-color: var(--teal);
}

.trend-icon { font-size: 1.8rem; margin-bottom: 6px; }
.trend-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }

/* MOBILE OVERRIDE: Horizontal Scroll (Fixed) */
@media (max-width: 768px) {
  .trending-grid {
    display: flex !important;        /* Force Flexbox */
    flex-wrap: nowrap !important;    /* Force Single Line (No wrapping) */
    overflow-x: auto !important;     /* Force Scroll functionality */
    gap: 12px;
    padding-bottom: 15px;            /* Space for scroll touch area */
    
    /* Smooth Scrolling */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; 
    
    /* Bleed Effect (Optional - makes it look like it goes off-screen) */
    margin-right: -18px; 
    padding-right: 18px; 
  }
  
  .trend-card {
    /* CRITICAL FIXES BELOW */
    flex: 0 0 auto;       /* Don't grow, DON'T SHRINK, auto basis */
    width: 130px;         /* Fixed width for every card */
    min-width: 130px;     /* Double safety to prevent squishing */
    
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.7);
  }
  
  /* Optional: Show scrollbar briefly so users know they can scroll */
  .trending-grid::-webkit-scrollbar {
    height: 4px; /* Thin scrollbar */
    display: block; /* Change to 'none' if you want it invisible */
  }
  .trending-grid::-webkit-scrollbar-thumb {
    background: rgba(14, 158, 148, 0.3);
    border-radius: 10px;
  }
}

/* =========================================
   2. SEO CONTENT BLOCK (Premium Glass)
   ========================================= */
.seo-content {
  margin-top: 60px;
  padding: 40px;
  
  /* Glassmorphism Theme */
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

/* Decorative background blur */
.seo-content::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(14, 158, 148, 0.05), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.seo-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.seo-content p {
  line-height: 1.7;
  color: var(--muted);
  font-size: 1rem;
  max-width: 700px;
}

.seo-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.seo-list li {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Custom Bullet Icon */
.seo-list li::before {
  content: "✦";
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .trending-grid .trend-card,
[data-theme="dark"] .seo-content,
[data-theme="dark"] .seo-list li {
  background: rgba(30, 40, 40, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .trend-name { color: #e2e8f0; }
[data-theme="dark"] .section-title span {
  background: rgba(20, 184, 173, 0.1);
  color: #2dd4bf;
  border-color: rgba(20, 184, 173, 0.2);
}


/* =========================================
   HOMEPAGE UPGRADES (Click Magnet)
   ========================================= */

/* 1. Typewriter Cursor */
.typewriter-text {
  color: var(--teal);
  position: relative;
}
.typewriter-text::after {
  content: '|';
  position: absolute;
  right: -8px;
  animation: blink 1s infinite;
  color: var(--text);
}
@keyframes blink { 50% { opacity: 0; } }

/* 2. Curiosity Grid (Replaces old Trending) */
.curiosity-section { margin: 30px 0; }
.curiosity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.curiosity-card {
  background: white;
  border: 1px solid rgba(14, 158, 148, 0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.curiosity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(14, 158, 148, 0.15);
  border-color: var(--teal);
}

.c-icon {
  font-size: 2.5rem;
  background: rgba(14, 158, 148, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.c-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 800;
}

.c-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.3;
}

.c-arrow {
  margin-left: auto;
  color: var(--teal);
  font-weight: bold;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.curiosity-card:hover .c-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* 3. Featured Spotlight (PDF Tool) */
.spotlight-banner {
  background: linear-gradient(135deg, #0e9e94 0%, #065f5a 100%);
  border-radius: 24px;
  padding: 40px;
  margin: 40px 0;
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(14, 158, 148, 0.3);
}

.spotlight-content { max-width: 60%; z-index: 2; }
.spotlight-content h2 { margin: 0 0 10px 0; font-size: 2rem; color:white; }
.spotlight-content p { color: rgba(255,255,255,0.9); margin-bottom: 20px; }

.spotlight-btn {
  background: white;
  color: var(--teal);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}
.spotlight-btn:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.spotlight-decor {
  font-size: 10rem;
  position: absolute;
  right: -20px;
  bottom: -40px;
  opacity: 0.2;
  transform: rotate(-15deg);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .spotlight-banner { flex-direction: column; text-align: center; padding: 30px 20px; }
  .spotlight-content { max-width: 100%; }
  .spotlight-decor { font-size: 8rem; right: 50%; transform: translateX(50%); bottom: -50px; opacity: 0.1; }
  .curiosity-grid { grid-template-columns: 1fr; }
}

/* 4. SEO Cloud (Footer Area) */
.seo-cloud {
  background: white;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 40px 0;
  margin-top: 60px;
}
.seo-cloud h3 { font-size: 1rem; color: var(--text); margin-bottom: 15px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-tag {
  font-size: 0.85rem;
  color: var(--muted);
  background: #f7f7f7;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}
.seo-tag:hover { background: var(--teal); color: white; }


/* =========================================
   PWA INSTALL BUTTON (Click Magnet)
   ========================================= */
#install-btn {
  /* Positioning & Base */
  display: none; /* Hidden by default, shown by JS */
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  
  /* Glassmorphism Theme */
  background: rgba(14, 158, 148, 0.95); /* Deep Teal */
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  
  /* Shape & Text */
  padding: 14px 24px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  
  /* 3D Shadow for "Clickability" */
  box-shadow: 
    0 10px 20px rgba(14, 158, 148, 0.3),
    0 0 0 4px rgba(14, 158, 148, 0.1); /* Ring */
    
  /* Animation */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: pulse-magnet 3s infinite;
}

#install-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 15px 30px rgba(14, 158, 148, 0.4),
    0 0 0 6px rgba(14, 158, 148, 0.15);
  background: #0b8c83;
}

#install-btn:active {
  transform: scale(0.95);
}

/* The "Heartbeat" Animation */
@keyframes pulse-magnet {
  0% { box-shadow: 0 0 0 0 rgba(14, 158, 148, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(14, 158, 148, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 158, 148, 0); }
}

/* Mobile Tweak */
@media (max-width: 768px) {
  #install-btn {
    bottom: 20px;
    right: 50%;
    transform: translateX(50%); /* Center on mobile */
    width: 90%; /* Full width bar */
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  }
  #install-btn:hover { transform: translateX(50%) translateY(-4px); } /* Keep centered on hover */
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    overflow: hidden;
}

.search-results-dropdown li:last-child a {
    border-bottom: none !important;
}