/* Hoshibi Converter – flach, ruhig, schnell. Farben aus hoshibi-hub/static/hub.css */
:root {
  --bg: #0e0f11;
  --panel: #141619;
  --field: #1b1d22;
  --field-hover: #22252b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eceef1;
  --text-2: #a3a8b1;
  --text-3: #868c97;
  --accent: #e07a9f; /* Rosé: eigene Converter-Farbe, sonst von keiner Hoshibi-App belegt */
  --accent-hover: #e891b1;
  --accent-ink: #1a0a11;
  --accent-soft: rgba(224, 122, 159, 0.14);
  --accent-text: #f2b3ca;
  --ok: #46a883;
  --bad: #d0645e;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --head: 'Space Grotesk', Outfit, system-ui, sans-serif;
  --r: 6px;
  --r-sm: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.6 Outfit, 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 12px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text-2); }
h1, h2 { font-family: var(--head); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.wrap { width: min(960px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 5; padding: 8px 14px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); }
.skip:focus { top: 12px; }

/* ---------- Kopfzeile ---------- */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font: 500 17px/1 var(--head); color: var(--text); letter-spacing: -0.01em; }
.brand span { color: var(--text-3); }
.brand:hover { text-decoration: none; color: var(--text); }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-height: 32px; }
.account img, .account .ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--field); display: grid; place-items: center; font-size: 13px; }
.account b { color: var(--text); font-weight: 500; }
.usermenu { position: relative; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--field); color: var(--text); font: 500 14px/1 var(--head); overflow: hidden; transition: border-color .12s; }
.avatar:hover, .avatar[aria-expanded=true] { border-color: var(--accent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 15; min-width: 240px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #1b1d22; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6); }
.menu[hidden] { display: none; }
.menu-who { display: grid; gap: 1px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu-who b { color: var(--text); font-weight: 500; }
.menu-who span { font: 12.5px/1.4 var(--mono); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button { display: flex; align-items: center; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-size: 14.5px; text-align: left; text-decoration: none; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--field-hover); color: var(--text); text-decoration: none; outline: none; }
.menu .menu-logout { color: #e8928a; }

main { flex: 1; }

/* ---------- Einstieg ---------- */
.intro { padding: 56px 0 28px; }
.lede { max-width: 620px; }
h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.08; }
.lede { margin: 14px 0 0; font-size: 18px; color: var(--text-2); }
.limits { margin: 10px 0 0; font: 13px/1.5 var(--mono); color: var(--text-3); }
.limits a { color: var(--accent-text); }

/* ---------- Upload-Fläche ---------- */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 200px; padding: 32px 20px; cursor: pointer;
  border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--panel);
  transition: border-color .12s, background-color .12s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: #1a1619; }
.drop > svg { font-size: 30px; color: var(--accent-text); margin-bottom: 6px; }
.drop-title { font-size: 17px; font-weight: 500; }
.drop-title u { color: var(--accent-text); text-underline-offset: 3px; }
.drop-sub { font-size: 14px; color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--field); color: var(--text); font-size: 14px; font-weight: 500;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--field-hover); }
.btn:active { transform: translateY(1px); }
.btn.quiet { background: none; border-color: transparent; color: var(--text-2); }
.btn.quiet:hover { color: var(--text); background: var(--field); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-width: 128px; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #04130d; }
.btn.ok:hover { background: #52b892; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: none; color: var(--text-3); font-size: 18px; }
.icon-btn:hover { background: var(--field); color: var(--text); }

/* ---------- Dateiliste: eine Liste, Zeilen mit Trennlinien ---------- */
.queue { padding-top: 40px; }
.queue-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.queue-head h2 { font-size: 20px; }
.queue-actions { display: flex; gap: 6px; }
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.row { position: relative; padding: 14px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row-head { display: flex; align-items: center; gap: 12px; }
.glyph { flex: none; font-size: 22px; color: var(--text-3); display: grid; }
.glyph[data-kind=image] { color: #b9b1ee; }
.glyph[data-kind=audio] { color: #7fd0b0; }
.glyph[data-kind=video] { color: #e3c27e; }
.glyph[data-kind=document], .glyph[data-kind=sheet], .glyph[data-kind=slides], .glyph[data-kind=pdf] { color: #a5c4f0; }
.meta { flex: 1; min-width: 0; }
.name { margin: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { margin: 0; font: 12.5px/1.5 var(--mono); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub .ok { color: var(--ok); }
.sub .err { color: var(--bad); font-family: Outfit, system-ui, sans-serif; font-size: 13.5px; }

.row-opts { display: none; margin: 12px 0 0 34px; }
.row.ready .row-opts { display: block; }
.targets { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  height: 28px; min-width: 48px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; color: var(--text-2);
  font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; transition: background-color .12s, color .12s, border-color .12s;
}
.chip:hover { background: var(--field); color: var(--text); }
.chip[aria-checked=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip.wide { text-transform: none; letter-spacing: 0; font-family: Outfit, system-ui, sans-serif; font-size: 13px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { height: 34px; padding: 0 12px; border: 0; background: none; color: var(--text-3); font-size: 13.5px; transition: background-color .12s, color .12s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button[aria-checked=true] { background: var(--field); color: var(--text); }

/* Fortschritt: dünner Balken unten in der Zeile, nur transform */
.bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; opacity: 0; }
.bar.on { opacity: 1; }
.bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .3s linear; }
.bar.indet i { width: 30%; transform: none; animation: slide 1.2s linear infinite; }
@keyframes slide { from { translate: -100% 0; } to { translate: 340% 0; } }

/* ---------- Formate ---------- */
.formats, .how { padding-top: 64px; }
.formats h2, .how h2 { font-size: 20px; margin-bottom: 14px; }
.ftable { width: 100%; border-collapse: collapse; }
.ftable th, .ftable td { padding: 12px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.ftable tr:last-child th, .ftable tr:last-child td { border-bottom: 1px solid var(--line); }
.ftable th { width: 160px; padding-right: 16px; font-weight: 500; }
.ftable td { font: 13px/1.7 var(--mono); color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; word-spacing: .4em; }
.ftable td small { display: block; font: 14px/1.5 Outfit, system-ui, sans-serif; text-transform: none; letter-spacing: 0; word-spacing: 0; color: var(--text-3); margin-top: 2px; }

.how ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); max-width: 680px; }
.how b { color: var(--text); font-weight: 500; }

.foot { margin-top: 80px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 20px 0 28px; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--text-2); }

/* ---------- Ziehen & Hinweise ---------- */
.dragveil { position: fixed; inset: 0; z-index: 10; display: none; place-items: center; background: rgba(14, 15, 17, .9); border: 2px dashed var(--accent); }
.dragveil.on { display: grid; }
.dragveil p { margin: 0; font: 500 24px/1.2 var(--head); }
.toasts { position: fixed; z-index: 20; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(400px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: var(--r); background: #1b1d22; font-size: 14.5px; }
.toast.bad { border-left-color: var(--bad); }
.toast p { margin: 0; flex: 1; }
.toast a { flex: none; font-weight: 500; }

@media (max-width: 640px) {
  .intro { padding-top: 32px; }
  .row-opts { margin-left: 0; }
  .row-actions { flex-direction: column; align-items: stretch; }
  .seg button { flex: 1; }
  .ftable th { width: 110px; }
}
@media (pointer: coarse) {
  .drop-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bar.indet i { animation: none; width: 100%; opacity: .5; }
  .bar i { transition: none; }
}
