:root {
  --navy: #0d47a1;
  --navy-dark: #093170;
  --navy-light: #e8f0fe;
  --accent: #1976d2;
  --green: #2e7d32;
  --green-light: #e6f4ea;
  --red: #c62828;
  --red-light: #fdecea;
  --ink: #1a2233;
  --muted: #5b6878;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(13, 71, 161, 0.08);
  --shadow-lg: 0 20px 50px rgba(13, 71, 161, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--navy);
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.5px;
}
.header-nav { display: flex; gap: 22px; }
.header-nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.header-nav a:hover { color: var(--navy); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy-light) 0%, var(--bg) 100%);
  padding: 56px 0 64px;
  text-align: center;
}
.badge {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.15;
  margin: 22px 0 14px;
  letter-spacing: -0.5px;
}
.hero-sub {
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--muted);
}
.hero-foot {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

/* Dropzone */
.dropzone {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border: 2.5px dashed var(--accent);
  border-radius: var(--radius);
  padding: 44px 24px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow);
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.dropzone.dragover {
  border-color: var(--green);
  background: var(--green-light);
  transform: scale(1.01);
}
.dz-icon { font-size: 40px; margin-bottom: 8px; }
.dz-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.dz-or { color: var(--muted); margin: 8px 0; font-size: 14px; }
.dz-hint { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(13,71,161,.3); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-block { display: block; width: 100%; margin-top: 8px; }

/* Result panel */
.result {
  max-width: 620px;
  margin: 24px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  box-shadow: var(--shadow);
  animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result.is-success { border-left: 5px solid var(--green); }
.result.is-error { border-left: 5px solid var(--red); }
.result.is-working { border-left: 5px solid var(--accent); }
.result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.result-emoji { font-size: 26px; }
.result-title { font-size: 18px; font-weight: 800; margin: 0; }
.result-body { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.result .filemeta {
  margin-top: 14px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.result .filemeta div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.result .filemeta span:first-child { color: var(--muted); }
.result .filemeta span:last-child { font-weight: 600; word-break: break-all; text-align: right; }
.btn-download { background: var(--green); color:#fff; }
.btn-download:hover { background: #256528; }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px; font-size: 14px; }
.btn-ghost:hover { color: var(--navy); }

.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--navy-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 28px; text-align: center; margin: 0 0 36px; letter-spacing: -0.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.step-num {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Privacy */
.privacy { display: flex; gap: 28px; align-items: flex-start; }
.privacy-icon { font-size: 54px; line-height: 1; }
.privacy h2 { text-align: left; margin: 0 0 8px; }
.privacy .lead { font-size: 18px; margin: 0 0 16px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink); }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 800; font-size: 18px;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

code {
  background: var(--navy-light);
  color: var(--navy-dark);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 32px 0; }
.footer-inner { text-align: center; }
.footer-inner p { margin: 4px 0; }
.footer-inner .muted { color: #8a99ab; font-size: 13px; }

/* Responsive */
@media (max-width: 760px) {
  .header-nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .privacy { flex-direction: column; gap: 16px; align-items: center; text-align: center; }
  .privacy h2 { text-align: center; }
  .check-list li { text-align: left; }
}
