:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --line: #e2e8f0;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --violet: #7c3aed;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow: 0 24px 70px -30px rgba(30, 41, 59, 0.34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
select { font: inherit; }

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

.page-glow {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}

.page-glow-left {
  top: -18rem;
  left: -15rem;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 68%);
}

.page-glow-right {
  top: 3rem;
  right: -18rem;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 68%);
}

.navbar {
  width: min(1120px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.23rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.8);
}

.brand-mark svg { width: 23px; height: 23px; }
.brand-accent, .footer-brand span { color: var(--primary); }

.navbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.main-nav {
  margin-left: auto;
  margin-right: 18px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.main-nav a {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
}

.page-shell {
  width: min(1000px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  max-width: 750px;
  margin: 0 auto;
  padding: 76px 0 42px;
  text-align: center;
}

.eyebrow {
  width: fit-content;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(245, 243, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow svg { width: 17px; height: 17px; }

.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.064em;
  font-weight: 820;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(90deg, var(--primary), #8b5cf6 75%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero p {
  max-width: 610px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.converter-card,
.preview-section {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.workflow {
  padding: 21px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfcff);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-light);
}

.workflow-step > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 750;
}

.workflow-step div { display: grid; gap: 2px; }
.workflow-step strong { color: #475569; font-size: 0.8rem; }
.workflow-step small { color: var(--muted-light); font-size: 0.68rem; }

.workflow-step.is-current > span {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 5px 12px -5px rgba(79, 70, 229, 0.7);
}

.workflow-step.is-current strong { color: var(--primary); }

.workflow-line {
  width: clamp(28px, 6vw, 72px);
  height: 1px;
  margin: 0 17px;
  background: var(--line);
}

.card-body { padding: 30px; }

.dropzone {
  position: relative;
  min-height: 270px;
  padding: 35px 22px 27px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #c7d2fe;
  border-radius: 18px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.45), rgba(238, 242, 255, 0.5)),
    #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.dropzone::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.08), 0 12px 30px -22px rgba(79, 70, 229, 0.6);
  transform: translateY(-1px);
}

.upload-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #ddd6fe;
  border-radius: 17px;
  color: var(--primary);
  background: #fff;
  box-shadow: 0 12px 25px -18px rgba(79, 70, 229, 0.8);
}

.upload-icon svg { width: 29px; height: 29px; }

.dropzone-copy { display: grid; gap: 6px; }
.dropzone-copy strong { color: #1e293b; font-size: 1rem; }
.dropzone-copy span { color: var(--muted); font-size: 0.82rem; }

.choose-file {
  margin-top: 15px;
  padding: 8px 13px;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  color: var(--primary);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 5px 12px -9px rgba(15, 23, 42, 0.6);
}

.supported-formats {
  margin: 13px 0 0;
  color: var(--muted-light);
  font-size: 0.7rem;
}

.selected-file {
  width: min(460px, 100%);
  margin-top: 16px;
  padding: 10px 12px;
  display: none;
  align-items: center;
  gap: 9px;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
  color: #166534;
  background: rgba(240, 253, 244, 0.9);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: left;
}

.dropzone.has-file .selected-file { display: flex; }
.dropzone.has-file .choose-file,
.dropzone.has-file .supported-formats { display: none; }
.selected-file-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.selected-file-icon svg { width: 100%; height: 100%; }
.selected-file #fileName { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-check { width: 19px; height: 19px; flex: 0 0 auto; }

.conversion-controls {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) 1.2fr;
  gap: 18px;
  align-items: end;
}

.format-field { display: grid; gap: 8px; }
.format-field label { color: #475569; font-size: 0.75rem; font-weight: 700; }
.select-wrap { position: relative; }
.select-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  width: 21px;
  height: 21px;
  color: var(--primary);
  transform: translateY(-50%);
  pointer-events: none;
}
.select-icon svg { width: 100%; height: 100%; }

.target-select {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 43px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #1e293b;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.target-select:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.11);
}

.target-select:disabled { color: var(--muted-light); background: #f8fafc; cursor: not-allowed; }
.select-chevron { position: absolute; right: 13px; top: 50%; width: 20px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }

.actions { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 10px; }

.btn {
  height: 48px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 11px;
  font-size: 0.81rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d5ce7);
  box-shadow: 0 10px 22px -12px rgba(79, 70, 229, 0.9);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-dark), #5b4bd6);
  box-shadow: 0 13px 27px -13px rgba(79, 70, 229, 0.95);
}

.btn-secondary { border: 1px solid var(--line); color: #475569; background: #fff; }
.btn-secondary:hover:not(:disabled) { border-color: #c7d2fe; color: var(--primary); background: #fafaff; }

.feedback:empty { display: none; }

.status {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.status:not(:empty) {
  margin-top: 17px;
  padding: 10px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  color: #3730a3;
  background: var(--primary-soft);
}

.status.error:not(:empty) { border-color: #fecaca; color: var(--danger); background: var(--danger-soft); }

.meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 7px; }
.meta:empty { display: none; }
.meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-soft); font-size: 0.69rem; font-weight: 600; }

.preview-section { margin-top: 28px; box-shadow: 0 22px 60px -35px rgba(30, 41, 59, 0.28); }

.section-heading {
  padding: 21px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.section-kicker { display: block; margin-bottom: 4px; color: var(--primary); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.12em; }
.section-heading h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.025em; }
.preview-badge { padding: 6px 9px; border-radius: 7px; color: var(--muted); background: var(--surface-soft); font-size: 0.68rem; font-weight: 650; }

.preview-wrap { position: relative; min-height: 390px; background: #f1f5f9; }
.preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.preview-empty-icon { width: 54px; height: 54px; margin-bottom: 13px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; color: var(--muted-light); background: #fff; box-shadow: 0 12px 25px -22px rgba(15, 23, 42, 0.7); }
.preview-empty-icon svg { width: 28px; height: 28px; }
.preview-empty strong { color: #475569; font-size: 0.84rem; }
.preview-empty span { margin-top: 6px; font-size: 0.73rem; }

#pdfPreview { width: 100%; height: 68vh; min-height: 520px; display: none; border: 0; background: #fff; }
.preview-wrap.has-preview .preview-empty { display: none; }
.preview-wrap.has-preview #pdfPreview { display: block; }

.trust-row {
  margin: 28px 0 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.trust-row > div { padding: 15px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.66); }
.trust-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 0.82rem; font-weight: 800; }
.trust-row p { margin: 0; display: grid; gap: 3px; }
.trust-row strong { color: #475569; font-size: 0.74rem; }
.trust-row small { color: var(--muted-light); font-size: 0.65rem; }

.seo-copy {
  padding: clamp(27px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 44px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.seo-copy h2,
.how-to h2,
.faq-section h2 {
  margin: 6px 0 18px;
  color: #1e293b;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.seo-copy-main > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.78;
}

.format-facts {
  align-self: start;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.format-facts div {
  padding: 13px 15px;
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.format-facts div:last-child { border-bottom: 0; }
.format-facts dt { color: var(--muted-light); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.055em; }
.format-facts dd { margin: 0; color: #334155; font-size: 0.78rem; font-weight: 700; line-height: 1.4; }

.how-to,
.faq-section { padding: 58px clamp(5px, 3vw, 32px) 0; }

.how-to > .section-kicker,
.how-to > h2,
.faq-section > .section-kicker,
.faq-section > h2 { text-align: center; }

.how-to ol {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
}

.how-to li {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
}

.how-to li > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.how-to h3 { margin: 1px 0 6px; color: #334155; font-size: 0.81rem; }
.how-to p { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.55; }

.faq-list {
  max-width: 780px;
  margin: 27px auto 0;
  display: grid;
  gap: 9px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
}

.faq-list summary {
  position: relative;
  padding: 16px 46px 16px 17px;
  color: #334155;
  font-size: 0.79rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 50%; right: 17px; color: var(--primary); font-size: 1.15rem; font-weight: 500; transform: translateY(-50%); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 17px 16px; color: var(--muted); font-size: 0.76rem; line-height: 1.65; }

.independence-note {
  max-width: 780px;
  margin: 48px auto 70px;
  padding: 15px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #fde68a;
  border-radius: 13px;
  color: #92400e;
  background: #fffbeb;
}

.independence-note strong { flex: 0 0 auto; font-size: 0.73rem; }
.independence-note p { margin: 0; color: #a16207; font-size: 0.7rem; line-height: 1.5; }

footer {
  padding: 25px 20px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.71rem;
}

.footer-brand { font-weight: 850; color: #475569; letter-spacing: -0.03em; }
footer p { margin: 0; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
footer nav a { color: var(--muted); }
footer nav a:hover, footer nav a[aria-current="page"] { color: var(--primary); }

@media (max-width: 760px) {
  .navbar { width: min(100% - 28px, 1120px); height: 66px; }
  .page-shell { width: min(100% - 24px, 1000px); }
  .hero { padding: 52px 5px 32px; }
  .hero h1 { font-size: clamp(2.25rem, 11vw, 3.4rem); }
  .hero p { font-size: 0.92rem; }
  .main-nav { display: none; }
  .converter-card, .preview-section { border-radius: 18px; }
  .workflow { padding: 17px 15px; }
  .workflow-step div { display: none; }
  .workflow-line { flex: 1; max-width: 70px; margin: 0 10px; }
  .card-body { padding: 18px; }
  .dropzone { min-height: 250px; padding-inline: 15px; }
  .conversion-controls { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .trust-row { grid-template-columns: 1fr; margin-bottom: 45px; }
  .seo-copy { grid-template-columns: 1fr; gap: 24px; padding: 25px 20px; }
  .how-to, .faq-section { padding-top: 44px; }
  .how-to ol { grid-template-columns: 1fr; }
  .independence-note { margin-bottom: 45px; flex-direction: column; gap: 7px; }
  #pdfPreview { min-height: 420px; height: 60vh; }
  .preview-wrap { min-height: 330px; }
}

@media (max-width: 420px) {
  .navbar-badge { display: none; }
  .hero { padding-top: 44px; }
  .hero h1 { letter-spacing: -0.055em; }
  .eyebrow { font-size: 0.67rem; }
  .section-heading { padding: 18px; }
  footer { flex-direction: column; gap: 8px; }
  footer nav { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
