/* =============================================
   Ioqnw — Complete Redesign
   Palette: Midnight Teal, Coral, Lavender, Gold
   ============================================= */

:root {
  /* ---- New palette ---- */
  --ink: #0f0e1a;
  --ink-alt: #2a2845;
  --slate: #5c5a78;
  --slate-light: #8e8ca8;
  --mist: #e7e6f0;
  --mist-deep: #d4d2e6;
  --paper: #f6f5fc;
  --paper-alt: #eeedf8;
  --white: #ffffff;

  --teal: #2dd4bf;
  --teal-deep: #0d9488;
  --coral: #fb7185;
  --coral-deep: #e11d48;
  --lavender: #a78bfa;
  --lavender-deep: #7c3aed;
  --gold: #fbbf24;
  --gold-deep: #d97706;

  --gradient-hero: linear-gradient(145deg, #0f0e1a 0%, #2a2845 50%, #1a1a2e 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.70));
  --gradient-cta: linear-gradient(135deg, #7c3aed, #2dd4bf);
  --gradient-accent: linear-gradient(135deg, #fb7185, #fbbf24);
  --gradient-teal: linear-gradient(135deg, #2dd4bf, #0d9488);
  --gradient-lavender: linear-gradient(135deg, #a78bfa, #7c3aed);

  --radius-card: 20px;
  --radius-pill: 999px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow-card: 0 8px 32px rgba(15, 14, 26, 0.06);
  --shadow-hover: 0 16px 48px rgba(15, 14, 26, 0.10);
  --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.15);

  --max-width: 1200px;
  --header-h: 72px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; position: fixed; width: 100%; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* =============================================
   Header
   ============================================= */
.header {
  background: rgba(246, 245, 252, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--mist);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 20px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--gradient-lavender);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.header-logo img { height: 36px; width: auto; flex-shrink: 0; }

/* Desktop nav */
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--slate);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.25s;
}
.nav-links a:hover { color: var(--ink); background: var(--mist); }
.nav-links a.active { color: var(--white); background: var(--gradient-lavender); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 210;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav — full screen overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 26, 0.6);
  backdrop-filter: blur(4px);
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.nav-overlay.active { opacity: 1; pointer-events: auto; }

/* =============================================
   Hero
   ============================================= */
.hero {
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: var(--white);
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at 30% 50%, rgba(167,139,250,0.10) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(45,212,191,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
  letter-spacing: -0.02em;
}
.hero h1 .gradient-text {
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  margin: 0 auto 32px;
  position: relative;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--gradient-cta);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.10);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-3px);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(251, 113, 133, 0.3);
}
.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(251, 113, 133, 0.4);
}

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--mist); }
.btn-small { padding: 8px 18px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-white {
  background: var(--white);
  color: var(--lavender-deep);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* =============================================
   Section styles
   ============================================= */
.section-section {
  padding: 60px 20px;
}
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-title .gradient-text {
  background: var(--gradient-lavender);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  text-align: center;
  color: var(--slate);
  font-size: 1rem;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats Row */
.stats-row {
  max-width: var(--max-width);
  margin: -32px auto 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 28px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--mist);
}
.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-lavender);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 4px;
}

/* How It Works */
.how-section { padding: 60px 20px; }
.how-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how-step {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--mist);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.how-step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-lavender);
}
.how-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.how-step .step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-lavender);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.how-step h4 { font-weight: 700; margin-bottom: 8px; }
.how-step p { font-size: 0.9rem; color: var(--slate); line-height: 1.6; }

/* Tools Section */
.tools-section { padding: 60px 20px; background: var(--paper-alt); }
.tools-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tool-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px;
  border: 1px solid var(--mist);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-cta);
  transform: scaleX(0);
  transition: transform 0.35s;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.tool-card:hover::after { transform: scaleX(1); }
.tool-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.tool-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
  margin-bottom: 18px;
}
.tool-icon.merge { background: rgba(167,139,250,0.15); color: var(--lavender-deep); }
.tool-icon.html2pdf { background: rgba(45,212,191,0.15); color: var(--teal-deep); }
.tool-icon.pdf2img { background: rgba(251,113,133,0.15); color: var(--coral-deep); }
.tool-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.tool-card p { color: var(--slate); font-size: 0.88rem; line-height: 1.6; flex: 1; }
.tool-card .tool-arrow {
  margin-top: 18px;
  color: var(--lavender-deep);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.3s;
}
.tool-card:hover .tool-arrow { gap: 10px; }

/* Features */
.features-section { padding: 60px 20px; }
.features-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--slate); line-height: 1.6; }

/* FAQ */
.faq-section { padding: 60px 20px; background: var(--paper-alt); }
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15,14,26,0.04);
}
.faq-question {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-question .faq-arrow {
  transition: transform 0.3s;
  color: var(--slate-light);
  flex-shrink: 0;
}
.faq-item.open .faq-question .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
  font-size: 0.9rem; color: var(--slate);
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 20px 18px; }

/* CTA */
.cta-section { padding: 40px 20px 60px; }
.cta-banner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 32px;
  background: var(--gradient-cta);
  border-radius: var(--radius-card);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.cta-banner h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; position: relative; }
.cta-banner p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 20px; position: relative; }

/* =============================================
   Tool Pages
   ============================================= */
.tool-page { padding: 40px 20px 60px; }
.tool-container { max-width: 800px; margin: 0 auto; }
.tool-header { text-align: center; margin-bottom: 36px; }
.tool-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.02em; }
.tool-header p { color: var(--slate); font-size: 0.95rem; }

/* Upload Zone */
.upload-zone {
  background: var(--white);
  border: 2px dashed var(--mist-deep);
  border-radius: var(--radius-card);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--lavender);
  background: rgba(167,139,250,0.04);
}
.upload-zone-icon { font-size: 2.5rem; margin-bottom: 12px; color: var(--lavender); }
.upload-zone h3 { font-size: 1.1rem; margin-bottom: 6px; }
.upload-zone p { color: var(--slate); font-size: 0.85rem; }

/* File List */
.file-list { margin-bottom: 20px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all 0.2s;
}
.file-item:hover { border-color: var(--lavender); }
.file-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.file-info .file-name { font-weight: 500; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info .file-size { color: var(--slate); font-size: 0.75rem; white-space: nowrap; }
.file-remove { background: none; border: none; color: var(--coral); cursor: pointer; padding: 4px 8px; border-radius: var(--radius-xs); font-size: 0.85rem; }
.file-remove:hover { background: rgba(251,113,133,0.10); }

/* Action Bar */
.action-bar { text-align: center; margin-top: 20px; }
.progress-bar { width: 100%; height: 5px; background: var(--mist); border-radius: 3px; overflow: hidden; margin: 14px 0; display: none; }
.progress-bar.active { display: block; }
.progress-fill { height: 100%; background: var(--gradient-lavender); width: 0%; border-radius: 3px; transition: width 0.3s; }
.status-msg { margin-top: 14px; font-size: 0.85rem; color: var(--slate); }

/* HTML Input */
.html-input {
  width: 100%;
  min-height: 250px;
  padding: 16px;
  border: 2px solid var(--mist-deep);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.3s;
  background: var(--white);
}
.html-input:focus { outline: none; border-color: var(--lavender); }
.format-select {
  padding: 10px 16px;
  border: 2px solid var(--mist-deep);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s;
}
.format-select:focus { outline: none; border-color: var(--lavender); }

/* Result Area */
.result-area { text-align: center; margin-top: 20px; padding: 24px; background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); display: none; }
.result-area.active { display: block; }
.result-area a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: var(--gradient-lavender); color: var(--white); text-decoration: none; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.9rem; transition: all 0.3s; }
.result-area a:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,0.3); }

/* Tool Info */
.tool-info { margin-top: 40px; }
.tool-info h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; margin-top: 36px; }
.tool-info h3 { font-size: 1.05rem; font-weight: 600; margin-top: 24px; margin-bottom: 10px; }
.tool-info p, .tool-info li { color: var(--slate); font-size: 0.9rem; line-height: 1.8; margin-bottom: 10px; }
.tool-info ul, .tool-info ol { padding-left: 20px; margin-bottom: 16px; }
.tool-info .info-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-sm); padding: 20px; margin: 16px 0; box-shadow: var(--shadow-card); }
.tool-info .info-card h4 { font-weight: 600; margin-bottom: 8px; }
.tool-info .info-card pre { background: var(--ink); color: var(--teal); padding: 14px 16px; border-radius: var(--radius-xs); font-size: 0.8rem; overflow-x: auto; margin-top: 8px; font-family: var(--font-mono); }
.tool-info .tip-box { background: rgba(45,212,191,0.08); border-left: 4px solid var(--teal); padding: 14px 18px; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; margin: 16px 0; font-size: 0.85rem; color: var(--slate); }

/* =============================================
   Pages (About, Contact, Privacy, Terms)
   ============================================= */
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 20px 60px; }
.page-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 20px; background: var(--gradient-lavender); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; }
.page-content h2 { font-size: 1.25rem; font-weight: 700; margin-top: 32px; margin-bottom: 12px; }
.page-content h3 { font-size: 1.05rem; font-weight: 600; margin-top: 24px; margin-bottom: 10px; }
.page-content p, .page-content li { color: var(--slate); font-size: 0.9rem; line-height: 1.8; margin-bottom: 10px; }
.page-content ul { padding-left: 20px; margin-bottom: 14px; }
.page-content .highlight-box { background: rgba(167,139,250,0.08); border-left: 4px solid var(--lavender); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }

/* Contact */
.contact-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); padding: 40px 24px; text-align: center; box-shadow: var(--shadow-card); max-width: 460px; margin: 32px auto; }
.contact-icon { font-size: 2.5rem; margin-bottom: 16px; }
.contact-card h2 { font-size: 1.25rem; margin-bottom: 10px; background: none; -webkit-text-fill-color: var(--ink); }
.contact-card p { color: var(--slate); margin-bottom: 20px; }
.contact-email { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: rgba(167,139,250,0.08); border: 1px solid var(--mist); border-radius: var(--radius-pill); font-size: 1rem; font-weight: 600; color: var(--lavender-deep); word-break: break-all; }

/* 404 */
.page-404 { text-align: center; padding: 80px 20px; }
.page-404 .code { font-size: 7rem; font-weight: 800; background: var(--gradient-lavender); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.page-404 h2 { font-size: 1.4rem; margin: 16px 0 8px; }
.page-404 p { color: var(--slate); margin-bottom: 24px; font-size: 0.95rem; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.85rem; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border: 1px solid var(--mist-deep); }
.data-table th { background: var(--gradient-lavender); color: var(--white); font-weight: 600; }
.data-table td { background: var(--white); }
.data-table tr:nth-child(even) td { background: var(--paper); }

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--ink);
  color: var(--slate-light);
  padding: 48px 20px 32px;
  margin-top: auto;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 12px; background: var(--gradient-lavender); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: var(--slate-light); }
.footer-col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--slate-light); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--lavender); }
.footer-bottom { max-width: var(--max-width); margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--ink-alt); text-align: center; font-size: 0.8rem; color: var(--slate); }
.footer-disclaimer { max-width: var(--max-width); margin: 20px auto 0; padding: 16px 0; border-top: 1px solid var(--ink-alt); font-size: 0.75rem; color: var(--slate); line-height: 1.7; text-align: center; }

/* =============================================
   Blog Styles
   ============================================= */
.blog-page { padding: 40px 20px 60px; }
.blog-header { text-align: center; margin-bottom: 32px; }
.blog-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.blog-header p { color: var(--slate); font-size: 0.95rem; max-width: 600px; margin: 0 auto; }

.blog-search { max-width: 500px; margin: 0 auto 32px; position: relative; }
.blog-search input { width: 100%; padding: 14px 16px 14px 48px; border: 2px solid var(--mist-deep); border-radius: var(--radius-pill); font-size: 0.95rem; background: var(--white); transition: border-color 0.3s; outline: none; }
.blog-search input:focus { border-color: var(--lavender); }
.blog-search .search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--slate); font-size: 1rem; pointer-events: none; }
.blog-search .clear-btn { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--slate); cursor: pointer; padding: 4px; font-size: 1rem; display: none; }
.blog-search .clear-btn.show { display: block; }

.blog-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); overflow: hidden; transition: all 0.35s; box-shadow: var(--shadow-card); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--lavender); }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lavender); margin-bottom: 8px; }
.blog-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.blog-card .excerpt { font-size: 0.85rem; color: var(--slate); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.blog-card .meta { font-size: 0.78rem; color: var(--slate); margin-top: 12px; display: flex; justify-content: space-between; }

/* Blog article detail */
.article-page { max-width: 780px; margin: 0 auto; padding: 40px 20px 60px; }
.article-meta { color: var(--slate); font-size: 0.85rem; margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.article-meta span { background: var(--mist); padding: 4px 12px; border-radius: var(--radius-pill); }
.article-page h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.article-page h2 { font-size: 1.3rem; font-weight: 700; margin-top: 36px; margin-bottom: 12px; }
.article-page h3 { font-size: 1.05rem; font-weight: 600; margin-top: 28px; margin-bottom: 10px; }
.article-page p, .article-page li { color: var(--slate); font-size: 0.92rem; line-height: 1.85; margin-bottom: 12px; }
.article-page ul, .article-page ol { padding-left: 20px; margin-bottom: 16px; }
.article-page table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.85rem; }
.article-page th, .article-page td { padding: 10px 14px; text-align: left; border: 1px solid var(--mist-deep); }
.article-page th { background: var(--gradient-lavender); color: var(--white); font-weight: 600; }
.article-page td { background: var(--white); }
.article-page tr:nth-child(even) td { background: var(--paper); }
.article-page pre { background: var(--ink); color: var(--teal); padding: 14px 18px; border-radius: var(--radius-xs); overflow-x: auto; font-size: 0.82rem; margin: 12px 0; font-family: var(--font-mono); }
.article-page .highlight-box { background: rgba(167,139,250,0.08); border-left: 4px solid var(--lavender); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0; font-size: 0.9rem; color: var(--slate); }
.article-page .back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--lavender-deep); text-decoration: none; font-weight: 600; font-size: 0.9rem; margin-bottom: 24px; }
.article-page .back-link:hover { opacity: 0.8; }
.article-page .disclaimer { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 12px 16px; margin: 24px 0; font-size: 0.82rem; color: #991b1b; }
.article-page .toc { background: var(--paper); border-radius: var(--radius-sm); padding: 20px 24px; margin: 20px 0; }
.article-page .toc h3 { font-size: 0.95rem; margin-top: 0; margin-bottom: 10px; }
.article-page .toc ul { list-style: none; padding: 0; }
.article-page .toc ul li { margin-bottom: 6px; }
.article-page .toc ul li a { color: var(--lavender-deep); text-decoration: none; font-size: 0.85rem; }

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(15,14,26,0.92);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }

  .nav-links a {
    color: rgba(255,255,255,0.7);
    font-size: 1.15rem;
    padding: 14px 32px;
    width: auto;
  }
  .nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
  .nav-links a.active {
    color: var(--white);
    background: var(--gradient-lavender);
  }

  .nav-overlay { display: none; }

  .hero h1 { font-size: 2rem; }
  .hero { padding: 48px 16px 40px; }
  .hero p { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: -24px; }
  .stat-card { padding: 20px 12px; }
  .stat-card .stat-num { font-size: 1.5rem; }

  .tools-grid, .features-grid, .how-grid { grid-template-columns: 1fr; gap: 14px; }
  .section-title { font-size: 1.5rem; }
  .cta-banner { padding: 36px 20px; }
  .cta-banner h3 { font-size: 1.2rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }

  .tool-header h1 { font-size: 1.5rem; }
  .tool-page { padding: 24px 12px 40px; }
  .upload-zone { padding: 28px 12px; }
  .html-input { min-height: 180px; }
  .page-content { padding: 24px 12px 40px; }
  .page-content h1 { font-size: 1.5rem; }
  .page-404 .code { font-size: 4rem; }

  .blog-grid { grid-template-columns: 1fr; }
  .blog-header h1 { font-size: 1.5rem; }
  .article-page h1 { font-size: 1.4rem; }
  .article-page table { font-size: 0.75rem; }
  .article-page th, .article-page td { padding: 6px 8px; }

  .data-table { font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 6px 8px; }

  .faq-question { font-size: 0.85rem; padding: 14px 16px; }
  .faq-answer { font-size: 0.82rem; }

  .contact-card { margin: 20px 0; padding: 24px 16px; }
  .contact-email { font-size: 0.9rem; padding: 10px 18px; }
}

@media (max-width: 400px) {
  .stats-row { gap: 8px; }
  .stat-card { padding: 14px 8px; }
  .stat-card .stat-num { font-size: 1.2rem; }
  .header-logo { font-size: 1.1rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-actions .btn { max-width: 100%; }
}

/* =============================================
   Pagination (Blog)
   ============================================= */
.pagination { max-width: var(--max-width); margin: 32px auto 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination button { padding: 8px 16px; border: 1px solid var(--mist-deep); border-radius: var(--radius-xs); background: var(--white); cursor: pointer; font-size: 0.85rem; transition: all 0.2s; font-weight: 500; }
.pagination button:hover { border-color: var(--lavender); color: var(--lavender-deep); }
.pagination button.active { background: var(--gradient-lavender); color: var(--white); border-color: transparent; }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--slate); font-size: 1rem; }