/* ============================================
   PDF.SAHIOYE.COM — Shared Styles
   Same design system as main hub
   ============================================ */

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

:root {
  --primary: #06d6a0;
  --primary-dark: #05b588;
  --primary-light: #34d399;
  --accent: #22d3ee;
  --bg-dark: #0a0a1a;
  --bg-nav: var(--bg-nav);
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3e;
  --bg-surface: #0f0f23;
  --text-primary: #f1f1f7;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8d;
  --border: rgba(239, 68, 68, 0.15);
  --border-hover: rgba(239, 68, 68, 0.35);
  --gradient-primary: linear-gradient(135deg, #ef4444, #f97316);
  --shadow-glow: 0 0 30px rgba(239, 68, 68, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Background */
.bg-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-particles .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.1; animation: floatOrb 20s ease-in-out infinite; }
.bg-particles .orb:nth-child(1) { width: 400px; height: 400px; background: #ef4444; top: -10%; left: -5%; }
.bg-particles .orb:nth-child(2) { width: 350px; height: 350px; background: #f97316; top: 60%; right: -10%; animation-delay: -7s; }
@keyframes floatOrb { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-20px,40px) scale(1.05); } }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }


.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}
/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 14px 0;
  backdrop-filter: blur(20px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar__logo { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; }
.navbar__logo-icon { width: 34px; height: 34px; background: var(--gradient-primary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.navbar__logo-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.navbar__logo-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.navbar__links { display: flex; align-items: center; gap: 24px; }
.navbar__link { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.navbar__link:hover { color: var(--text-primary); }
.navbar__back { padding: 7px 16px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.navbar__back:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.navbar__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.navbar__hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* Page Header */
.page-header {
  padding: 110px 20px 40px;
  text-align: center;
}
.page-header__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.page-header__title-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 40px 0 80px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  cursor: pointer;
  display: block;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(239,68,68,0.12);
}
.tool-card__icon {
  width: 48px; height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px; color: white;
}
.tool-card__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.tool-card__desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Tool Page — Upload Area */
.tool-page { padding: 100px 20px 60px; }

.tool-workspace {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.upload-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(239,68,68,0.04);
}
.upload-zone__icon { font-size: 3rem; margin-bottom: 16px; }
.upload-zone__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.upload-zone__text { font-size: 0.85rem; color: var(--text-muted); }
.upload-zone input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* File List */
.file-list { margin-top: 20px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.file-item__name { display: flex; align-items: center; gap: 8px; }
.file-item__size { color: var(--text-muted); font-size: 0.75rem; }
.file-item__remove {
  background: none; border: none; color: var(--primary-light); cursor: pointer;
  font-size: 1rem; padding: 4px; transition: var(--transition);
}
.file-item__remove:hover { color: var(--primary); }

/* Action Button */
.action-btn {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239,68,68,0.35); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Progress */
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; margin-top: 16px; overflow: hidden; display: none; }
.progress-bar__fill { height: 100%; background: var(--gradient-primary); border-radius: 3px; width: 0%; transition: width 0.3s ease; }

/* Result */
.result-section { margin-top: 24px; display: none; text-align: center; }
.result-section__icon { font-size: 3rem; margin-bottom: 12px; }
.result-section__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 16px; color: #06d6a0; }
.download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #06d6a0, #22d3ee);
  border: none; border-radius: var(--radius-md);
  color: #0a0a1a; font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(6,214,160,0.3); }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--border); text-align: center; margin-top: 40px; }
.footer__text { font-size: 0.8rem; color: var(--text-muted); }
.footer__text a { color: var(--primary-light); }

/* Responsive */
@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-workspace { padding: 24px; }
  .navbar__links { display: none; position: absolute; top: 100%; left: 0; width: 100%; flex-direction: column; background: var(--bg-nav); padding: 20px; gap: 12px; }
  .navbar__links.active { display: flex; }
  .navbar__hamburger { display: flex; }
}

/* === Light Theme Overrides (Auto-injected) === */
:root[data-theme="light"] {
  --bg-dark: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.9);
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-surface: #f4f4f5;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
}

/* === Theme Toggle UI === */
.theme-dropdown { position: relative; display: inline-block; margin-left: auto; }
.theme-menu {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; min-width: 130px;
  box-shadow: var(--shadow-md); display: none; z-index: 1000;
  flex-direction: column; gap: 4px;
}
.theme-menu.active { display: flex; }
.theme-option {
  background: transparent; border: none; color: var(--text-secondary);
  padding: 8px 12px; text-align: left; border-radius: 6px;
  cursor: pointer; font-size: 0.85rem; font-family: 'Inter', sans-serif;
  transition: var(--transition); display: flex; align-items: center; gap: 8px;
}
.theme-option:hover, .theme-option.active {
  background: rgba(128, 128, 128, 0.1); color: var(--text-primary);
}
.theme-btn {
  background: none; border: none; color: var(--text-secondary);
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: var(--transition); padding: 4px 8px; border-radius: 6px;
}
.theme-btn:hover { color: var(--text-primary); background: rgba(128, 128, 128, 0.1); }

/* ============================================
   REDESIGNED: MDN 2-Tier Header
   ============================================ */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: var(--transition); }
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.15); }
.header-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.header-top { padding: 10px 0; background: var(--bg-nav, rgba(10,10,26,0.92)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.header-logo__icon { width: 32px; height: 32px; background: var(--gradient-primary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.header-logo__text { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav__link { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); padding: 6px 10px; border-radius: 6px; text-decoration: none; transition: var(--transition); white-space: nowrap; }
.header-nav__link:hover { color: var(--text-primary); background: rgba(128,128,128,0.08); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 5px; }
.header-hamburger span { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; }
.header-bottom { padding: 6px 0; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.header-bottom .header-container { display: flex; justify-content: space-between; align-items: center; }
.header-context { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.header-utils { display: flex; align-items: center; gap: 16px; }
.header-util-link { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.header-util-link:hover { color: var(--text-primary); }

/* REDESIGNED: Mega Footer */
.lr-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.mega-footer { background: var(--bg-dark); padding: 60px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.footer-brand__desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col__title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px; }
.footer-col__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col__links a { text-decoration: none; color: var(--text-secondary); font-size: 0.88rem; transition: var(--transition); }
.footer-col__links a:hover { color: var(--text-primary); }
.footer-legal { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); }
.footer-copyright { color: var(--text-muted); }
.footer-legal__links { display: flex; gap: 24px; }
.footer-legal__links a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.footer-legal__links a:hover { color: var(--text-secondary); }

@media (max-width: 900px) {
  .header-nav { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--bg-dark); flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 999; }
  .header-nav.active { display: flex; }
  .header-nav__link { font-size: 1.1rem; padding: 12px 20px; }
  .header-hamburger { display: flex; z-index: 1001; }
  .header-bottom { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.header-search__underscore { font-size: 0.9rem; color: var(--text-muted); font-family: monospace; }
.nav-chevron { font-size: 0.7rem; color: var(--text-muted); margin-left: 2px; transition: var(--transition); }
