/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #080c14;
  --bg2: #0d1220;
  --bg3: #111827;
  --surface: #141b2d;
  --surface2: #1a2438;
  --border: #1e2d45;
  --border2: #253349;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --accent-glow: rgba(59,130,246,0.15);
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --green: #10b981;
  --purple: #8b5cf6;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  overflow: visible;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 32px; padding: 0 24px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; }
.logo { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: .9rem; color: var(--text2); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 20px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  min-height: 100vh; padding-top: 64px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
  gap: 60px; position: relative;
}
.hero-bg-grid {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
  border-radius: 100px; font-size: .8rem; color: var(--accent2); font-weight: 500; margin-bottom: 24px;
}
.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -.02em;
}
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1.05rem; color: var(--text2); margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; flex-direction: column; gap: 24px; }
.hero-stats { display: flex; align-items: center; gap: 16px; }
.stat { display: flex; flex-direction: column; }
.stat span { font-size: 1.4rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: var(--text); }
.stat small { font-size: .75rem; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.stat-divider { width: 1px; height: 36px; background: var(--border2); }

/* ── HERO VISUAL ── */
.hero-visual {
  flex: 1; max-width: 480px; position: relative;
  height: 480px;
  display: flex; align-items: center; justify-content: flex-end;
}
.hero-device {
  width: 300px; height: 340px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px;
  position: relative; z-index: 1;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(59,130,246,0.1);
  overflow: hidden;
  flex-shrink: 0;
}
.device-bar { height: 40px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 8px; }
.device-bar::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.device-bar::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 20px 0 0 var(--green); }
.device-content { padding: 24px; }
.dc-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dc-icon { font-size: 1.5rem; }
.dc-line { height: 10px; border-radius: 5px; background: var(--border2); margin-bottom: 6px; }
.w80 { width: 80%; }
.w50 { width: 50%; }
.accent { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.progress-demo { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg,#3b82f6,#8b5cf6); border-radius: 3px; animation: fillProgress 2s ease-in-out infinite; }
@keyframes fillProgress { 0%{width:0} 80%{width:100%} 100%{width:100%} }
.dc-result { font-size: .85rem; color: var(--green); font-weight: 600; }

.floating-card {
  position: absolute; background: var(--surface2); border: 1px solid var(--border2);
  padding: 9px 14px; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
  white-space: nowrap; z-index: 2;
  animation: float 3s ease-in-out infinite;
}
/* Cards placed LEFT side of device, no overlap */
.card-1 { top: 30px;  left: 0;  animation-delay: 0s; }
.card-2 { top: 50%;   left: 0;  transform: translateY(-50%); animation-delay: 1s; }
.card-3 { bottom: 40px; left: 0; animation-delay: 2s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.card-2 { animation: float2 3s ease-in-out 1s infinite; }
@keyframes float2 { 0%,100%{transform:translateY(-50%)} 50%{transform:translateY(calc(-50% - 7px))} }
.tag { padding: 2px 8px; border-radius: 4px; font-size: .7rem; font-weight: 600; }
.tag.green { background: rgba(16,185,129,.15); color: var(--green); }
.tag.blue { background: rgba(59,130,246,.15); color: var(--accent2); }
.tag.purple { background: rgba(139,92,246,.15); color: var(--purple); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all .2s; letter-spacing: .01em;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full-width { width: 100%; margin-top: 16px; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── SECTIONS COMMON ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 56px; }
.eyebrow { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; display: block; }
.section-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700; margin-bottom: 12px; }
.section-header p { color: var(--text2); font-size: 1rem; }

/* ── TOOLS GRID ── */
.tools-section { padding: 100px 0; background: var(--bg); }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; cursor: pointer;
  transition: all .25s; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 200px;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0; transition: opacity .25s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(59,130,246,.1); }
.tool-card:hover::before { opacity: 1; }
.tool-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(59,130,246,.15); }
.tool-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px; flex-shrink: 0;
}
.tool-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.tool-card p { font-size: .875rem; color: var(--text2); line-height: 1.5; }
.tool-tag {
  display: inline-block;
  background: rgba(59,130,246,.18);
  color: var(--accent2);
  font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  margin-bottom: 12px;
  border: 1px solid rgba(59,130,246,.25);
  letter-spacing: .04em;
}

/* ── WORKSPACE ── */
.workspace { padding: 40px 0 100px; display: none; }
.workspace.visible { display: block; }
.tool-panel { display: none; animation: slideUp .3s ease; }
.tool-panel.active { display: block; }
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.panel-header { margin-bottom: 32px; }
.panel-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.panel-header p { color: var(--text2); }
.back-btn {
  background: none; border: 1px solid var(--border); color: var(--text2);
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: .875rem;
  margin-bottom: 20px; transition: all .2s;
}
.back-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border2); border-radius: var(--radius);
  padding: 48px; text-align: center; cursor: pointer;
  transition: all .25s; background: var(--surface); position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent); background: rgba(59,130,246,.04);
}
.upload-icon { font-size: 3rem; margin-bottom: 16px; }
.upload-zone p { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.upload-zone span { font-size: .875rem; color: var(--text3); }

/* ── FILE LIST ── */
.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: var(--radius-sm);
}
.file-item .fi-icon { font-size: 1.3rem; }
.file-item .fi-name { flex: 1; font-size: .9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fi-size { font-size: .8rem; color: var(--text3); white-space: nowrap; }
.file-item .fi-remove { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1rem; padding: 4px; border-radius: 4px; transition: all .2s; }
.file-item .fi-remove:hover { color: var(--red); background: rgba(239,68,68,.1); }

/* ── OPTIONS PANEL ── */
.options-panel { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.option-group { margin-bottom: 20px; }
.option-group label { display: block; font-size: .875rem; font-weight: 600; color: var(--text2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.option-group input[type="text"],
.option-group input[type="number"],
.option-group input[type="password"],
.option-group select {
  width: 100%; padding: 10px 14px; background: var(--surface2);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem; outline: none; transition: border-color .2s;
}
.option-group input:focus, .option-group select:focus { border-color: var(--accent); }
.option-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 4px; }

/* ── COMPRESSION LEVELS ── */
.compression-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level-btn {
  padding: 14px 10px; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: .85rem; text-align: center; transition: all .2s; line-height: 1.4;
}
.level-btn small { display: block; font-size: .75rem; color: var(--text3); margin-top: 4px; }
.level-btn:hover { border-color: var(--accent); }
.level-btn.active { border-color: var(--accent); background: rgba(59,130,246,.1); color: var(--accent2); }

/* ── PROGRESS ── */
.progress-container { margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; font-size: .875rem; color: var(--text2); margin-bottom: 8px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill-bar { height: 100%; width: 0; background: linear-gradient(90deg,#3b82f6,#8b5cf6); border-radius: 3px; transition: width .3s ease; }

/* ── RESULT BOX ── */
.result-box {
  padding: 16px 20px; background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--green); margin-bottom: 12px;
  font-weight: 500;
}

/* ── ROTATE BUTTONS ── */
.rotate-btns { display: flex; gap: 10px; }
.rotate-btn {
  flex: 1; padding: 12px; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-size: .875rem; transition: all .2s;
}
.rotate-btn.active { border-color: var(--accent); background: rgba(59,130,246,.1); color: var(--accent2); }

/* ── RADIO GROUP ── */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-label { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; color: var(--text2); }
.radio-label input { accent-color: var(--accent); width: 16px; height: 16px; }
.radio-label:hover { color: var(--text); }

/* ── PAGE GRID (REORDER) ── */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.page-thumb {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 10px; text-align: center; cursor: grab; transition: all .2s;
}
.page-thumb:hover { border-color: var(--accent); }
.page-thumb.dragging { opacity: .4; }
.page-thumb canvas { width: 100%; border-radius: 4px; margin-bottom: 8px; }
.page-thumb .page-num { font-size: .75rem; color: var(--text3); font-weight: 600; }
.hint { font-size: .875rem; color: var(--text3); text-align: center; }

/* ── PREVIEW GRID ── */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.preview-item { position: relative; }
.preview-item img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.preview-item .dl-btn {
  position: absolute; bottom: 8px; right: 8px;
  background: var(--accent); color: #fff; border: none;
  padding: 5px 10px; border-radius: 6px; font-size: .75rem; cursor: pointer;
}

/* ── PASSWORD INPUT ── */
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 48px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text3); }
.info-note { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .85rem; color: #fbbf24; margin-bottom: 16px; }

/* ── HOW IT WORKS ── */
.how-section { padding: 100px 0; background: var(--bg2); }
.steps { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.step { text-align: center; max-width: 220px; }
.step-num { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 16px; }
.step-icon { font-size: 2.5rem; margin-bottom: 16px; }
.step h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: .875rem; color: var(--text2); }
.step-arrow { font-size: 1.5rem; color: var(--border2); flex-shrink: 0; }

/* ── FAQ ── */
.faq-section { padding: 100px 0; background: var(--bg); }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.faq-q { padding: 20px 24px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.faq-arrow { color: var(--text3); font-size: .75rem; transition: transform .3s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 24px 20px; color: var(--text2); font-size: .9rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── FOOTER ── */
.footer { padding: 60px 0 24px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand p { font-size: .875rem; color: var(--text3); margin-top: 8px; max-width: 280px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-links span { font-size: .875rem; color: var(--text3); cursor: default; transition: color .2s; }
.footer-links span:hover { color: var(--text2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: .8rem; color: var(--text3); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; box-shadow: var(--shadow);
  transform: translateY(100px); opacity: 0; transition: all .3s ease;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  /* Hero: stack vertically */
  .hero {
    flex-direction: column;
    padding-top: 80px;
    text-align: center;
    min-height: auto;
    padding-bottom: 60px;
    gap: 32px;
  }
  .hero-content { max-width: 100%; }
  .hero-actions { align-items: center; }
  .hero-stats { justify-content: center; }

  /* Show hero-visual on mobile but simplified */
  .hero-visual {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  /* Floating cards: show below device on mobile */
  .hero-cards-col {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    order: 2;
  }
  .floating-card {
    position: static !important;
    transform: none !important;
    font-size: .75rem !important;
    padding: 8px 12px !important;
    animation: floatStatic 3s ease-in-out infinite !important;
  }
  /* Device card: full width centered */
  .hero-device {
    width: 100% !important;
    max-width: 340px !important;
    height: auto !important;
    min-height: 220px !important;
    position: relative !important;
    top: auto !important; right: auto !important;
    transform: none !important;
    order: 1;
  }
  /* Stack device then cards */
  .hero-visual {
    flex-direction: column !important;
    align-items: center !important;
  }

  .nav-links { display: none; }
  .compression-levels { grid-template-columns: 1fr; }
  .rotate-btns { flex-direction: column; }
}

@media (max-width: 600px) {
  .section-header h2 { font-size: 1.8rem; }
  .option-row { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }

  /* Hero text smaller */
  .hero-title { font-size: 2.2rem !important; }
  .hero-sub { font-size: .95rem; }
  .hero-badge { font-size: .75rem; }

  /* Navbar: no overflow cut */
  .navbar { overflow: visible; }
  .nav-inner { overflow: visible; }
}

/* ── COMPRESS BOXES ── */
.compress-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
}
.cbox {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: border-color .2s;
}
.cbox-editable {
  border-color: var(--border2);
  cursor: text;
}
.cbox-editable:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.cbox-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
}
.cbox-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.cbox-input {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent2);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  text-align: center;
  line-height: 1;
  -moz-appearance: textfield;
}
.cbox-input::-webkit-inner-spin-button,
.cbox-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.cbox-input::placeholder { color: var(--border2); }
.cbox-unit {
  font-size: .75rem;
  color: var(--text3);
}
.compress-hint {
  font-size: .82rem;
  color: var(--text3);
  text-align: center;
  margin: 4px 0 16px;
  min-height: 18px;
}
@media (max-width: 600px) {
  .compress-boxes { grid-template-columns: 1fr; }
}

/* ── STEPPER BUTTONS ── */
.cbox-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.cbox-step-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  user-select: none;
}
.cbox-step-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.1);
}
.cbox-step-btn:active { transform: scale(0.92); }
.cbox-input { width: 80px; }

/* ── DOWNLOAD OVERLAY ── */
.dl-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .3s ease;
}
.dl-overlay.open { display: flex; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 52px 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(59,130,246,0.1);
  animation: slideUp .35s cubic-bezier(.34,1.56,.64,1);
}

/* ── SPINNER ── */
.dl-anim-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin: 0 auto 28px;
}
.dl-spinner-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  animation: spin 1.1s linear infinite;
}
.dl-ring2 {
  inset: 10px;
  border-top-color: var(--purple);
  animation-duration: 0.8s;
  animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dl-center-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

/* ── PROGRESS ── */
.dl-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: 8px;
}
.dl-sub { color: var(--text2); font-size: .95rem; margin-bottom: 24px; min-height: 22px; }
.dl-progress-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.dl-progress-track {
  flex: 1; height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.dl-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: width .25s ease;
}
.dl-pct { font-size: .9rem; font-weight: 700; color: var(--accent2); min-width: 38px; text-align: right; }
.dl-file-info { font-size: .82rem; color: var(--text3); }

/* ── SUCCESS ── */
.dl-success-icon { margin: 0 auto 28px; width: 88px; height: 88px; }
.dl-checkmark {
  width: 88px; height: 88px;
}
.dl-checkmark svg { width: 100%; height: 100%; }
.checkmark-circle {
  stroke: var(--green); stroke-width: 2;
  stroke-dasharray: 166; stroke-dashoffset: 166;
  animation: strokeDraw .6s cubic-bezier(.65,0,.45,1) .3s forwards;
}
.checkmark-check {
  stroke: var(--green); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: strokeDraw .4s cubic-bezier(.65,0,.45,1) .8s forwards;
}
@keyframes strokeDraw { to { stroke-dashoffset: 0; } }

.dl-result-stats {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 16px 24px;
  margin: 24px 0; flex-wrap: wrap;
}
.dl-stat { display: flex; flex-direction: column; align-items: center; }
.dl-stat-val { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; }
.dl-stat-val.old { color: var(--text3); text-decoration: line-through; }
.dl-stat-val.new { color: var(--green); }
.dl-stat-val.saved { color: var(--accent2); }
.dl-stat-label { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.dl-stat-arrow { font-size: 1.4rem; color: var(--accent); }

.dl-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dl-back-btn {
  background: none; border: 1px solid var(--border2); color: var(--text2);
  padding: 10px 24px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .9rem; transition: all .2s; width: 100%;
}
.dl-back-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── ERROR ── */
.dl-error-icon { font-size: 3.5rem; margin-bottom: 20px; }

@media (max-width: 560px) {
  .dl-card { padding: 36px 24px; }
}

/* ── MOBILE FIXES ── */

/* mobile nav/tools handled in main responsive block */

/* ── DEVELOPER CREDIT ── */
.dev-credit {
  margin-top: 6px;
  font-size: .75rem;
  color: var(--text3);
  opacity: 0.7;
}
.dev-credit span {
  color: var(--accent2);
  font-weight: 500;
}

/* ── HERO VISUAL OVERLAP FIX ── */
.hero-visual {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 20px !important;
  height: auto !important;
  position: relative !important;
}
.hero-cards-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
/* Remove absolute positioning from cards — now in normal flow */
.floating-card {
  position: static !important;
  transform: none !important;
  animation: floatStatic 3s ease-in-out infinite;
}
.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: 1s; }
.card-3 { animation-delay: 2s; }
@keyframes floatStatic {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.hero-device {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  flex-shrink: 0;
}

/* ── PIKACHU CARD ── */
.dc-pikachu {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: pikaBounce 2s ease-in-out infinite;
}
@keyframes pikaBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.pika-body {
  background: #facc15;
  border-radius: 50%;
  width: 64px; height: 64px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 16px rgba(250,204,21,0.3);
  position: relative;
}
.pika-ears {
  display: flex; gap: 18px;
  position: absolute; top: -10px;
  font-size: .75rem; color: #facc15;
  text-shadow: -1px -1px 0 #1a1a1a, 1px -1px 0 #1a1a1a;
}
.pika-ears span { display: block; }
.pika-face {
  font-size: .7rem; font-weight: 700;
  color: #1a1a1a; letter-spacing: 2px;
  margin-top: 4px;
}
.pika-cheeks {
  display: flex; gap: 20px;
  position: absolute; bottom: 10px;
}
.cheek {
  font-size: .55rem; color: #f87171;
  opacity: 0.9;
}
.pika-label {
  font-size: .75rem; font-weight: 700;
  color: #facc15;
  letter-spacing: .04em;
}

/* ── EQUAL CARD SIZE FIX ── */
.tools-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  grid-auto-rows: 1fr !important;
}
.tool-card {
  min-height: 0 !important;
  height: 100% !important;
}

/* Desktop: 4 columns */
@media (min-width: 900px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Tablet: 2 columns */
@media (max-width: 899px) and (min-width: 601px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 1fr !important;
  }
  .tool-card { padding: 20px; }
  .tool-icon { width: 46px; height: 46px; font-size: 1.3rem; }
}

/* Mobile: 2 columns compact */
@media (max-width: 600px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 1fr !important;
    gap: 10px !important;
  }
  .tool-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }
  .tool-icon {
    width: 38px !important; height: 38px !important;
    font-size: 1.1rem !important; border-radius: 9px !important;
    margin-bottom: 10px !important;
  }
  .tool-card h3 { font-size: .85rem !important; margin-bottom: 4px !important; }
  .tool-card p  { font-size: .75rem !important; line-height: 1.4 !important; }
  .tool-tag     { font-size: .62rem !important; padding: 2px 7px !important; margin-bottom: 8px !important; }
}

/* ── CLEAN MOBILE OVERRIDES (final, highest priority) ── */
@media (max-width: 600px) {

  /* Navbar */
  .nav-inner {
    padding: 0 16px !important;
    gap: 0 !important;
    justify-content: space-between !important;
    overflow: visible !important;
  }
  .nav-links { display: none !important; }
  .nav-right { margin-left: 0 !important; flex-shrink: 0; }
  .nav-cta { padding: 8px 16px !important; font-size: .82rem !important; white-space: nowrap; }

  /* Tools section */
  .tools-section { padding: 56px 0 !important; }
  .section-header { margin-bottom: 28px !important; }
  .section-header h2 { font-size: 1.55rem !important; }
  .section-header p { font-size: .85rem !important; }

  /* Cards grid — 3 columns x 3 rows for 9 tools */
  .tools-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
    grid-auto-rows: 1fr !important;
  }
  .tool-card {
    padding: 10px 8px !important;
    border-radius: 10px !important;
    min-height: 0 !important;
  }
  .tool-icon {
    width: 30px !important; height: 30px !important;
    font-size: .9rem !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
  }
  .tool-card h3 { font-size: .68rem !important; margin-bottom: 3px !important; line-height: 1.25 !important; }
  .tool-card p  { font-size: .6rem !important; line-height: 1.3 !important; }
  .tool-tag     { font-size: .52rem !important; padding: 1px 5px !important; margin-bottom: 5px !important; }

  /* Compress boxes */
  .compress-boxes { grid-template-columns: 1fr !important; }

  /* Rotate */
  .rotate-btns { flex-direction: column !important; }
}

/* ── FLOATING CARDS MOBILE UNIFORM SIZE ── */
@media (max-width: 900px) {
  .hero-cards-col {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    gap: 10px !important;
  }
  .floating-card {
    width: 100% !important;
    max-width: 340px !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    font-size: .875rem !important;
    border-radius: 12px !important;
    animation: floatStatic 3s ease-in-out infinite !important;
  }
  .card-1 { animation-delay: 0s !important; }
  .card-2 { animation-delay: 1s !important; }
  .card-3 { animation-delay: 2s !important; }
}

/* ── STANDALONE TOOL PAGE HERO (SEO) ── */
.tool-page-hero {
  padding: 110px 0 36px;
  text-align: center;
}
.tool-page-h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.tool-page-intro {
  color: var(--text2);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}
@media (max-width: 600px) {
  .tool-page-hero { padding: 90px 0 28px; }
  .tool-page-h1 { font-size: 1.5rem; }
  .tool-page-intro { font-size: .9rem; }
}

/* ── IMAGE QUALITY TOOL CARD ── */
.iq-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.iq-card-header { margin-bottom: 20px; text-align: center; }
.iq-card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; font-weight: 700; margin-bottom: 4px;
}
.iq-card-header p { color: var(--text2); font-size: .875rem; }

/* Mode grid — 4 selectable options inside ONE card */
.iq-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.iq-mode-btn {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 18px 12px;
  background: var(--surface2); border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all .2s;
}
.iq-mode-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.iq-mode-btn.active {
  border-color: var(--accent);
  background: rgba(59,130,246,.08);
  box-shadow: 0 0 0 1px var(--accent);
}
.iq-mode-icon { font-size: 1.6rem; }
.iq-mode-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.iq-mode-desc { font-size: .72rem; color: var(--text3); line-height: 1.3; }

/* Mode-specific control panels */
.iq-mode-panel { margin-bottom: 8px; }

/* Compact option groups specifically inside image-quality sliders —
   default .option-group spacing (20px) is too tall when stacking 4 sliders */
.iq-mode-panel .option-group {
  margin-bottom: 14px;
}
.iq-mode-panel .option-group label {
  margin-bottom: 4px;
  font-size: .78rem;
}
.iq-mode-panel .option-group input[type="range"] {
  width: 100%; accent-color: var(--accent); cursor: pointer;
  display: block;
  height: 18px;
  margin: 2px 0;
}
.iq-range-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text3); margin-top: 2px;
}
.iq-range-val {
  font-weight: 700; color: var(--accent2); font-size: .8rem;
}
.iq-note {
  font-size: .78rem; color: var(--text3); margin-top: 4px;
}

/* Manual Adjust mode specifically: tighten further since it has 4 sliders stacked */
#iq-panel-manual .option-group { margin-bottom: 10px; }
#iq-panel-manual { margin-bottom: 4px; }

/* Scale buttons (upscale mode) */
.iq-scale-btns { display: flex; gap: 10px; }
.iq-scale-btn {
  flex: 1; padding: 12px; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
  font-weight: 700; font-size: .9rem; transition: all .2s;
}
.iq-scale-btn.active { border-color: var(--accent); background: rgba(59,130,246,.1); color: var(--accent2); }

/* Before / After live preview — pulled closer, smaller on mobile so it's visible without scrolling far */
.iq-preview-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin: 16px 0; flex-wrap: wrap;
}
.iq-preview-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.iq-preview-box canvas {
  max-width: 220px; max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: #000;
}
.iq-preview-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text3);
}
.iq-preview-arrow { font-size: 1.4rem; color: var(--accent); flex-shrink: 0; }

@media (max-width: 700px) {
  .iq-mode-grid { grid-template-columns: 1fr 1fr; }
  .iq-preview-wrap { flex-direction: column; margin: 12px 0; }
  .iq-preview-arrow { transform: rotate(90deg); }
  .iq-preview-box canvas { max-width: 160px; max-height: 160px; }
}
@media (max-width: 460px) {
  .iq-mode-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .iq-mode-btn { padding: 14px 8px; }
  .iq-card { padding: 20px; }
}

/* ── PREMIUM AI CARDS ── */
.tool-card.ai-card {
  background: linear-gradient(145deg, #13112a, #1a1535);
  border: 1px solid rgba(124,58,237,0.35);
  position: relative;
  overflow: visible; /* visible so badge/title are never clipped */
}
.tool-card.ai-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 10%, rgba(124,58,237,0.13) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
/* All direct children above the glow pseudo-element */
.tool-card.ai-card > * { position: relative; z-index: 1; }
.tool-card.ai-card::before {
  background: linear-gradient(90deg, #7c3aed, #0ea5e9);
  opacity: 0;
  transition: opacity .3s;
}
.tool-card.ai-card:hover {
  border-color: rgba(124,58,237,0.7);
  box-shadow: 0 8px 32px rgba(124,58,237,0.2), 0 0 0 1px rgba(124,58,237,0.3);
  transform: translateY(-5px);
}
.tool-card.ai-card:hover::before { opacity: 1; }

.ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(90deg, rgba(124,58,237,0.25), rgba(14,165,233,0.2));
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 100px;
  font-size: .65rem; font-weight: 800;
  color: #a78bfa;
  letter-spacing: .08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.tool-card.ai-card h3 { color: #e2d9ff; }
.tool-card.ai-card p  { color: #9d8ec4; }

/* Shimmer animation on AI cards */
@keyframes aiShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.tool-card.ai-card .ai-badge {
  background-size: 200% auto;
  animation: aiShimmer 3s linear infinite;
  background-image: linear-gradient(90deg, rgba(124,58,237,0.2) 0%, rgba(14,165,233,0.35) 50%, rgba(124,58,237,0.2) 100%);
}

/* ── BLOG GRID ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.blog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: all .25s; display: flex; flex-direction: column;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(59,130,246,.1); }
.blog-card-img {
  height: 140px; display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}
.blog-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-tag {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent2);
}
.blog-card-body h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.blog-card-body p  { font-size: .875rem; color: var(--text2); line-height: 1.6; flex: 1; }
.blog-card-read    { font-size: .8rem; font-weight: 600; color: var(--accent2); margin-top: 8px; }

/* ── AI TOOL PAGES ── */
.ai-hero-section {
  padding: 120px 0 40px;
  text-align: center;
  position: relative;
}
.ai-hero-section::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.12) 0%, transparent 70%);
}
.ai-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(90deg, rgba(124,58,237,0.15), rgba(14,165,233,0.1));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 100px;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  color: #a78bfa; text-transform: uppercase;
  margin-bottom: 20px;
}
.ai-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #e2d9ff 0%, #a78bfa 50%, #60a5fa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-hero-sub {
  color: var(--text2); font-size: 1rem;
  max-width: 600px; margin: 0 auto 12px;
  line-height: 1.7;
}
.ai-coming-soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 100px; font-size: .82rem; font-weight: 600;
  color: #fbbf24; margin-top: 8px;
}

/* AI Tool workspace card */
.ai-workspace {
  max-width: 800px; margin: 0 auto;
  background: linear-gradient(145deg, #0f0d1f, #161230);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px; padding: 36px;
  box-shadow: 0 0 60px rgba(124,58,237,0.08);
}
.ai-workspace-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.ai-workspace-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  flex-shrink: 0;
}
.ai-workspace-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem; font-weight: 700; color: #e2d9ff;
}
.ai-workspace-header p { font-size: .875rem; color: #9d8ec4; }

.ai-upload-zone {
  border: 2px dashed rgba(124,58,237,0.35);
  border-radius: 14px; padding: 40px 24px; text-align: center; cursor: pointer;
  transition: all .25s; background: rgba(124,58,237,0.03);
}
.ai-upload-zone:hover, .ai-upload-zone.drag-over {
  border-color: rgba(124,58,237,0.7);
  background: rgba(124,58,237,0.07);
}
.ai-upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.ai-upload-zone p { color: #c4b5fd; font-weight: 600; margin-bottom: 4px; }
.ai-upload-zone span { color: #6b5fa0; font-size: .85rem; }

.ai-result-box {
  background: rgba(124,58,237,0.06); border: 1px solid rgba(124,58,237,0.2);
  border-radius: 12px; padding: 20px; margin-top: 20px;
  display: none;
}
.ai-result-box.visible { display: block; }
.ai-result-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #a78bfa; margin-bottom: 10px;
}
.ai-result-text {
  font-size: .9rem; color: #d4c9ff; line-height: 1.75;
  white-space: pre-wrap; max-height: 320px; overflow-y: auto;
}

.btn-ai {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; width: 100%; margin-top: 16px;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all .2s; letter-spacing: .01em;
}
.btn-ai:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.35); }
.btn-ai:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.ai-loader {
  display: none; text-align: center; padding: 20px;
  color: #a78bfa; font-size: .9rem;
}
.ai-loader.visible { display: block; }
.ai-loader-dots::after {
  content: '.';
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} }

.ai-file-info {
  display: flex; align-items: center; gap: 12px;
  background: rgba(124,58,237,0.07); border: 1px solid rgba(124,58,237,0.2);
  padding: 12px 16px; border-radius: 10px; margin-top: 14px; display: none;
}
.ai-file-info.visible { display: flex; }
.ai-file-info .fi-name { flex: 1; font-size: .875rem; color: #c4b5fd; font-weight: 500; }
.ai-file-info .fi-size { font-size: .8rem; color: #6b5fa0; }
.ai-file-info .fi-remove { background: none; border: none; cursor: pointer; color: #6b5fa0; font-size: .9rem; }
.ai-file-info .fi-remove:hover { color: #f87171; }

/* OCR specific */
.ocr-copy-btn {
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
  color: #a78bfa; padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: .82rem; font-weight: 600; margin-top: 10px;
  transition: all .2s;
}
.ocr-copy-btn:hover { background: rgba(124,58,237,0.25); }

/* Chat specific */
.chat-messages {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 340px; overflow-y: auto; margin-top: 16px;
  padding: 4px 2px;
}
.chat-bubble {
  padding: 12px 16px; border-radius: 12px; font-size: .875rem; line-height: 1.6;
  max-width: 90%;
}
.chat-bubble.user {
  background: rgba(124,58,237,0.18); color: #d4c9ff;
  border: 1px solid rgba(124,58,237,0.25); align-self: flex-end;
}
.chat-bubble.ai {
  background: rgba(14,165,233,0.1); color: #bae6fd;
  border: 1px solid rgba(14,165,233,0.2); align-self: flex-start;
}
.chat-input-row {
  display: flex; gap: 10px; margin-top: 14px; align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1; background: rgba(124,58,237,0.06); border: 1px solid rgba(124,58,237,0.25);
  color: #e2d9ff; border-radius: 10px; padding: 10px 14px; font-size: .875rem;
  resize: none; outline: none; font-family: inherit; line-height: 1.5;
  min-height: 44px; max-height: 120px;
}
.chat-input-row textarea:focus { border-color: rgba(124,58,237,0.6); }
.chat-input-row textarea::placeholder { color: #4a3d6b; }
.chat-send-btn {
  background: linear-gradient(135deg,#7c3aed,#0ea5e9); border: none;
  color: #fff; width: 44px; height: 44px; border-radius: 10px;
  font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
  transition: opacity .2s;
}
.chat-send-btn:hover { opacity: .85; }
.chat-send-btn:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 600px) {
  .ai-workspace { padding: 20px 16px; }
  .ai-hero-section { padding: 90px 0 28px; }
}

/* ══════════════════════════════════════════
   DEDICATED AI TOOLS SECTION — PREMIUM FEEL
   ══════════════════════════════════════════ */
.ai-section {
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Ambient background glow */
.ai-section::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Section header */
.ai-section-header {
  text-align: center;
  margin-bottom: 52px;
}
.ai-section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #a78bfa;
  margin-bottom: 18px;
}
.ai-star { font-size: .85rem; }
.ai-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #f0ebff 0%, #c4b5fd 50%, #818cf8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-section-sub {
  color: var(--text2); font-size: 1rem;
  max-width: 600px; margin: 0 auto;
  line-height: 1.7;
}

/* 3-column card grid */
.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Individual AI tool card */
.ai-tool-card {
  position: relative;
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,0.2);
  background: linear-gradient(160deg, #0e0b1f 0%, #130f2a 50%, #0a0918 100%);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.ai-tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,58,237,0.55);
  box-shadow: 0 16px 48px rgba(124,58,237,0.18), 0 0 0 1px rgba(124,58,237,0.2);
}

/* Glow orb behind card */
.ai-tool-glow {
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  transition: opacity .3s;
}
.ai-tool-card:hover .ai-tool-glow { opacity: .55; }
.ai-glow-purple { background: #7c3aed; }
.ai-glow-blue   { background: #0ea5e9; }
.ai-glow-amber  { background: #f59e0b; }

/* Card inner content */
.ai-tool-inner {
  position: relative; z-index: 1;
  padding: 28px 24px 24px;
  display: flex; flex-direction: column; gap: 12px;
}

/* Badge */
.ai-tool-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: 100px;
  font-size: .65rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: #c4b5fd;
  width: fit-content;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .75; }
}

/* Icon */
.ai-tool-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* Title */
.ai-tool-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700;
  color: #e9e0ff; letter-spacing: -.01em;
  line-height: 1.3;
}

/* Description */
.ai-tool-desc {
  font-size: .875rem; color: #9988bb;
  line-height: 1.65; flex: 1;
}

/* Tags row */
.ai-tool-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ai-tag {
  padding: 3px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: .68rem; color: #8877aa;
  font-weight: 600;
}

/* CTA Button */
.ai-tool-btn {
  margin-top: 4px;
  padding: 11px 20px;
  background: linear-gradient(135deg,#7c3aed,#4c1d95);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: .875rem;
  cursor: pointer; width: 100%;
  transition: opacity .2s, transform .2s;
  letter-spacing: .01em;
}
.ai-tool-btn:hover { opacity: .88; transform: translateY(-1px); }

/* Divider between hero and AI section */
.ai-section-divider {
  text-align: center;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.25), transparent);
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .ai-tools-grid { grid-template-columns: 1fr; gap: 16px; }
  .ai-section { padding: 56px 0 64px; }
  .ai-section-title { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .ai-section { padding: 48px 0 56px; }
  .ai-tool-inner { padding: 22px 18px 20px; }
  .ai-section-eyebrow { font-size: .65rem; }
}

/* ── AI BACK BUTTON ── */
.ai-back-btn {
  margin-bottom: 20px;
}

/* ── HAMBURGER MENU ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none;
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  padding: 7px;
  transition: border-color .2s;
  margin-left: 8px;
  flex-shrink: 0;
}
.hamburger:hover { border-color: var(--accent); }
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .3s ease;
  transform-origin: center;
}
/* X animation when open */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: absolute;
  top: 64px; left: 0; right: 0;
  background: rgba(8,12,20,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
  animation: drawerSlide .25s ease;
}
@keyframes drawerSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
  padding: 13px 8px;
  font-size: 1rem; font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.mobile-drawer a:last-of-type { border-bottom: none; }
.mobile-drawer a:hover { color: var(--text); }
.mobile-cta {
  margin-top: 12px;
  width: 100%;
  padding: 13px;
  font-size: .95rem;
}

/* Show hamburger on mobile, hide desktop nav-links */
@media (max-width: 700px) {
  .hamburger { display: flex; }
  .nav-links  { display: none !important; }
}