:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #1f232c;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #1b2030 0%, var(--bg) 60%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent-2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

header.top {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
header.top .logo { font-size: 22px; }
header.top h1 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: .2px; }
header.top .spacer { flex: 1; }
header.top .linkbtn { font-size: 13px; color: var(--muted); text-decoration: none; }

main.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }

/* dropzone */
#dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 56px 24px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
#dropzone.drag { border-color: var(--accent); background: var(--panel-2); }
#dropzone .big { font-size: 46px; margin-bottom: 8px; }
#dropzone h2 { margin: 6px 0; font-size: 20px; }
#dropzone p { margin: 4px 0; color: var(--muted); }

/* card / panels */
.card, .panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.panel + .panel { margin-top: 16px; }

/* login form: narrow + breathing room before the button */
#login-form { max-width: 260px; }
#login-form .btn { margin-top: 22px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 11px 12px; font-size: 15px;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.btn.block { display: block; width: 100%; text-align: center; }

/* file list */
.filelist { margin: 10px 0; max-height: 200px; overflow: auto; }
.filelist .f { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 14px; }
.filelist .f .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* share link box */
.linkbox { display: flex; gap: 8px; margin-top: 6px; }
.linkbox input { flex: 1; font-size: 13px; }

.zip-toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0;
  padding: 12px; background: var(--panel-2); border-radius: 10px; }
.zip-toggle input { width: auto; }

.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px;
  padding: 12px; background: var(--panel-2); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text); }
.check-row input { width: auto; margin-top: 3px; flex: none; }

/* progress */
.bar { height: 14px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
/* indeterminate (compress mode: total size unknown) */
.bar.indet { overflow: hidden; }
.bar.indet > span { width: 35% !important; transition: none; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.stats { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 14px; }
.pct { font-size: 34px; font-weight: 700; text-align: center; margin: 6px 0 14px; }

.notice { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-top: 10px; }
.notice.ok { background: rgba(34,197,94,.12); color: #86efac; }
.notice.warn { background: rgba(245,158,11,.12); color: #fcd34d; }
.notice.err { background: rgba(239,68,68,.12); color: #fca5a5; }

h1 { font-size: 22px; }
.file-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 14px 0; }
.file-name { font-weight: 600; word-break: break-all; }
.desc { background: var(--panel-2); padding: 12px; border-radius: 10px; }

/* download page centering */
body.download-page { display: flex; align-items: center; justify-content: center; padding: 24px; }
body.download-page .card { max-width: 460px; width: 100%; }
body.download-page .btn { margin-top: 8px; }

/* admin table */
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
.pp { font-size: 26px; font-weight: 700; letter-spacing: .5px; color: var(--accent-2); }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }
