:root {
  --bg: #0b1020;
  --panel: rgba(255,255,255,.08);
  --panel-strong: rgba(255,255,255,.13);
  --text: #f8fafc;
  --muted: #a9b5c7;
  --line: rgba(255,255,255,.14);
  --accent: #60a5fa;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(96,165,250,.28), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(34,197,94,.18), transparent 34rem),
    var(--bg);
  color: var(--text);
}
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: .98; letter-spacing: -0.05em; max-width: 850px; }
.subtitle { color: var(--muted); font-size: 18px; max-width: 760px; }
.stats { min-width: 150px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); text-align: center; }
.stats span { color: var(--muted); display: block; font-size: 13px; }
.stats strong { display: block; font-size: 30px; margin-top: 4px; }
.panel { border: 1px solid var(--line); border-radius: 30px; background: rgba(15,23,42,.72); backdrop-filter: blur(16px); box-shadow: var(--shadow); padding: 22px; }
.dropzone { position: relative; border: 2px dashed rgba(255,255,255,.22); border-radius: 26px; padding: 42px 20px; text-align: center; background: rgba(255,255,255,.055); cursor: pointer; transition: .2s ease; }
.dropzone.dragover { border-color: var(--accent); background: rgba(96,165,250,.13); transform: translateY(-2px); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(96,165,250,.25), rgba(34,197,94,.25)); font-size: 34px; }
.dropzone h2 { margin: 0 0 6px; font-size: 24px; }
.dropzone p, .list-head p { margin: 0; color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.output-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.output-card span { color: var(--muted); font-size: 14px; margin-right: 6px; }
.output-card label { display: inline-flex; gap: 6px; align-items: center; }
.actions { display: flex; gap: 10px; }
.btn { border: 0; border-radius: 16px; padding: 13px 18px; color: var(--text); font-weight: 800; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, #2563eb, #16a34a); }
.btn.ghost { background: var(--panel-strong); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.message { padding: 14px 16px; border-radius: 16px; margin: 14px 0; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.35); }
.hidden { display: none !important; }
.list-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin: 20px 0 12px; }
.list-head h2 { margin: 0; }
.file-list { display: grid; gap: 12px; }
.empty-state { padding: 22px; border: 1px solid var(--line); border-radius: 18px; text-align: center; color: var(--muted); background: var(--panel); }
.file-card { display: grid; grid-template-columns: 34px 118px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.07); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.file-card.dragging { opacity: .45; transform: scale(.99); }
.file-card.drag-target { border-color: var(--accent); background: rgba(96,165,250,.12); }
.drag-handle { color: var(--muted); text-align: center; cursor: grab; font-size: 20px; }
.preview-wrap { width: 118px; height: 88px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.08); display: grid; place-items: center; border: 1px solid var(--line); }
.preview { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-weight: 800; transform-origin: center; transition: transform .2s ease; }
.preview img, .preview iframe { width: 100%; height: 100%; object-fit: cover; border: 0; pointer-events: none; }
.preview .html-preview { width: 100%; height: 100%; padding: 10px; font-size: 12px; overflow: hidden; color: #dbeafe; background: linear-gradient(135deg, rgba(96,165,250,.22), rgba(255,255,255,.05)); }
.file-info { min-width: 0; }
.file-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.card-actions { display: flex; gap: 8px; }
.mini { width: 38px; height: 38px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-strong); color: var(--text); font-weight: 900; cursor: pointer; font-size: 18px; }
.mini.danger { color: #fecaca; background: rgba(239,68,68,.14); }
@media (max-width: 760px) {
  .hero { align-items: stretch; flex-direction: column; }
  .file-card { grid-template-columns: 26px 82px minmax(0, 1fr); }
  .preview-wrap { width: 82px; height: 70px; }
  .card-actions { grid-column: 2 / -1; justify-content: flex-end; }
}
