:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #152033;
  --ink-muted: #667085;
  --line: #d8e0ec;
  --surface: #ffffff;
  --brand: #1956d1;
  --brand-dark: #103f9f;
  --success: #18794e;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --shadow: 0 20px 55px rgba(31, 52, 86, 0.12);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at top, #e9f0ff 0, #f4f7fb 42rem); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.page-shell { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 40px; }
.hero { text-align: center; margin-bottom: 30px; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.045em; }
.intro { max-width: 650px; margin: 18px auto 0; color: var(--ink-muted); font-size: 1.06rem; line-height: 1.65; }

.converter-card { padding: clamp(20px, 4vw, 34px); border: 1px solid rgba(216, 224, 236, 0.9); border-radius: 24px; background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.drop-zone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 190px; padding: 28px; border: 2px dashed #aebddb; border-radius: 18px; background: #f8faff; outline: none; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging { border-color: var(--brand); background: #eef4ff; }
.drop-zone.is-dragging { transform: scale(1.008); }
.drop-zone.is-disabled { opacity: .62; background: #f2f4f7; pointer-events: none; }
.file-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 17px; background: #dfeaff; color: var(--brand-dark); font-size: .83rem; font-weight: 900; letter-spacing: .08em; }
.drop-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; }
.drop-help, .selection-summary { margin: 0; color: var(--ink-muted); }
.selection-summary { grid-column: 1 / -1; padding-top: 8px; text-align: center; font-size: .92rem; overflow-wrap: anywhere; }

.primary-button, .secondary-button { border: 0; border-radius: 12px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.primary-button { width: 100%; margin-top: 20px; padding: 15px 22px; background: var(--brand); color: white; box-shadow: 0 10px 22px rgba(25, 86, 209, .22); }
.primary-button:not(:disabled):hover { background: var(--brand-dark); transform: translateY(-1px); }
.primary-button:disabled { background: #aab5c8; box-shadow: none; }
.secondary-button { padding: 12px 16px; color: var(--brand-dark); background: white; border: 1px solid #b8c6df; white-space: nowrap; }
.secondary-button:not(:disabled):hover { box-shadow: 0 5px 14px rgba(37, 64, 110, .12); }

.alert { margin-top: 16px; padding: 12px 14px; border: 1px solid #f4b4ae; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-weight: 650; }
.results { margin-top: 28px; }
.result-batch { margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 28px rgba(31, 52, 86, .07); }
.result-batch h2 { margin: 0 0 16px; font-size: 1rem; color: #344054; }
.result-list { margin: 0; padding: 0; list-style: none; }
.result-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #edf0f5; }
.result-item:first-child { border-top: 0; }
.result-name { min-width: 0; font-weight: 780; overflow-wrap: anywhere; }
.result-status { display: inline-flex; align-items: center; gap: 8px; max-width: 440px; color: var(--ink-muted); font-size: .88rem; text-align: right; }
.result-status.success { color: var(--success); }
.result-status.failure { color: var(--danger); font-style: italic; }
.download-link { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.download-link:hover { color: var(--brand-dark); }
.spinner { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #c7d2e6; border-top-color: var(--brand); border-radius: 50%; animation: spin .75s linear infinite; }
.batch-summary { margin: 16px 0 0; color: #475467; font-weight: 750; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { max-width: 680px; margin: 28px auto 0; color: var(--ink-muted); font-size: .86rem; line-height: 1.6; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  .page-shell { padding-top: 38px; }
  .drop-zone { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .result-item { grid-template-columns: 1fr; gap: 7px; }
  .result-status { max-width: none; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .spinner { animation-duration: 1.5s; }
}
footer p { margin: 0.55rem 0; }
footer a { color: var(--brand); text-underline-offset: 3px; }
footer a:hover { color: var(--brand-dark); }
.format-warning { color: #7a4b00; }
