:root {
  color-scheme: dark;
  --bg: #090a0d;
  --panel: #111318;
  --line: #2a2d35;
  --text: #f4f5f7;
  --muted: #969ca8;
  --acid: #c7ff35;
  --acid-dark: #90bd16;
  --danger: #ff6b72;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 70% -12%, #151b0d 0, var(--bg) 28rem); color: var(--text); }
main { width: min(920px, calc(100% - 32px)); margin: 0 auto; }
.nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--acid); color: #10130b; border-radius: 8px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.language-toggle { min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #16191f; color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.language-toggle:hover { border-color: var(--acid); color: var(--acid); }
.privacy, .subhead, .price, footer { color: var(--muted); }
.privacy { font-size: 13px; }
.privacy strong { color: var(--text); }
.hero { padding: 48px 0 30px; max-width: 720px; }
.eyebrow, .step { margin: 0 0 10px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -.055em; }
.headline-main { color: var(--text); }
.headline-accent { color: var(--acid); }
.subhead { margin: 18px 0 0; max-width: 620px; font-size: 16px; line-height: 1.6; }
.mode { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #c9cdd5; font-size: 11px; }
.workspace, .progress-card { padding: 26px; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 56px rgba(0,0,0,.2); }
.workspace-head, .progress-copy { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.dropzone { margin-top: 20px; min-height: 164px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed #444955; border-radius: 10px; background: #0c0e12; cursor: pointer; transition: .2s ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--acid); background: #11160c; }
.dropzone:focus-within, #folder-files:focus-visible + .folder-row .folder-picker, .button:focus-visible, .language-toggle:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acid); color: #111; font-size: 21px; font-weight: 900; }
.dropzone small { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.folder-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.folder-row span, .time-range small { color: var(--muted); font-size: 12px; }
.folder-picker { display: inline-grid; place-items: center; width: auto; }
.time-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin: 16px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.time-range legend { padding: 0 8px; color: var(--acid); font-size: 12px; font-weight: 800; }
.time-range label { display: grid; gap: 7px; color: #c9cdd5; font-size: 12px; font-weight: 700; }
.time-range input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #3a3f48; border-radius: 9px; background: #0c0e12; color: var(--text); font: inherit; }
.time-range input:focus { outline: 2px solid color-mix(in srgb, var(--acid) 55%, transparent); border-color: var(--acid); }
.time-range > small { grid-column: 1 / -1; }
.selection { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; }
.selection-summary, .selection-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.selection-summary > div { flex: 1; }
.selection span { color: var(--muted); }
.clear-files, .remove-file, .toggle-files { min-height: 36px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.toggle-files { flex-shrink: 0; color: var(--acid); }
.toggle-files:hover { color: #d3ff65; }
.clear-files:hover, .remove-file:hover { color: var(--danger); }
.clear-files:focus-visible, .remove-file:focus-visible, .toggle-files:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; border-radius: 6px; }
.clear-files:disabled, .remove-file:disabled { opacity: .4; cursor: not-allowed; }
.file-list { max-height: 240px; margin: 10px 0 0; padding: 0; overflow: auto; list-style: none; border-top: 1px solid #20232a; }
.file-list li { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #20232a; }
.file-list li:last-child { border-bottom: 0; }
.file-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.file-copy strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-copy small { flex: none; color: var(--muted); font-size: 11px; }
.results { margin: 14px 0 0; padding: 0; list-style: none; max-height: 240px; overflow: auto; }
.results li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid #20232a; font-size: 13px; }
.results li span { color: var(--muted); }
.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; font: inherit; font-weight: 800; cursor: pointer; }
.button:disabled { opacity: .35; cursor: not-allowed; }
.primary { background: var(--acid); color: #10130b; }
.primary:hover:not(:disabled) { background: #d3ff65; }
.secondary { background: #252a32; color: var(--text); }
.price { margin: 12px 0 0; text-align: right; font-size: 12px; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 9px; font-size: 14px; }
.error { color: #ffd7d9; background: #39171a; border: 1px solid #6a282d; }
.success { color: #eaffb6; background: #1d2b0c; border: 1px solid #3f5b1b; }
.progress-card { margin-top: 20px; }
.progress-hint { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.progress-track { position: relative; height: 8px; margin-top: 22px; overflow: hidden; background: #292d34; border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--acid); transition: width .3s ease; }
.progress-track.uploading::after { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--acid); content: ""; animation: uploading-progress 1.15s ease-in-out infinite; }
@keyframes uploading-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}
.results { max-height: 360px; }
.results .failed { color: var(--danger); }
#download { margin-top: 20px; width: 100%; }
footer { padding: 28px 0 36px; text-align: center; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .progress-track.uploading::after { animation: none; opacity: .7; }
}

@media (max-width: 640px) {
  main { width: min(100% - 20px, 920px); }
  .nav { min-height: 64px; }
  .privacy { display: none; }
  .hero { padding: 36px 0 24px; }
  h1 { font-size: 38px; }
  .subhead { font-size: 15px; }
  .workspace, .progress-card { padding: 18px; border-radius: 14px; }
  .workspace-head { display: block; }
  .mode { display: inline-block; margin-top: 14px; }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .folder-row { align-items: stretch; flex-direction: column; }
  .folder-row span { text-align: center; }
  .selection-summary { align-items: flex-start; }
  .selection-summary > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .file-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
  .time-range { grid-template-columns: 1fr auto 1fr; padding: 14px; }
  .dropzone { min-height: 140px; }
}
