:root {
  color-scheme: light;

  /* Text Colors */
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.12);

  /* Backgrounds */
  --paper: #f8fafc;
  --card: #ffffff;

  /* Primary - Vibrant Indigo */
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.12);

  /* Secondary - Electric Cyan */
  --secondary: #06b6d4;
  --secondary-dark: #0891b2;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-header: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-cta: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-footer: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);

  /* UI Elements */
  --stroke: #e2e8f0;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 25px 50px rgba(15, 23, 42, 0.15);
}

/* Dark Mode */
[data-theme="dark"] {
  color-scheme: dark;

  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(226, 232, 240, 0.12);

  --paper: #0f172a;
  --card: #1e293b;

  --accent: #818cf8;
  --accent-dark: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.15);

  --secondary: #22d3ee;
  --secondary-dark: #06b6d4;

  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
  --gradient-header: linear-gradient(135deg, #020617 0%, #0f172a 100%);
  --gradient-cta: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-footer: linear-gradient(135deg, #020617 0%, #0f172a 100%);

  --stroke: #334155;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tab-row { background: #1e293b; }
[data-theme="dark"] .tab.active { background: var(--accent); color: #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
[data-theme="dark"] .callout { background: #1e293b; }
[data-theme="dark"] .dropzone { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .dropzone.is-dragging { border-color: var(--accent); background: rgba(129,140,248,0.08); }
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea { background: #0f172a; color: var(--ink); border-color: #334155; }
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus { border-color: var(--accent); }
[data-theme="dark"] .pill { background: #1e293b; color: var(--ink); }
[data-theme="dark"] .pill:has(input:checked) { background: var(--accent); color: #fff; }
[data-theme="dark"] .select { background: #0f172a; color: var(--ink); border-color: #334155; }
[data-theme="dark"] .slider { background: #334155; }
[data-theme="dark"] .file-pill { background: #1e293b; }
[data-theme="dark"] .status-pill { background: rgba(129,140,248,0.15); }
[data-theme="dark"] .progress-track { background: #1e293b; }
[data-theme="dark"] .result-preview { background: #0f172a; }
[data-theme="dark"] .meta-chip { background: #334155; color: var(--muted); }
[data-theme="dark"] .result-textarea { background: #0f172a; color: var(--ink); border-color: #334155; }
[data-theme="dark"] .ghost { background: #1e293b; color: var(--ink); }
[data-theme="dark"] .ghost:hover { background: #334155; }
[data-theme="dark"] .image-preview-area,
[data-theme="dark"] .document-preview-area,
[data-theme="dark"] .audio-preview-area,
[data-theme="dark"] .video-preview-area,
[data-theme="dark"] .pdf-preview-area { background: #0f172a; }
[data-theme="dark"] .converter-card { background: var(--card); }
[data-theme="dark"] .feature-card { background: var(--card); }
[data-theme="dark"] .contact-form { background: var(--card); }
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea { background: #0f172a; color: var(--ink); border-color: #334155; }
[data-theme="dark"] .alert-success { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .alert-error { background: rgba(239,68,68,0.15); color: #f87171; }
[data-theme="dark"] .docs-table thead { background: #1e293b; }
[data-theme="dark"] .docs-table td { border-color: #334155; }
[data-theme="dark"] .docs-callout { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .docs-code-header { background: #1e293b; }
[data-theme="dark"] .docs-code { background: #0f172a; }
[data-theme="dark"] .docs-sidebar { background: var(--card); }
[data-theme="dark"] .docs-sidebar a { color: var(--muted); }
[data-theme="dark"] .docs-sidebar a:hover,
[data-theme="dark"] .docs-sidebar a.active { color: var(--accent); }
[data-theme="dark"] .history-status--completed { background: rgba(34,197,94,0.2); color: #4ade80; }
[data-theme="dark"] .history-status--failed { background: rgba(239,68,68,0.2); color: #f87171; }
[data-theme="dark"] .history-status--running { background: rgba(59,130,246,0.2); color: #60a5fa; }
[data-theme="dark"] .history-status--queued { background: rgba(245,158,11,0.2); color: #fbbf24; }

/* Theme toggle button */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Encryption badge in header */
.encryption-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
}

.encryption-badge svg {
  flex-shrink: 0;
}

.encryption-badge-text {
  display: none;
}

@media (min-width: 640px) {
  .encryption-badge-text {
    display: inline;
  }
}

/* Encryption notice banner */
.encryption-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  margin: -8px auto 20px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.encryption-notice svg {
  flex-shrink: 0;
  color: var(--accent);
}

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

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

button,
select,
input,
textarea {
  font-family: inherit;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.hero-header {
  text-align: center;
  margin-bottom: 36px;
}

.hero-header h1 {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  color: var(--ink);
}

.hero-header p {
  max-width: 620px;
  margin: 10px auto 0;
}

.converter-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  padding: 24px;
}

.tab-row {
  display: flex;
  gap: 12px;
  background: #f1f2f8;
  border-radius: 14px;
  padding: 6px;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(31, 35, 85, 0.12);
}

.tab[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.tab-panel {
  display: none;
  margin-top: 24px;
}

.tab-panel.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.converter-form h2,
.converter-results h2 {
  font-size: 1.35rem;
}

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8f9fe;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.callout-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.dropzone {
  border: 2px dashed #c8cfe5;
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 6px;
  text-align: center;
  background: #f8f9ff;
  position: relative;
  transition: border-color 200ms ease, background 200ms ease;
}

.dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  font-size: 1.8rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.group-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #f4f6fc;
  color: var(--muted);
}

.field-group {
  margin-bottom: 16px;
  display: grid;
  gap: 10px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #f6f7fd;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.pill input {
  margin: 0;
}

.select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #ffffff;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e1e6f5;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 150ms ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

button {
  border: none;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 35, 85, 0.12);
}

button[aria-disabled="true"],
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-dark);
}

.full {
  width: 100%;
}

.file-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.file-pill {
  padding: 10px 14px;
  border-radius: 12px;
  background: #f3f5fb;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.file-status {
  display: flex;
  gap: 8px;
  align-items: center;
}

.file-download-link {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 150ms ease;
}

.file-download-link:hover {
  background: var(--accent-dark);
}

.file-download-link.image {
  background: #22c55e;
}

.file-download-link.image:hover {
  background: #16a34a;
}

.image-preview-area {
  min-height: 200px;
  background: #f1f3fb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.image-preview-area img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
}

.document-preview-area {
  min-height: 120px;
  background: #f1f3fb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.file-download-link.document {
  background: #f59e0b;
}

.file-download-link.document:hover {
  background: #d97706;
}

.audio-preview-area {
  min-height: 120px;
  background: #f1f3fb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.file-download-link.audio {
  background: #8b5cf6;
}

.file-download-link.audio:hover {
  background: #7c3aed;
}

.video-preview-area {
  min-height: 120px;
  background: #f1f3fb;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.file-download-link.video {
  background: #ec4899;
}

.file-download-link.video:hover {
  background: #db2777;
}

.status-message {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 500;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 70, 226, 0.12);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.progress-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #edf0f8;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #6f8bff);
  transition: width 200ms ease;
}

.result-preview {
  background: #f7f8fe;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--stroke);
  display: grid;
  gap: 12px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}

.meta-chip {
  background: #e9ecf7;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.result-textarea {
  width: 100%;
  min-height: 240px;
  max-height: 360px;
  resize: vertical;
  border: none;
  outline: none;
  background: #f1f3fb;
  padding: 14px;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  color: var(--ink);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 35, 85, 0.1);
}

.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}

.ghost {
  background: #eef1fb;
  color: var(--ink);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ========================================
   MODERN HEADER STYLES
   ======================================== */

.site-header {
  background: var(--gradient-header);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 200ms ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 200ms ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   MODERN FOOTER STYLES
   ======================================== */

.site-footer-modern {
  background: var(--gradient-footer);
  color: #fff;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 30px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.footer-logo .logo-icon {
  width: 44px;
  height: 44px;
}

.footer-logo .logo-text {
  font-size: 1.5rem;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-link {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 200ms ease;
}

.social-link:hover {
  background: var(--gradient-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 200ms ease;
  display: inline-block;
}

.footer-column a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-bottom {
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0;
}

/* ========================================
   PAGE CONTENT STYLES
   ======================================== */

.page-content {
  min-height: calc(100vh - 70px - 300px);
}

/* Static page styles */
.static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.static-page h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.static-page .page-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.static-page h2 {
  font-size: 1.4rem;
  margin: 40px 0 16px;
  color: var(--ink);
}

.static-page p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.static-page ul {
  margin: 16px 0;
  padding-left: 24px;
}

.static-page li {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.7;
}

/* Contact Form Styles */
.contact-form {
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
}

.contact-form .hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.contact-form .field {
  margin-bottom: 24px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid var(--stroke);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  transition: all 200ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  background: var(--gradient-primary);
  color: #fff;
  padding: 16px 32px;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 200ms ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}

/* Alert/Flash Messages */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 500;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* About Page Features */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.about-feature {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  transition: all 200ms ease;
}

.about-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about-feature-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.about-feature-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.about-feature h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--ink);
}

.about-feature p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Tech Stack Section */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.tech-badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 200ms ease;
}

.tech-badge:hover {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   DOCUMENTATION PAGE STYLES
   ======================================== */

.docs-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 90px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 24px 0;
  box-shadow: var(--shadow);
}

.docs-sidebar-header {
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 8px;
}

.docs-sidebar-header h3 {
  font-size: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav li {
  margin: 0;
}

.docs-nav-link {
  display: block;
  padding: 10px 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 150ms ease;
}

.docs-nav-link:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.docs-nav-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Content sections */
.docs-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--stroke);
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.docs-section-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.docs-section-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.docs-section h1 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.docs-section h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--ink);
}

.docs-section h3 {
  font-size: 1.1rem;
  margin: 28px 0 12px;
  color: var(--ink);
}

.docs-lead {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 32px;
}

.docs-section p {
  margin-bottom: 14px;
}

.docs-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.docs-section a:hover {
  text-decoration: underline;
}

/* Lists */
.docs-list {
  margin: 16px 0 24px 0;
  padding-left: 24px;
  line-height: 1.8;
}

.docs-list li {
  margin-bottom: 12px;
  color: var(--ink);
}

.docs-list li strong {
  color: var(--accent);
  font-weight: 600;
}

/* Steps */
.docs-steps {
  display: grid;
  gap: 20px;
  margin: 28px 0;
}

.docs-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 20px;
  transition: all 200ms ease;
}

.docs-step:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.docs-step-num {
  min-width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.docs-step h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--ink);
}

.docs-step p {
  margin: 0;
  font-size: 0.9rem;
}

/* Format badges */
.docs-format-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.docs-format {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Tables */
.docs-table-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.docs-table thead {
  background: #f1f3fb;
}

.docs-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.docs-table td {
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--stroke);
}

.docs-table code {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* History page */
.history-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.history-filename {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-date {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.history-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.history-status--completed {
  background: #dcfce7;
  color: #166534;
}

.history-status--failed {
  background: #fee2e2;
  color: #991b1b;
}

.history-status--running {
  background: #dbeafe;
  color: #1e40af;
}

.history-status--queued {
  background: #fef3c7;
  color: #92400e;
}

.history-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.history-progress-track {
  flex: 1;
  height: 6px;
  background: var(--stroke);
  border-radius: 3px;
  overflow: hidden;
}

.history-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 300ms ease;
}

.history-progress-fill--completed {
  background: #22c55e;
}

.history-progress-fill--running {
  background: var(--accent);
  background-image: linear-gradient(
    -45deg,
    rgba(255,255,255,0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.15) 75%,
    transparent 75%
  );
  background-size: 16px 16px;
  animation: progressStripe 0.6s linear infinite;
}

.history-progress-fill--queued {
  background: #f59e0b;
}

.history-progress-fill--failed {
  background: #ef4444;
}

@keyframes progressStripe {
  0% { background-position: 0 0; }
  100% { background-position: 16px 0; }
}

.history-progress-text {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}

.history-action {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.history-action:hover {
  text-decoration: underline;
}

.history-action--pending {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}

/* Callout */
.docs-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f0f4ff;
  border: 1px solid #d4ddff;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 24px 0;
}

.docs-callout-icon {
  min-width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-callout-icon svg {
  width: 18px;
  height: 18px;
}

.docs-callout div {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Code blocks */
.docs-code-block {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  margin: 14px 0 20px;
  overflow: hidden;
}

.docs-code-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #f1f3fb;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.docs-code-header code {
  font-weight: 600;
  color: var(--ink);
}

.docs-code-method {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-code-method.post {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.docs-code-method.get {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.docs-code {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink);
  background: #fafbfe;
}

.docs-code code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.docs-code-desc {
  padding: 12px 18px 0;
  font-size: 0.9rem;
}

/* Limits grid */
.docs-limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.docs-limit-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 200ms ease;
}

.docs-limit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.docs-limit-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.docs-limit-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.docs-limit-card p {
  font-size: 0.8rem;
}

.docs-limit-card code {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .docs-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
  }

  .docs-nav {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 4px;
  }

  .docs-nav-link {
    padding: 8px 14px;
    border-left: none;
    border-radius: 999px;
    font-size: 0.8rem;
  }

  .docs-nav-link.active {
    background: var(--accent);
    color: #fff;
    -webkit-text-fill-color: #fff;
  }
}

@media (max-width: 720px) {
  .tab-row {
    flex-direction: column;
  }

  .result-actions,
  .pill-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Mobile Header */
  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--gradient-header);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 8px;
  }

  .nav-link {
    padding: 14px 20px;
    text-align: center;
  }

  /* Mobile Footer */
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-container {
    padding: 40px 20px 24px;
  }

  .contact-form {
    padding: 24px;
  }

  .static-page {
    padding: 40px 20px 60px;
  }

  .docs-page {
    padding: 24px 16px 60px;
  }

  .docs-step {
    flex-direction: column;
    gap: 12px;
  }

  .docs-limits-grid {
    grid-template-columns: 1fr;
  }

  .pdf-tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   PDF Tool Grid
   ============================================ */
.pdf-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.pdf-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #f6f7fd;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 150ms ease;
  text-align: center;
  line-height: 1.2;
}

.pdf-tool-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.pdf-tool-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.pdf-tool-icon {
  font-size: 1.4rem;
  line-height: 1;
}

[data-theme="dark"] .pdf-tool-btn {
  background: #1e293b;
  border-color: #334155;
  color: var(--muted);
}

[data-theme="dark"] .pdf-tool-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .pdf-tool-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* PDF tool option panels */
.pdf-tool-options {
  margin-bottom: 12px;
}

/* Generic field input (used in PDF tools) */
.field-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #f4f6fc;
  color: var(--ink);
  width: 100%;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

[data-theme="dark"] .field-input {
  background: #0f172a;
  color: var(--ink);
  border-color: #334155;
}

[data-theme="dark"] .field-input:focus {
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Results note */
.results-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.results-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.results-note a:hover {
  text-decoration: underline;
}
