:root {
  --bg: #0c0e13;
  --bg-soft: #12151d;
  --card: #161a24;
  --card-2: #1c2130;
  --line: #262c3b;
  --text: #e8ebf2;
  --muted: #8d95a8;
  --accent: #7aa2ff;
  --accent-2: #63e6be;
  --danger: #ff7b8a;
  --warn: #ffc46b;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: -20% -10% auto;
  height: 60vh;
  background:
    radial-gradient(50% 60% at 20% 20%, rgba(122, 162, 255, .16), transparent 70%),
    radial-gradient(45% 55% at 80% 0%, rgba(99, 230, 190, .10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 0 16px 28px;
}

h1, h2 { line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(26px, 4vw, 38px); margin: 18px 0 10px; }
h2 { font-size: 18px; margin: 0; }
p { margin: 0 0 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.stack { display: grid; gap: 14px; }

.brand {
  font-weight: 800;
  letter-spacing: .16em;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
}
.brand span { color: var(--muted); font-weight: 600; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 55%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.card.auth {
  width: min(460px, 100%);
  margin: 8vh auto 0;
}

.card.hero {
  margin-top: 6vh;
  padding: 40px;
}

.code {
  font-size: 78px;
  font-weight: 800;
  letter-spacing: -.05em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.field { display: grid; gap: 7px; }
.field span { font-size: 12.5px; color: var(--muted); }
input[type="text"], input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 11px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .14);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, border-color .15s, background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:hover { border-color: #3a4358; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #8db0ff, #6f97f5);
  border-color: #7aa2ff;
  color: #0b1020;
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 123, 138, .35); }
.btn:disabled { opacity: .5; cursor: default; }

.alert {
  border: 1px solid rgba(255, 123, 138, .35);
  background: rgba(255, 123, 138, .09);
  color: #ffc2c9;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.dropzone {
  border: 1.5px dashed #36405a;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  margin-bottom: 18px;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(122, 162, 255, .06);
  outline: none;
}
.dropzone.drag { transform: scale(1.005); }
.drop-icon {
  width: 42px; height: 42px;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(122, 162, 255, .12);
  color: var(--accent);
  font-size: 23px;
  font-weight: 700;
}
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 12px;
}

.file-list { display: grid; gap: 10px; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 13px;
}
.file-main { min-width: 0; }
.file-name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-actions { display: flex; gap: 8px; flex-shrink: 0; }
.file-actions .btn { padding: 7px 11px; font-size: 13px; }
.empty {
  border: 1px dashed var(--line);
  border-radius: 13px;
  padding: 22px;
  text-align: center;
}

.progress-list { display: grid; gap: 8px; margin-top: 14px; }
.progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-soft);
  font-size: 13px;
}
.progress-row .bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 999px;
  background: #252b39;
  overflow: hidden;
}
.progress-row .bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .15s;
}
.progress-row.ok { border-color: rgba(99, 230, 190, .35); }
.progress-row.err { border-color: rgba(255, 123, 138, .35); }
.progress-row .status { color: var(--muted); }
.progress-row.ok .status { color: var(--accent-2); }
.progress-row.err .status { color: var(--danger); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}
.stats > div {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px;
}
.stats strong { display: block; font-size: 20px; }
.stats span { color: var(--muted); font-size: 12px; }

@media (max-width: 640px) {
  .page { padding-top: 28px; }
  .card { padding: 20px; }
  .card.hero { padding: 26px 20px; }
  .topbar { align-items: flex-start; }
  .file-row { align-items: flex-start; flex-direction: column; }
  .file-actions { width: 100%; }
  .stats { grid-template-columns: 1fr; }
}
