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

/* ══ PSX OFFICE DESIGN SYSTEM ═══════════════════════════════════════════════ */
:root {
  --primary:       #dc2626;
  --primary-dark:  #b91c1c;
  --primary-light: #fee2e2;
  --text-dark:     #1a1a2e;
  --text-secondary:#2d2d44;
  --text-tertiary: #4a4a68;
  --gray:          #6b7280;
  --gray-light:    #9ca3af;
  --bg:            #ffffff;
  --bg-soft:       #f9fafb;
  --bg-muted:      #f3f4f6;
  --border:        #e5e7eb;
  --border-light:  #f3f4f6;
  --card-bg:       #ffffff;
  --card-shadow:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
  --success:       #16a34a;
  --warning:       #d97706;
  --radius-xs:     6px;
  --radius-sm:     10px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-pill:   999px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.05);
  --shadow:        0 2px 6px rgba(0,0,0,0.07);
  --shadow-lg:     0 4px 14px rgba(0,0,0,0.10);
  --red-glow:      0 0 0 3px rgba(220,38,38,.12);
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-weight: 400;
  line-height: 1.6;
}

/* ══ PAGE LOADER ════════════════════════════════════════════════════════════ */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity .35s ease, visibility .35s ease;
}
.page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-icon {
  width: 56px; height: 56px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}
@keyframes loaderPulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.08);opacity:.7} }
.loader-bar {
  width: 120px; height: 3px; margin-top: 20px;
  background: var(--bg-muted); border-radius: 3px; overflow: hidden;
}
.loader-bar-fill {
  width: 40%; height: 100%;
  background: var(--primary); border-radius: 3px;
  animation: loaderSlide 1s ease-in-out infinite;
}
@keyframes loaderSlide { 0%{transform:translateX(-100%)} 100%{transform:translateX(350%)} }

/* ══ NAVBAR ══════════════════════════════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  height: 68px;
  display: flex; align-items: center;
  padding: 0 clamp(16px, 4vw, 40px);
  gap: 8px;
}
.navbar-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0; margin-right: 20px;
}
.navbar-logo-img {
  height: 40px; width: auto; display: block;
}

/* ── Nav items with hover mega-dropdown ──────────────────────────── */
.navbar-nav {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; font-family: var(--font);
  color: var(--text-tertiary); background: none;
  text-decoration: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-link:hover { background: var(--bg-muted); color: var(--text-dark); }
.nav-caret {
  transition: transform .2s; flex-shrink: 0; margin-left: 2px;
}
.has-dropdown:hover .nav-caret { transform: rotate(180deg); }
.has-dropdown:hover > .nav-link { color: var(--primary); background: var(--bg-muted); }

/* ── Mega dropdown (hover-based like ilovepdf) ───────────────────── */
.mega-dropdown {
  display: none;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px;
  min-width: 300px; z-index: 100;
  box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.mega-dropdown-lg {
  min-width: 440px;
  grid-template-columns: 1fr 1fr;
}
.has-dropdown::after {
  content: ''; position: absolute;
  top: 100%; left: 0; right: 0; height: 12px;
  display: none;
}
.has-dropdown:hover::after { display: block; }
.has-dropdown:hover .mega-dropdown {
  display: grid;
  animation: megaIn .18s ease-out;
}
@keyframes megaIn { from { opacity:0; transform:translateX(-50%) translateY(-6px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

.mega-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: inherit; transition: background .12s;
}
.mega-item:hover { background: var(--bg-muted); }
.mega-item:hover strong { color: var(--primary); }
.mega-icon {
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mega-item div:last-child { min-width: 0; }
.mega-item strong {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text-dark); transition: color .12s;
}
.mega-item span {
  display: block; font-size: 12px; color: var(--gray);
  margin-top: 1px; white-space: nowrap;
}

/* ── Featured CV nav link ────────────────────────────────────────── */
.nav-link-cv {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--primary); background: var(--primary-light);
  transition: all .15s; white-space: nowrap;
  border: 1px solid rgba(220,38,38,.1);
}
.nav-link-cv:hover { background: #fecaca; }

/* ── Google Play button ──────────────────────────────────────────── */
.navbar-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; margin-left: auto;
}
.btn-gplay {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text-tertiary); background: transparent;
  border: none; transition: all .15s;
  white-space: nowrap;
}
.btn-gplay:hover { color: var(--text-dark); }
.gplay-icon { flex-shrink: 0; }

/* ── Hamburger ───────────────────────────────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border: none;
  background: none; border-radius: var(--radius-xs); transition: background .15s;
}
.hamburger:hover { background: var(--bg-muted); }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-dark); border-radius: 2px; transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══ MOBILE SIDEBAR ══════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 1001;
  backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s;
}
.sidebar-overlay.open { display: block; opacity: 1; }
.mobile-sidebar {
  position: fixed; top: 0; left: -320px; bottom: 0;
  width: 300px; background: var(--bg); z-index: 1002;
  transition: left .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.mobile-sidebar.open { left: 0; }
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-logo-link { display: flex; align-items: center; text-decoration: none; }
.sidebar-logo-img { height: 34px; width: auto; }
.sidebar-close {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray); transition: all .15s;
}
.sidebar-close:hover { background: var(--bg-muted); }

.sidebar-section { padding: 12px 12px 8px; }
.sidebar-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gray-light);
  padding: 0 8px; margin-bottom: 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-tertiary);
  font-size: 14px; font-weight: 500;
  transition: all .15s; margin-bottom: 1px;
}
.sidebar-link:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-link-featured {
  color: var(--primary); font-weight: 700;
  background: var(--primary-light);
  border: 1px solid rgba(220,38,38,.12);
}
.sidebar-link-featured:hover { background: #fecaca; }

.sidebar-app { padding: 12px; border-top: 1px solid var(--border); margin-top: auto; }
.sidebar-app-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--text-tertiary); background: var(--bg-muted);
  border: 1px solid var(--border); transition: all .15s;
}
.sidebar-app-link:hover { background: var(--bg); color: var(--text-dark); }
.sidebar-app-link .gplay-icon { flex-shrink: 0; }

/* ══ HERO (compact, tools-first like ilovepdf) ═══════════════════════════════*/
.hero {
  background: var(--bg);
  padding: clamp(32px,5vw,52px) clamp(16px,4vw,40px) clamp(20px,3vw,32px);
  text-align: center;
}
.hero-inner {
  max-width: 720px; margin: 0 auto;
}
.hero h1 {
  font-size: clamp(28px,4.5vw,46px); font-weight: 800; color: var(--text-dark);
  line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 12px;
}
.hero-sub {
  font-size: clamp(16px,2vw,19px); color: var(--gray);
  line-height: 1.6; font-weight: 400; max-width: 560px; margin: 0 auto;
}

/* ══ HOMEPAGE TOOLS GRID (ilovepdf-style big cards, 4 per row) ═══════════════ */
.tools-section {
  background: var(--bg-soft);
  padding: clamp(32px,5vw,56px) clamp(16px,4vw,40px);
}
.tools-section-inner {
  max-width: 1200px; margin: 0 auto;
}
.tools-grid-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tool-card-home {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  text-decoration: none; color: inherit;
  transition: all .25s ease;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 12px;
  box-shadow: var(--card-shadow);
}
.tool-card-home:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(220,38,38,.18);
}

.tool-card-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .25s;
}
.tool-card-home:hover .tool-card-icon { transform: scale(1.08); }

.tool-card-home h2 {
  font-size: 16px; font-weight: 700; color: var(--text-dark);
  line-height: 1.3; margin: 0;
}
.tool-card-home p {
  font-size: 14px; color: var(--gray); line-height: 1.5;
  margin: 0;
}

/* Featured card (CV Generator) */
.tool-card-featured-home {
  border: 2px solid rgba(220,38,38,.15);
  background: linear-gradient(135deg, #fffbfb, #fff);
}
.tool-card-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  background: var(--primary); color: white;
  padding: 3px 10px; border-radius: var(--radius-pill);
}

/* ══ WHY SECTION ═════════════════════════════════════════════════════════════ */
.why-section {
  background: var(--bg);
  padding: clamp(40px,6vw,72px) clamp(16px,4vw,40px);
}
.why-inner {
  max-width: 1200px; margin: 0 auto;
}
.why-inner > h2 {
  font-size: clamp(22px,3.5vw,32px); font-weight: 800;
  color: var(--text-dark); text-align: center;
  letter-spacing: -0.3px; margin-bottom: 40px;
}
.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.why-item { text-align: center; }
.why-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.why-item h3 {
  font-size: 16px; font-weight: 700; color: var(--text-dark);
  margin-bottom: 8px;
}
.why-item p {
  font-size: 14px; color: var(--gray); line-height: 1.6;
}

/* ══ SECTIONS (generic) ════════════════════════════════════════════════════════ */
.section { padding: clamp(32px,5vw,56px) clamp(16px,4vw,40px); background: var(--bg-soft); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header-row { margin-bottom: 8px; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.section-title { font-size: clamp(22px,3.5vw,32px); font-weight: 800; color: var(--text-dark); letter-spacing: -0.3px; margin-bottom: 8px; }
.section-sub { font-size: 15px; color: var(--gray); max-width: 520px; font-weight: 400; }

/* ══ REVIEWS ═════════════════════════════════════════════════════════════════ */
.section-reviews { background: var(--bg-soft); }
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; margin-top: 0;
}
.review-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--card-shadow);
}
.review-stars { display: flex; gap: 3px; }
.review-text { font-size: 15px; color: var(--text-tertiary); line-height: 1.7; flex: 1; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.review-role { font-size: 12px; color: var(--gray); margin-top: 1px; }

/* ══ OLD HOMEPAGE CLASSES (kept for tool.html compatibility) ═════════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr));
  gap: 12px; margin-top: 16px;
}
.tool-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 14px 16px;
  text-decoration: none; color: inherit;
  transition: all .2s ease;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
  box-shadow: var(--card-shadow);
}
.tool-card:hover {
  border-color: rgba(220,38,38,.2);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.tool-card-featured {
  border: 1.5px solid rgba(220,38,38,.2);
  background: linear-gradient(135deg, #fffbfb, #fff);
}
.tool-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-card h3 { font-size: 14px; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }
.tool-card p  { font-size: 12px; color: var(--gray-light); line-height: 1.5; }

/* Category dividers */
.cat-divider {
  display: flex; align-items: center; gap: 14px; margin: 28px 0 12px;
}
.cat-divider-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gray); white-space: nowrap;
}
.cat-divider-icon {
  width: 24px; height: 24px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-muted); color: var(--gray);
}
.cat-divider::before,.cat-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ══ FEATURED SECTION (CV GENERATOR) ════════════════════════════════════════ */
.section-featured { background: var(--bg); padding-top: clamp(24px,4vw,40px); padding-bottom: clamp(24px,4vw,40px); }
.featured-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-xl); padding: clamp(28px,4vw,48px);
  display: flex; align-items: center; gap: clamp(24px,4vw,48px);
  overflow: hidden; position: relative;
}
.featured-content { flex: 1; min-width: 0; }
.featured-badge {
  display: inline-block; padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  background: rgba(220,38,38,.15); color: #fca5a5;
  margin-bottom: 16px;
}
.featured-card h2 {
  font-size: clamp(22px,3vw,32px); font-weight: 800; color: white;
  letter-spacing: -0.5px; margin-bottom: 10px;
}
.featured-card p {
  font-size: 15px; color: rgba(255,255,255,.6); line-height: 1.7; margin-bottom: 24px; max-width: 420px;
}
.btn-featured {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: white;
  padding: 12px 28px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: all .2s; box-shadow: 0 2px 12px rgba(220,38,38,.3);
}
.btn-featured:hover { background: var(--primary-dark); transform: translateY(-1px); }

.featured-visual { flex: 0 0 200px; position: relative; height: 180px; }
.featured-template-stack { position: relative; width: 100%; height: 100%; }
.ft-card {
  position: absolute; border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.ft-1 { width: 120px; height: 160px; background: white; top: 10px; left: 0; transform: rotate(-5deg); z-index: 1; }
.ft-2 { width: 120px; height: 160px; background: #f1f5f9; top: 5px; left: 30px; transform: rotate(2deg); z-index: 2; }
.ft-3 { width: 120px; height: 160px; background: white; top: 0; left: 60px; transform: rotate(6deg); z-index: 3;
  border: 2px solid var(--primary);
}

/* ══ TOOL PAGE ═══════════════════════════════════════════════════════════════ */
.tool-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-soft); }

.tool-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: clamp(16px,2.5vw,24px) clamp(16px,4vw,40px);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.tool-hero-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .3s;
}
.tool-hero-icon svg { width: 22px; height: 22px; }
.tool-hero h1 { font-size: clamp(18px,2.5vw,24px); font-weight: 800; color: var(--text-dark); letter-spacing: -0.3px; }
.tool-hero p  { font-size: 14px; color: var(--gray); margin-top: 2px; max-width: 480px; }

.tool-accepts-badge {
  font-size: 12px; font-weight: 700; padding: 4px 14px;
  border-radius: var(--radius-pill); letter-spacing: .5px; text-transform: uppercase;
  border: 1.5px solid var(--border); color: var(--gray); background: var(--bg-muted);
}

.tool-breadcrumb {
  padding: 10px clamp(16px,4vw,40px);
  background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--gray-light);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tool-breadcrumb a { color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 4px; font-weight: 500; }

.tool-body { display: grid; grid-template-columns: 300px 1fr; flex: 1; }
.tool-sidebar {
  background: var(--bg); border-right: 1px solid var(--border);
  padding: clamp(16px,2vw,22px); display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
}
.tool-main { padding: clamp(16px,2vw,28px); overflow-y: auto; }
.sidebar-block h4 {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--gray-light); margin-bottom: 10px;
}

/* Privacy info mini-box */
.privacy-info-box {
  display: flex; align-items: flex-start; gap: 9px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; color: #15803d; font-weight: 500; line-height: 1.5;
}
.privacy-info-box svg { flex-shrink: 0; margin-top: 1px; color: var(--success); }

/* How-to card */
.how-to-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 20px; box-shadow: var(--card-shadow);
}
.how-to-header {
  background: var(--bg-muted);
  color: var(--text-tertiary); font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 12px 18px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.how-to-steps { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.how-to-step { display: flex; align-items: flex-start; gap: 12px; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: white;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 14px; color: var(--text-tertiary); line-height: 1.5; padding-top: 3px; }

/* ══ DROP ZONE ═══════════════════════════════════════════════════════════════ */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: clamp(22px,3vw,36px) 20px; text-align: center;
  cursor: pointer; transition: all .2s; background: var(--bg); position: relative;
}
.drop-zone:hover,.drop-zone.drag-over { border-color: var(--primary); background: rgba(220,38,38,.02); }
.drop-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--bg-muted); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; color: var(--gray);
}
.drop-zone:hover .drop-icon { background: var(--primary-light); color: var(--primary); }
.drop-zone h3 { font-size: 14px; font-weight: 700; color: var(--text-tertiary); margin-bottom: 5px; }
.drop-zone p  { font-size: 12px; color: var(--gray-light); }
.drop-browse  { color: var(--primary); font-weight: 600; }

/* ══ FILE LIST ═══════════════════════════════════════════════════════════════ */
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); overflow: hidden;
}
.file-ext {
  width: 30px; height: 30px; border-radius: var(--radius-xs);
  background: var(--primary-light); color: var(--primary);
  font-size: 9px; font-weight: 800; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: var(--font-mono);
}
.file-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-size { font-size: 12px; color: var(--gray-light); flex-shrink: 0; }

/* ══ FORM CONTROLS ═══════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-tertiary); }
.form-input,.form-select,.form-textarea {
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg); font-size: 14px; color: var(--text-secondary);
  font-family: var(--font); transition: border-color .18s; outline: none; width: 100%;
  font-weight: 400;
}
.form-input:focus,.form-select:focus,.form-textarea:focus { border-color: var(--primary); box-shadow: var(--red-glow); }
.form-range { width: 100%; accent-color: var(--primary); cursor: pointer; height: 4px; }
.form-hint { font-size: 12px; color: var(--gray-light); }

/* ══ ACTION BAR ══════════════════════════════════════════════════════════════ */
.action-bar {
  position: sticky; bottom: 0;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: clamp(12px,2vw,16px) clamp(16px,4vw,40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.process-btn {
  background: var(--primary);
  color: white; padding: clamp(12px,2vw,14px) clamp(24px,3vw,36px);
  border-radius: var(--radius-pill); font-size: 16px; font-weight: 700;
  border: none; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 8px;
  min-width: 160px; justify-content: center;
  box-shadow: 0 2px 8px rgba(220,38,38,.25);
}
.process-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(220,38,38,.3); }
.process-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.privacy-note { font-size: 12px; color: var(--gray-light); display: flex; align-items: center; gap: 6px; }

/* ══ PROGRESS ════════════════════════════════════════════════════════════════ */
.progress-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-top: 16px; box-shadow: var(--card-shadow); }
.progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.progress-pct { font-size: 14px; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.progress-bar-track { height: 6px; background: var(--bg-muted); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; width: 0%; transition: width .4s cubic-bezier(.4,0,.2,1); }
.progress-step { font-size: 12px; color: var(--gray-light); margin-top: 8px; }

/* ══ RESULTS ═════════════════════════════════════════════════════════════════ */
.results-card { background: var(--card-bg); border: 1px solid #bbf7d0; border-radius: var(--radius-md); overflow: hidden; margin-top: 16px; box-shadow: var(--card-shadow); }
.results-header {
  background: #f0fdf4; border-bottom: 1px solid #bbf7d0;
  padding: 14px 20px; display: flex; align-items: center; gap: 10px;
  color: var(--success); font-size: 14px; font-weight: 700;
}
.download-btn {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--border-light); text-decoration: none; color: inherit;
  transition: background .15s; cursor: pointer;
}
.download-btn:hover { background: #f0fdf4; }
.download-btn:last-of-type { border-bottom: none; }
.dl-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: #f0fdf4; color: var(--success);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dl-info { flex: 1; min-width: 0; }
.dl-name { font-size: 14px; font-weight: 600; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-size { font-size: 12px; color: var(--gray-light); margin-top: 2px; }
.dl-cta {
  background: var(--success);
  color: white; padding: 9px 18px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 6px rgba(22,163,74,.2); transition: all .15s;
}
.dl-cta:hover { transform: translateY(-1px); }

.error-box {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius-sm); padding: 14px 18px;
  color: var(--primary); font-size: 14px; font-weight: 500;
  display: flex; align-items: flex-start; gap: 10px; margin-top: 12px;
}

/* ══ SIGNATURE CANVAS ════════════════════════════════════════════════════════ */
.sig-wrap { border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); position: relative; overflow: hidden; }
.sig-placeholder {
  position: absolute; top:50%; left:50%; transform: translate(-50%,-50%);
  font-size: 14px; color: var(--gray-light); pointer-events: none;
  transition: opacity .2s; display: flex; align-items: center; gap: 6px;
}
#sig-canvas { display: block; cursor: crosshair; width: 100%; }
.sig-btns { display: flex; gap: 8px; margin-top: 8px; }
.sig-btn {
  flex: 1; padding: 8px 12px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border); background: var(--bg);
  font-size: 14px; font-weight: 600; color: var(--gray);
  cursor: pointer; font-family: var(--font);
  transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sig-btn:hover { background: var(--bg-muted); }

/* ══ INFO BOX ════════════════════════════════════════════════════════════════ */
.info-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); padding: 16px 18px; }
.info-box h3 { font-size: 14px; font-weight: 700; color: #1d4ed8; margin-bottom: 6px; }
.info-box p  { font-size: 14px; color: #3b82f6; line-height: 1.6; }

/* ══ FOOTER ══════════════════════════════════════════════════════════════════ */
.footer { background: var(--text-dark); color: rgba(255,255,255,.5); }
.footer-top { padding: clamp(40px,5vw,60px) clamp(16px,4vw,40px) clamp(28px,4vw,40px); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top .footer-inner {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px;
}
.footer-logo-link { display: inline-block; margin-bottom: 14px; }
.footer-logo-img { height: 38px; width: auto; display: block; }

.footer-brand p { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.5); margin-bottom: 16px; }

.footer-gplay {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,.7); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1); transition: all .15s;
}
.footer-gplay:hover { background: rgba(255,255,255,.14); color: white; }
.footer-gplay .gplay-icon { flex-shrink: 0; }

.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.5); text-decoration: none; margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: rgba(255,255,255,.9); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px clamp(16px,4vw,40px);
}
.footer-bottom .footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; font-size: 13px; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .15s; }
.footer-bottom a:hover { color: white; }

/* ══ AD SLOTS ════════════════════════════════════════════════════════════════ */
.ad-slot { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 90px; }
.tool-card-ad { min-height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px !important; border: 1px solid #f0f0f0 !important; border-radius: 12px; background: #fafafa !important; box-shadow: none !important; pointer-events: auto; }
.tool-card-ad:hover { transform: none !important; box-shadow: none !important; }
.tool-card-ad ins { width: 100%; min-height: 160px; }

/* ══ RESPONSIVE ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .tools-grid-home { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tool-body { grid-template-columns: 265px 1fr; }
  .footer-top .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .mega-dropdown { min-width: 260px; }
  .mega-dropdown-lg { min-width: 360px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .btn-gplay .gplay-text { display: none; }
  .btn-gplay { padding: 7px 10px; }
  .hamburger { display: flex; }

  /* Hero mobile */
  .hero { padding: 24px 20px 16px; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 15px; }

  /* Tools grid mobile */
  .tools-grid-home { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-card-home { padding: 20px 16px 18px; }
  .tool-card-icon { width: 50px; height: 50px; }
  .tool-card-home h2 { font-size: 14px; }
  .tool-card-home p { font-size: 13px; }

  /* Why grid mobile */
  .why-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* Tool page mobile */
  .tool-body { grid-template-columns: 1fr; }
  .tool-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .action-bar { flex-direction: column; }
  .action-bar .process-btn { width: 100%; }
  .action-bar .privacy-note { justify-content: center; }

  /* Grid mobile (old tool cards for tool.html) */
  .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .tool-card { padding: 14px 10px 12px; }
  .tool-icon { width: 40px; height: 40px; }
  .tool-card h3 { font-size: 13px; }
  .tool-card p { font-size: 11px; }

  /* Reviews mobile */
  .reviews-grid { grid-template-columns: 1fr; }
  .review-card { padding: 22px; }

  /* Footer mobile */
  .footer-top .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }

  .download-btn { flex-wrap: wrap; gap: 10px; }
  .dl-cta { width: 100%; justify-content: center; }

  /* Featured card mobile */
  .featured-card { flex-direction: column; padding: 24px; }
  .featured-visual { flex: none; width: 100%; height: 120px; }
  .ft-1 { width: 90px; height: 120px; left: calc(50% - 110px); }
  .ft-2 { width: 90px; height: 120px; left: calc(50% - 45px); }
  .ft-3 { width: 90px; height: 120px; left: calc(50% + 20px); }
}

@media (max-width: 480px) {
  .tools-grid-home { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card-home { padding: 16px 12px 14px; gap: 8px; }
  .tool-card-icon { width: 44px; height: 44px; border-radius: 12px; }
  .tool-card-icon svg { width: 22px; height: 22px; }
  .tool-card-home h2 { font-size: 13px; }
  .tool-card-home p { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card { padding: 12px 8px 10px; gap: 6px; }
  .tool-icon { width: 36px; height: 36px; }
  .tool-icon svg { width: 18px; height: 18px; }
  .tool-card h3 { font-size: 12px; }
  .tool-card p { display: none; }

  .hero h1 { font-size: 22px; }
  .hero-sub { font-size: 14px; }

  .why-grid { grid-template-columns: 1fr; gap: 24px; }
  .why-item { text-align: left; display: flex; flex-direction: column; align-items: flex-start; }
  .why-icon { margin: 0 0 12px; }

  .footer-top .footer-inner { grid-template-columns: 1fr; }
  .btn-gplay { display: none; }

  .featured-card h2 { font-size: 20px; }
}

/* ══ INTERSTITIAL AD OVERLAY (before download) ═══════════════════════════════ */
.ad-interstitial {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: adFadeIn .25s ease;
}
@keyframes adFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ad-interstitial-box {
  background: var(--bg); border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 480px; width: 100%;
  overflow: hidden;
  animation: adSlideUp .3s ease;
}
@keyframes adSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.ad-interstitial-header {
  padding: 16px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text-tertiary);
  text-align: center;
}
.ad-interstitial-header strong {
  color: var(--primary); font-weight: 800; font-size: 16px;
}
.ad-interstitial-body {
  padding: 20px;
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
}
.ad-interstitial-slot { width: 100%; min-height: 250px; }
.ad-interstitial-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.ad-interstitial-progress {
  width: 100%; height: 4px;
  background: var(--bg-muted); border-radius: 2px; overflow: hidden;
}
.ad-interstitial-progress-fill {
  height: 100%; width: 0%;
  background: var(--primary); border-radius: 2px;
  transition: width 1s linear;
}
.ad-download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; border-radius: var(--radius-pill);
  background: var(--success); color: white;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(22,163,74,.25);
  transition: all .2s;
}
.ad-download-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(22,163,74,.3); }

/* ══ UTILITIES ═══════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: white; animation: spin .7s linear infinite; flex-shrink: 0; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
