:root {
  --bg: #0d0e12;
  --surface: #15161c;
  --surface-2: #1b1d24;
  --surface-3: #22242d;
  --text: #f5f5f7;
  --muted: #9b9da8;
  --muted-2: #747681;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --orange: #ff6b35;
  --orange-light: #ff8a5f;
  --blue: #6c8cff;
  --green: #62d39a;
  --danger: #ff6969;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 50% -10%, rgba(255, 107, 53, .13), transparent 30rem), var(--bg); line-height: 1.5; }
button, input, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button, a, label[for], select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 50; padding: 12px 16px; background: #fff; color: #111; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.site-header { width: min(1180px, calc(100% - 40px)); height: 84px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: linear-gradient(135deg, var(--orange), #ff8f57); border-radius: 10px; box-shadow: 0 8px 24px rgba(255, 107, 53, .25); }
.brand-mark svg { width: 22px; height: 22px; stroke-width: 2; }
nav { display: flex; align-items: center; gap: 30px; color: #c6c7ce; font-size: 14px; font-weight: 600; }
nav a { transition: color .2s; }
nav a:hover { color: white; }
.privacy-chip { display: inline-flex; align-items: center; gap: 8px; color: #b6f0d2; background: rgba(98, 211, 154, .09); border: 1px solid rgba(98, 211, 154, .2); border-radius: 999px; padding: 8px 12px; }
.privacy-chip svg { width: 16px; height: 16px; }

main { width: min(1060px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 86px 0 52px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #c5c6cc; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 18px var(--orange); }
h1 { max-width: 850px; margin: 18px auto 20px; font-size: clamp(42px, 7vw, 76px); line-height: 1.04; letter-spacing: -.065em; }
h1 em { color: var(--orange-light); font-style: normal; }
.hero-copy { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 18px; line-height: 1.7; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 30px; color: #c7c8ce; font-size: 13px; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 16px; height: 16px; color: var(--green); stroke-width: 2.4; }

.converter-shell { margin-top: 28px; padding: 26px; background: linear-gradient(145deg, rgba(27, 29, 36, .96), rgba(20, 21, 27, .98)); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.converter-toolbar, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.step-label { margin: 0 0 4px; color: var(--orange-light); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h2, h3, p { margin-top: 0; }
.converter-toolbar h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.text-button, .add-more { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; transition: color .2s; }
.text-button:hover, .add-more:hover { color: white; }
.text-button svg, .add-more svg { width: 17px; height: 17px; }

.drop-zone { min-height: 270px; margin-top: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; background: rgba(255, 255, 255, .016); border: 1.5px dashed rgba(255, 255, 255, .19); border-radius: var(--radius); transition: background .2s, border-color .2s, transform .2s; }
.drop-zone:hover, .drop-zone.is-dragging { background: rgba(255, 107, 53, .045); border-color: rgba(255, 138, 95, .65); }
.drop-zone.is-dragging { transform: scale(.995); }
.drop-zone input, .add-more input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 9px; color: var(--orange-light); background: rgba(255, 107, 53, .1); border: 1px solid rgba(255, 107, 53, .2); border-radius: 17px; }
.upload-icon svg { width: 28px; height: 28px; }
.drop-zone strong { font-size: 17px; }
.drop-zone > span:not(.upload-icon) { color: var(--muted); font-size: 14px; }
.drop-zone u { color: #f2f2f4; text-underline-offset: 3px; }
.drop-zone small { margin-top: 13px; color: var(--muted-2); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; margin-top: 24px; }
.file-list-wrap { min-width: 0; padding: 20px; background: rgba(255, 255, 255, .018); border: 1px solid var(--border); border-radius: var(--radius); }
.section-heading h3, .settings h3 { margin: 0; font-size: 17px; }
.section-heading h3 span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 6px; padding: 0 7px; color: #bfc0c7; background: var(--surface-3); border-radius: 999px; font-size: 11px; }
.file-list { max-height: 390px; margin: 16px 0 0; padding: 0; list-style: none; overflow-y: auto; }
.file-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 11px 4px; border-top: 1px solid var(--border); }
.file-thumb { width: 48px; height: 48px; object-fit: cover; background: var(--surface-3); border-radius: 9px; }
.file-meta { min-width: 0; }
.file-meta strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { color: var(--muted-2); font-size: 11px; }
.remove-file { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted-2); background: none; border: 0; border-radius: 9px; transition: color .2s, background .2s; }
.remove-file:hover { color: var(--danger); background: rgba(255, 105, 105, .08); }
.remove-file svg { width: 17px; height: 17px; }

.settings { padding: 21px; background: #1a1b22; border: 1px solid var(--border); border-radius: var(--radius); }
.settings fieldset { margin: 22px 0 20px; padding: 0; border: 0; }
.settings legend, .control-label { margin-bottom: 9px; color: #c9cad0; font-size: 12px; font-weight: 700; }
.format-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; background: #101116; border-radius: 10px; }
.format-switch input { position: absolute; opacity: 0; }
.format-switch span { min-height: 38px; display: grid; place-items: center; color: var(--muted); border-radius: 7px; font-size: 12px; font-weight: 700; transition: color .2s, background .2s, box-shadow .2s; }
.format-switch input:checked + span { color: white; background: #30323c; box-shadow: 0 2px 7px rgba(0, 0, 0, .22); }
.format-switch input:focus-visible + span { outline: 3px solid var(--blue); }
.control-label { display: flex; justify-content: space-between; margin-top: 17px; }
.control-label output { color: var(--orange-light); }
.range { width: 100%; height: 4px; margin: 5px 0 10px; appearance: none; background: linear-gradient(to right, var(--orange) 0 70%, #353741 70%); border-radius: 999px; }
.range::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; background: white; border: 4px solid var(--orange); border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; min-height: 44px; appearance: none; padding: 0 40px 0 13px; color: #e4e4e8; background: #101116; border: 1px solid var(--border); border-radius: 9px; font-size: 12px; }
.select-wrap svg { position: absolute; right: 13px; top: 12px; width: 18px; color: var(--muted); pointer-events: none; }
.primary-button, .secondary-button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 19px; border-radius: 11px; font-weight: 800; transition: transform .15s, filter .2s, border-color .2s, background .2s; }
.primary-button { color: #fff; background: linear-gradient(135deg, #ff713d, #f25522); border: 0; box-shadow: 0 10px 28px rgba(242, 85, 34, .22); }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: wait; filter: grayscale(.2); opacity: .7; }
.settings > .primary-button { width: 100%; margin-top: 23px; }
.settings-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--muted-2); font-size: 10px; }
.settings-note svg { width: 14px; height: 14px; }

.results { align-items: center; gap: 16px; margin-top: 22px; padding: 20px; background: rgba(98, 211, 154, .055); border: 1px solid rgba(98, 211, 154, .18); border-radius: var(--radius); }
.results:not([hidden]) { display: flex; }
.success-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; color: #111; background: var(--green); border-radius: 50%; }
.success-icon svg { stroke-width: 2.5; }
.results h3 { margin: 0 0 3px; }
.results p { margin: 0; color: #aeb0b8; font-size: 12px; }
.result-actions { display: flex; gap: 9px; margin-left: auto; }
.secondary-button { color: #dddde2; background: transparent; border: 1px solid var(--border-strong); }
.secondary-button:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.25); }
.primary-button.compact { min-height: 44px; font-size: 13px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 100px 0 90px; }
.feature-grid article { padding: 25px; background: rgba(255, 255, 255, .018); border: 1px solid var(--border); border-radius: var(--radius); }
.feature-grid article > span { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 22px; color: var(--orange-light); background: rgba(255, 107, 53, .08); border-radius: 11px; }
.feature-grid h3 { margin-bottom: 9px; font-size: 16px; }
.feature-grid p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.faq { max-width: 760px; margin: 0 auto; padding: 40px 0 100px; }
.faq > h2 { margin: 3px 0 25px; font-size: 34px; letter-spacing: -.04em; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; font-size: 14px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: 0 0 auto; color: var(--muted); transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { max-width: 650px; padding: 0 0 22px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

footer { width: min(1180px, calc(100% - 40px)); min-height: 130px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; color: var(--muted-2); border-top: 1px solid var(--border); font-size: 11px; }
footer p { margin: 0; text-align: center; }
footer > span { justify-self: end; }
.footer-brand { color: #d7d7dc; font-size: 15px; }
.footer-brand .brand-mark { width: 29px; height: 29px; border-radius: 8px; }
.footer-brand .brand-mark svg { width: 18px; height: 18px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: min(360px, calc(100% - 40px)); padding: 13px 17px; color: white; background: #2b2d36; border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; transform: translateY(100px); opacity: 0; transition: transform .25s, opacity .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 800px) {
  nav > a { display: none; }
  .hero { padding-top: 62px; }
  .workspace { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; padding-block: 70px; }
  .results:not([hidden]) { align-items: flex-start; flex-wrap: wrap; }
  .result-actions { width: 100%; margin-left: 60px; }
  footer { grid-template-columns: 1fr 1fr; padding: 30px 0; }
  footer p { display: none; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 24px, 1060px); }
  .site-header { height: 72px; }
  .privacy-chip { padding: 8px; font-size: 0; }
  h1 { font-size: 42px; }
  .hero { padding-top: 48px; }
  .hero-copy { font-size: 16px; }
  .trust-row { flex-direction: column; align-items: center; gap: 10px; }
  .converter-shell { padding: 14px; border-radius: 18px; }
  .converter-toolbar { padding: 7px 4px 0; }
  .drop-zone { min-height: 240px; }
  .file-list-wrap, .settings { padding: 16px; }
  .result-actions { flex-direction: column; margin-left: 0; }
  .result-actions button { width: 100%; }
  footer { grid-template-columns: 1fr; }
  footer > span { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
