:root {
  --bg: #070912;
  --text: #f4f6ff;
  --muted: rgba(235, 240, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.16);
  --stroke-hi: rgba(255, 255, 255, 0.38);
  --accent: #7cb8ff;
  --accent-2: #b18cff;
  --ok: #6ee7b7;
  --warn: #fcd34d;
  --danger: #ff8a9a;
  --radius: 26px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.25);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); }

/* ---------- animierter Hintergrund ---------- */
.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, transparent 0%, rgba(7, 9, 18, 0.35) 70%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.75;
  animation: float 26s ease-in-out infinite alternate;
}
.b1 { width: 52vmax; height: 52vmax; left: -14vmax; top: -18vmax; background: #2f5bff; }
.b2 { width: 44vmax; height: 44vmax; right: -16vmax; top: 4vmax; background: #9b4dff; animation-duration: 32s; }
.b3 { width: 38vmax; height: 38vmax; left: 18vmax; bottom: -22vmax; background: #00b3c7; animation-duration: 38s; }
.b4 { width: 24vmax; height: 24vmax; right: 12vmax; bottom: 6vmax; background: #ff5fa2; opacity: 0.45; animation-duration: 29s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 7vmax) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Liquid Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.08));
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
/* Lichtkante oben links */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(140deg, var(--stroke-hi), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.card { border-radius: var(--radius); padding: 26px; }
.card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }
.card h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head p { margin: 0; max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px;
  font: 600 14px/1 var(--font); color: var(--text); cursor: pointer;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary {
  border-color: rgba(160, 200, 255, 0.55);
  background: linear-gradient(180deg, rgba(124, 184, 255, 0.85), rgba(110, 120, 255, 0.75));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 30px -10px rgba(90, 120, 255, 0.8);
}
.btn.primary:hover { background: linear-gradient(180deg, rgba(140, 196, 255, 0.95), rgba(124, 132, 255, 0.85)); }
.btn.danger { color: #ffd6dc; border-color: rgba(255, 138, 154, 0.4); }
.btn.danger:hover { background: rgba(255, 90, 120, 0.25); }
.btn.ghost { background: rgba(255, 255, 255, 0.06); }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.icon { width: 38px; padding: 0; }
.btn.wide { width: 100%; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pill {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke);
}

/* ---------- Login ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(400px, 100%); text-align: center; padding: 36px 30px 30px; }
.login h1 { margin: 10px 0 4px; font-size: 30px; letter-spacing: -0.02em; }
.login p { margin: 0 0 22px; }
.logo-big {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.logo-big svg { width: 44px; fill: #cfe3ff; }
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.field input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 16px;
  font: 16px var(--font); color: var(--text);
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--stroke);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: rgba(124, 184, 255, 0.8); box-shadow: 0 0 0 4px rgba(124, 184, 255, 0.18), inset 0 2px 6px rgba(0, 0, 0, 0.25); }
.error { color: var(--danger); font-size: 14px; margin: -4px 0 14px !important; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 14px; z-index: 5;
  width: min(980px, calc(100% - 32px)); margin: 14px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 20px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand svg { width: 28px; fill: #cfe3ff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.content { width: min(980px, calc(100% - 32px)); margin: 22px auto 40px; display: grid; gap: 22px; }
.footer { text-align: center; font-size: 13px; margin: 0; }

/* ---------- Upload ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 20px; border-radius: 22px; cursor: pointer; text-align: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.035);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.dropzone:hover, .dropzone.over { background: rgba(124, 184, 255, 0.12); border-color: rgba(124, 184, 255, 0.75); }
.dropzone.over { transform: scale(1.01); }
.dropzone strong { font-size: 17px; }
.dropzone .btn { margin-top: 6px; pointer-events: none; }
.drop-icon {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(124, 184, 255, 0.4), rgba(177, 140, 255, 0.3));
  border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.drop-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.queue, .files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.queue:not(:empty) { margin-top: 16px; }

.item {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 14px 14px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}
.item:hover { background: rgba(255, 255, 255, 0.085); }
.ficon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font: 700 10px/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(135deg, rgba(124, 184, 255, 0.35), rgba(177, 140, 255, 0.25));
  border: 1px solid var(--stroke);
}
.meta { min-width: 0; }
.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 13px; color: var(--muted); }
.sub .ok { color: var(--ok); }
.sub .warn { color: var(--warn); }
.sub .bad { color: var(--danger); }
.actions { display: flex; gap: 8px; }

.bar {
  height: 8px; margin-top: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.bar > i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(124, 184, 255, 0.7);
  transition: width 0.3s ease;
}
.bar.hashing > i { background: linear-gradient(90deg, #8be9fd, #6ee7b7); }
.bar.done > i { background: linear-gradient(90deg, #34d399, #6ee7b7); }

.empty { text-align: center; padding: 26px 10px 10px; color: var(--muted); }

/* ---------- Dialog & Toast ---------- */
.dialog {
  width: min(640px, calc(100% - 32px)); color: var(--text); padding: 28px;
  background: linear-gradient(135deg, rgba(40, 46, 80, 0.75), rgba(20, 22, 40, 0.7));
}
.dialog::backdrop { background: rgba(5, 6, 14, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog form { margin-top: 22px; }
.code {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1);
}
.code code { flex: 1; font: 13px/1.45 var(--mono); word-break: break-all; color: #dbe7ff; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  padding: 12px 20px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px);
  background: linear-gradient(135deg, rgba(60, 70, 120, 0.8), rgba(30, 34, 60, 0.8));
}

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .card { padding: 20px 16px; border-radius: 22px; }
  .card-head { flex-direction: column; }
  .topbar { padding-left: 16px; }
  .item { grid-template-columns: 40px 1fr; }
  .item .actions { grid-column: 1 / -1; justify-content: flex-end; }
  .ficon { width: 40px; height: 40px; }
  #disk { display: none; }
}
