:root {
  --bg: #f6f8fc;
  --bg-accent: rgba(99, 102, 241, 0.08);
  --panel: rgba(255,255,255,0.82);
  --panel-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.10);
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --success: #15803d;
  --warning: #b45309;
  --error: #b91c1c;
  --shadow: 0 20px 60px rgba(2, 8, 23, 0.10);
  --radius: 22px;
}
body[data-theme="dark"] {
  --bg: #08111f;
  --bg-accent: rgba(99, 102, 241, 0.18);
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 20px 60px rgba(0,0,0,0.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--bg-accent), transparent 30%),
    radial-gradient(circle at top right, rgba(6,182,212,0.10), transparent 24%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav, .nav-actions, .hero-cta, .stats-row, .share-actions, .footer-row { display: flex; align-items: center; gap: 14px; }
.nav { justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; font-weight: 800;
}
.brand small, .eyebrow, .lead, .fineprint, .tool-card p, .feature-card p, .user-card p, .step-list p, .faq-list p, .contact-card p, .muted, .field span, .status-pill, .result-item small { color: var(--muted); }
nav { display: flex; gap: 20px; }
nav a { opacity: .9; }
.btn, .theme-toggle {
  border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--panel-solid); color: var(--text);
  box-shadow: var(--shadow);
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; border-color: transparent; }
.btn-secondary { background: transparent; }
.btn-block { width: 100%; margin-top: 12px; }
.hero { padding: 72px 0 28px; }
.hero-grid, .workspace-grid, .two-col { display: grid; gap: 28px; }
.hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1, .section h2 { margin: 12px 0 18px; line-height: 1.02; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.lead { font-size: 1.07rem; max-width: 760px; }
.stats-row { flex-wrap: wrap; margin-top: 24px; }
.stats-row div, .stats-panel div {
  min-width: 130px; display: grid; gap: 4px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow);
}
.stats-row strong, .stats-panel strong { font-size: 1.25rem; }
.glass-panel, .upload-panel, .results-panel, .feature-card, .user-card, .contact-card, .share-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-card { padding: 10px; }
.glass-panel, .upload-panel, .results-panel, .feature-card, .user-card, .contact-card, .share-card { padding: 24px; }
.mini-topbar { display: flex; gap: 8px; margin-bottom: 14px; }
.mini-topbar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(148, 163, 184, 0.45); }
.status-grid, .feature-grid, .tool-grid, .user-grid, .selected-files, .result-list, .faq-list, .step-list, .share-list { display: grid; gap: 14px; }
.status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 18px; }
.status-pill { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-solid); }
.status-pill.ok { border-color: rgba(34,197,94,.35); }
.status-pill.warn { border-color: rgba(245,158,11,.35); }
.process-strip { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.process-strip span, .badge {
  padding: 10px 14px; border-radius: 999px; text-align: center; background: rgba(79,70,229,.12); color: var(--text); font-weight: 700;
}
.section { padding: 38px 0; }
.alt { background: rgba(255,255,255,0.03); border-block: 1px solid var(--border); }
.section-head { margin-bottom: 22px; }
.tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tool-card {
  padding: 22px; border-radius: 22px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; transition: .2s ease;
}
.tool-card:hover, .tool-card.active { transform: translateY(-4px); border-color: rgba(79,70,229,.55); box-shadow: 0 16px 36px rgba(79,70,229,.12); }
.workspace-grid, .two-col { grid-template-columns: 1fr 1fr; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dropzone {
  border: 1.5px dashed rgba(79,70,229,.68); border-radius: 24px; padding: 34px 20px; text-align: center;
  background: linear-gradient(180deg, rgba(79,70,229,.08), rgba(6,182,212,.05));
}
.dropzone.dragging { border-color: var(--primary-2); background: rgba(6,182,212,.10); }
.drop-icon { font-size: 2.2rem; margin-bottom: 12px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 8px; }
.field input, .field select, .share-box input, .ai-form input {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel-solid); color: var(--text);
}
.file-chip, .result-item, .share-item {
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel-solid);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.result-box { min-height: 320px; padding: 20px; border-radius: 24px; border: 1px solid var(--border); background: var(--panel); }
.result-box.muted { display: grid; place-items: center; color: var(--muted); }
.success { color: var(--success); font-weight: 700; margin-bottom: 14px; }
.error { color: var(--error); font-weight: 700; }
.loader {
  width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(148,163,184,0.25); border-top-color: var(--primary-2);
  animation: spin 1s linear infinite; margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stats-panel { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 14px 0 18px; }
.share-box { margin-top: 18px; padding: 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel-solid); display: grid; grid-template-columns: 1fr 140px; gap: 16px; align-items: center; }
.qr-wrap { display: grid; place-items: center; min-height: 120px; background: white; border-radius: 16px; overflow: hidden; }
.feature-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.step-list details, .faq-list details { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--border); background: var(--panel); }
.faq-list details summary, .step-list details summary { cursor: pointer; font-weight: 700; }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.contact-links { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.site-footer { border-top: 1px solid var(--border); padding: 20px 0 34px; }
.footer-row { justify-content: space-between; }
.share-body { min-height: 100vh; display: grid; place-items: center; }
.share-shell { width: min(760px, calc(100% - 24px)); }
.ai-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; border: 0; border-radius: 999px; padding: 15px 20px; font-weight: 800;
  color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: var(--shadow); cursor: pointer;
}
.ai-panel {
  position: fixed; right: 20px; bottom: 84px; width: min(380px, calc(100% - 24px)); z-index: 45;
  border-radius: 24px; border: 1px solid var(--border); background: var(--panel-solid); box-shadow: var(--shadow); overflow: hidden;
}
.hidden { display: none; }
.ai-head, .ai-form { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); }
.ai-head { justify-content: space-between; }
.ai-head button, .ai-form button { border: 0; background: rgba(79,70,229,.12); color: var(--text); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.ai-messages { max-height: 320px; overflow: auto; display: grid; gap: 10px; padding: 14px; }
.ai-message { padding: 12px 14px; border-radius: 16px; max-width: 90%; }
.ai-message.bot { background: rgba(148,163,184,.12); }
.ai-message.user { background: rgba(79,70,229,.18); margin-left: auto; }
@media (max-width: 1024px) {
  .hero-grid, .workspace-grid, .two-col { grid-template-columns: 1fr; }
  .tool-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  nav { display: none; }
  .nav { flex-wrap: wrap; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .theme-text { display: none; }
  .tool-grid, .feature-grid, .user-grid, .status-grid, .options-grid, .stats-panel, .share-box { grid-template-columns: 1fr; }
  .contact-card, .footer-row { flex-direction: column; align-items: flex-start; }
  .contact-links { align-items: flex-start; }
}
