/* ============================================================
   CRITICAL DISPLAY RULES — DO NOT REMOVE
   These ensure nav shows correctly on all screen sizes
   ============================================================ */
#mobile-menu { display: none !important; }

@media (min-width: 901px) {
  #mobile-menu      { display: none !important; }
  .nav-main         { display: flex !important; }
  .nav-toggle       { display: none !important; }
  .nav-cta          { display: flex !important; }
}

@media (max-width: 900px) {
  .nav-main         { display: none !important; }
  .nav-cta          { display: none !important; }
  .nav-toggle       { display: flex !important; }
}

/* ============================================================ */

/* ============================================================
   FlipFiles.io — Global Stylesheet v2.0
   Professional · Elegant · Ad-Ready · Mobile-First
   ============================================================ */

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

:root {
  /* Brand colours */
  --primary:       #1a56db;
  --primary-dark:  #1342b0;
  --primary-light: #ebf0ff;
  --primary-mid:   #c3d3ff;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --success:       #059669;
  --danger:        #dc2626;

  /* Neutrals */
  --text:          #0f172a;
  --text-2:        #334155;
  --text-3:        #64748b;
  --text-4:        #94a3b8;
  --bg:            #ffffff;
  --bg-2:          #f8fafc;
  --bg-3:          #f1f5f9;
  --border:        #e2e8f0;
  --border-2:      #cbd5e1;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
  --shadow:    0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.10);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.12);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Spacing */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Base ── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: var(--font-body); }
::selection { background: var(--primary-light); color: var(--primary-dark); }

/* ── Security: disable right-click & text-select on key areas ── */
.no-select { user-select: none; -webkit-user-select: none; }

/* ═══════════════════════════════════════
   TOP ANNOUNCEMENT BAR
═══════════════════════════════════════ */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #2563eb 50%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.announcement-bar a { color: var(--accent); text-decoration: underline; }

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 66px;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo em { color: var(--accent); font-style: normal; }
.logo sup { font-size: 0.5em; color: var(--text-4); vertical-align: super; }

/* Mega menu nav */
.nav-main {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
}
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-item > a:hover, .nav-item > button:hover,
.nav-item > a.active { color: var(--primary); background: var(--primary-light); }
.nav-item > a.active { color: var(--primary); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
  /* Bridge gap between button and dropdown so mouse doesn't lose hover */
  margin-top: 0;
  padding-top: 12px;
}
/* Invisible bridge to prevent hover gap */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: var(--transition);
}
.nav-dropdown a:hover { background: var(--bg-2); color: var(--primary); }
.nav-dropdown a .dd-icon { font-size: 1rem; width: 20px; text-align: center; }

/* Nav CTA */
.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  margin-left: auto;
}
/* Desktop: always show nav-main, hide toggle */
.nav-toggle { display: none; }

@media(max-width: 900px) {
  .nav-main { display: none !important; }
  .nav-cta  { display: none !important; }
  .nav-toggle { display: flex !important; }
  .navbar-inner { gap: 12px; }
  /* Mobile menu - JS controls display via inline style */
  .mobile-menu {
    position: fixed;
    top: 66px; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 998;
    overflow-y: auto;
    padding: 16px 24px 40px;
    border-top: 1px solid var(--border);
  }
  .mobile-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
  }
  .mobile-menu .mm-section {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-4);
    padding: 20px 0 8px;
  }
}

/* ═══════════════════════════════════════
   AD SLOTS
═══════════════════════════════════════ */
.ad-slot {
  background: var(--bg-3);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}
.ad-slot-leaderboard { width: 100%; height: 90px; margin: 0 auto 32px; max-width: 728px; }
.ad-slot-rectangle { width: 300px; height: 250px; }
.ad-slot-banner { width: 100%; height: 60px; }
.ad-wrapper {
  text-align: center;
  padding: 16px 0;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f5ff 0%, #fff 45%, #fffbeb 100%);
  padding: 96px 24px 80px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 28px;
  box-shadow: var(--shadow-xs);
  letter-spacing: 0.3px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 20px;
}
.hero h1 .highlight {
  color: var(--primary);
  position: relative;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-light));
  border-radius: 2px;
  z-index: -1;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-3);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}
.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}
.hero-pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 480px;
  margin: 0 auto;
}
.hero-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  box-shadow: var(--shadow-xs);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.hero-stat span { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; display: block; }

/* ═══════════════════════════════════════
   SECTIONS
═══════════════════════════════════════ */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-2); }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 14px;
}
.section-header p {
  color: var(--text-3);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   TOOLS GRID
═══════════════════════════════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  opacity: 0;
  transition: var(--transition);
}
.tool-card:hover {
  border-color: var(--primary-mid);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.tool-card:hover::before { opacity: 1; }
.tool-icon-wrap {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}
.tool-card:hover .tool-icon-wrap { background: var(--primary); filter: brightness(1.1); }
.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.tool-card p {
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.6;
  flex: 1;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tool-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-light);
  color: #92400e;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════
   FEATURES / WHY US
═══════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.feature-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p { font-size: 0.84rem; color: var(--text-3); line-height: 1.65; }

/* ═══════════════════════════════════════
   BLOG CARDS
═══════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, #ede9fe 100%);
  flex-shrink: 0;
}
.blog-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text);
}
.blog-card p { font-size: 0.84rem; color: var(--text-3); line-height: 1.65; flex: 1; margin-bottom: 16px; }
.blog-meta { font-size: 0.76rem; color: var(--text-4); display: flex; align-items: center; gap: 8px; }
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: var(--text);
  color: #94a3b8;
}
.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 48px;
}
@media(max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media(max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand .logo { color: #fff; margin-bottom: 14px; display: block; font-size: 1.3rem; }
.footer-brand p { font-size: 0.84rem; line-height: 1.7; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.84rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 24px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #64748b; text-decoration: none; transition: var(--transition); }
.footer-bottom-links a:hover { color: #94a3b8; }

/* ═══════════════════════════════════════
   TOOL PAGE LAYOUT
═══════════════════════════════════════ */
.tool-page-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #f0f5ff 50%, #fff 100%);
  padding: 52px 24px 48px;
  border-bottom: 1px solid var(--border);
}
.tool-page-hero-inner { max-width: 820px; margin: 0 auto; }
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-4); }
.tool-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}
.tool-page-hero p {
  color: var(--text-3);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 600px;
}
.tool-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.tool-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--success);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 100px;
}

/* Tool workspace */
.tool-workspace {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}
.tool-sidebar {
  width: 300px;
  flex-shrink: 0;
}
.tool-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
@media(max-width: 960px) {
  .tool-layout { flex-direction: column; }
  .tool-sidebar { width: 100%; }
}
.tool-main { flex: 1; min-width: 0; }

/* ═══════════════════════════════════════
   UPLOAD ZONE
═══════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-2);
  position: relative;
  margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone input[type="file"] { display: none; }
.upload-icon-wrap {
  width: 72px; height: 72px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.upload-zone:hover .upload-icon-wrap { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.upload-zone h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.upload-zone p { font-size: 0.84rem; color: var(--text-3); }
.upload-zone .upload-btn-label {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.upload-zone:hover .upload-btn-label { background: var(--primary-dark); }

/* ═══════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════ */
.form-group { margin-bottom: 22px; }
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
select,
input[type="number"],
input[type="text"],
input[type="url"],
input[type="email"],
textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select:focus, input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
textarea { resize: vertical; min-height: 120px; }
input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }
input[type="color"] {
  width: 100%; height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 4px;
  background: #fff;
}
.options-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width: 500px) { .options-row { grid-template-columns: 1fr; } }
.range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-3); margin-top: 5px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 14px rgba(26,86,219,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,86,219,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 14px rgba(5,150,105,0.25);
}
.btn-success:hover { opacity: 0.93; transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 9px 18px; font-size: 0.84rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════
   RESULT / OUTPUT BOX
═══════════════════════════════════════ */
.result-box {
  display: none;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 28px;
  text-align: center;
  animation: fadeUp 0.4s ease both;
}
.result-box.visible { display: block; }
.result-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
canvas.preview-canvas, img.preview-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════
   INFO / FILE BOX
═══════════════════════════════════════ */
.info-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-mid);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.84rem;
  color: var(--primary-dark);
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.file-info {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.84rem;
  color: var(--text-3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-info strong { color: var(--text); }

/* ═══════════════════════════════════════
   LOADING INDICATOR
═══════════════════════════════════════ */
.loading-box {
  display: none;
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
}
.loading-box.visible { display: block; }
.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.loading-box p { font-size: 0.9rem; color: var(--text-3); }
.progress-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 16px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s;
}

/* ═══════════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════════ */
.about-hero {
  background: linear-gradient(135deg, var(--primary-light), #fefce8);
  padding: 80px 24px;
  text-align: center;
}
.about-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.about-hero p { font-size: 1.05rem; color: var(--text-3); max-width: 540px; margin: 0 auto; }
.about-content { max-width: 740px; margin: 0 auto; padding: 64px 24px; }
.about-content h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--text);
}
.about-content p { color: var(--text-3); margin-bottom: 16px; line-height: 1.85; font-size: 0.98rem; }

/* ═══════════════════════════════════════
   BLOG PAGE & POST
═══════════════════════════════════════ */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-light), #fff);
  padding: 64px 24px 48px;
  text-align: center;
}
.blog-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.blog-hero p { color: var(--text-3); font-size: 1rem; max-width: 480px; margin: 0 auto; }

.post-content { max-width: 720px; margin: 0 auto; padding: 64px 24px; }
.post-header { margin-bottom: 40px; }
.post-header .blog-tag { font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--primary); display: block; margin-bottom: 12px; }
.post-header h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 16px; }
.post-header .post-meta { font-size: 0.82rem; color: var(--text-4); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-body h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 40px 0 14px; color: var(--text); }
.post-body h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; color: var(--text); }
.post-body p { color: var(--text-2); margin-bottom: 18px; line-height: 1.85; font-size: 0.98rem; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 18px; }
.post-body li { color: var(--text-2); margin-bottom: 8px; line-height: 1.75; font-size: 0.98rem; }
.post-body strong { font-weight: 700; color: var(--text); }
.post-body .callout { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 24px 0; font-size: 0.92rem; color: var(--primary-dark); }

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate { animation: fadeUp 0.5s ease both; }
.d1 { animation-delay: .08s; }
.d2 { animation-delay: .16s; }
.d3 { animation-delay: .24s; }
.d4 { animation-delay: .32s; }
.d5 { animation-delay: .40s; }
.d6 { animation-delay: .48s; }

/* ═══════════════════════════════════════
   UTILITIES
═══════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* ═══════════════════════════════════════
   RESPONSIVE HELPERS
═══════════════════════════════════════ */
@media(max-width: 768px) {
  .section { padding: 56px 16px; }
  .hero { padding: 72px 16px 60px; }
  .tool-workspace { padding: 32px 16px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .footer-top { padding: 48px 16px 32px; }
  .ad-slot-leaderboard { height: 60px; }
}
@media(max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 8px; }
  .hero-stat strong { font-size: 1.4rem; }
}

/* ═══════════════════════════════════════
   ANALYTICS DASHBOARD
═══════════════════════════════════════ */
#stats-dashboard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 48px;
}
.stats-header { margin-bottom: 24px; }
.stats-header h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.stats-header p { font-size: 0.85rem; color: var(--text-3); }
.stats-total-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-big {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-big strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-big span { font-size: 0.75rem; color: var(--text-3); }
.stats-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 14px;
}
.stats-bars { display: flex; flex-direction: column; gap: 10px; }
.stat-bar-row { display: flex; align-items: center; gap: 12px; }
.stat-bar-label { font-size: 0.82rem; color: var(--text-2); min-width: 160px; font-weight: 500; }
@media(max-width:600px) { .stat-bar-label { min-width: 110px; font-size:0.75rem; } }
.stat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.stat-bar-val { font-size: 0.8rem; font-weight: 700; color: var(--primary); min-width: 36px; text-align: right; }

/* Page visit badge */
.page-visit-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-4);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  margin-top: 10px;
}
.page-visit-badge::before { content: '👁️'; font-size: 0.8rem; }

/* ── CRITICAL NAV RULES (must override everything) ── */
.navbar { display: block !important; }
.navbar-inner { display: flex !important; align-items: center !important; }
@media (min-width: 901px) {
  .nav-main { display: flex !important; }
  .nav-toggle { display: none !important; }
  .nav-cta { display: flex !important; }
}
@media (max-width: 900px) {
  .nav-main { display: none !important; }
  .nav-toggle { display: flex !important; align-items: center !important; justify-content: center !important; }
}

/* ── Stats dashboard responsive ── */
@media(max-width: 600px) {
  #stats-dashboard > div > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media(max-width: 360px) {
  #stats-dashboard > div > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
}
