:root {
  --bg: #0b0d14;
  --bg-soft: #10131d;
  --card: #141824;
  --card-2: #1a1f2e;
  --border: #262c3e;
  --border-strong: #333b52;
  --text: #e9ecf5;
  --muted: #8d95ab;
  --accent: #6d7cff;
  --accent-2: #a855f7;
  --accent-grad: linear-gradient(135deg, #6d7cff 0%, #a855f7 100%);
  --danger: #ff6b7a;
  --ok: #3ddc97;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(109, 124, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(168, 85, 247, 0.13), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 20px 60px;
}

.hero { text-align: center; margin: 18px 0 30px; }

.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, #b9c0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.center-card { text-align: center; padding: 46px 26px; }
.center-card h2 { margin: 14px 0 8px; font-size: 22px; }
.center-card .muted { margin-bottom: 22px; }
.center-card form { max-width: 360px; margin: 0 auto; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- dropzone ---------- */

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  padding: 38px 22px;
  text-align: center;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
  outline: none;
}

.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(109, 124, 255, 0.07);
}

.dropzone.dragover { transform: scale(1.008); }

.dz-icon {
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(109, 124, 255, 0.12);
  margin-bottom: 14px;
}

.dz-title { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.dz-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.dz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: var(--card-2);
  transition: transform 0.12s, filter 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 22px rgba(109, 124, 255, 0.28);
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }

.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

/* ---------- selected files ---------- */

.file-panel { margin-top: 18px; }

.file-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border);
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  max-height: 260px;
  overflow: auto;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.file-list li:last-child { border-bottom: none; }

.file-icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(109, 124, 255, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.file-info { min-width: 0; flex: 1; }

.file-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size { font-size: 12px; color: var(--muted); }

.remove-btn {
  flex: none;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
}

.remove-btn:hover { color: var(--danger); background: rgba(255, 107, 122, 0.1); }

/* ---------- options / fields ---------- */

.options { margin-top: 20px; }

.field { display: block; }

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
}

.field-label em { color: var(--muted); font-style: normal; font-weight: 500; }

.field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  padding: 12px 42px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap-lg input { padding: 14px 44px; font-size: 15px; }

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.18);
}

.input-wrap input::placeholder { color: #6b7285; }

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.eye-btn {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}

.eye-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.form-error { color: var(--danger); font-size: 13.5px; margin: 12px 0 0; }
.upload-error { color: var(--danger); font-size: 13.5px; margin: 12px 0 0; text-align: center; }

/* ---------- upload / progress ---------- */

.upload-actions { margin-top: 20px; }

.progress {
  height: 8px;
  background: var(--card-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  border-radius: 99px;
  transition: width 0.15s ease;
}

/* ---------- result ---------- */

.result-card { text-align: center; padding: 34px 26px; }

.result-badge {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 220, 151, 0.13);
  color: var(--ok);
}

.result-card h2 { margin: 0 0 6px; font-size: 23px; }
.result-meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.link-box {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 12px;
}

.link-box input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}

.result-card .hint { margin-bottom: 20px; }

/* ---------- download page ---------- */

.files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.files-head h2 { margin: 0 0 5px; font-size: 20px; word-break: break-word; }
.files-head .muted { margin: 0; font-size: 13.5px; }

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.dl-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dl-list .file-info .file-name { white-space: normal; word-break: break-all; }

.dl-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(109, 124, 255, 0.13);
  color: var(--accent);
  transition: background 0.15s, transform 0.12s;
}

.dl-btn:hover { background: var(--accent-grad); color: #fff; transform: translateY(-1px); }

.files-head .btn-primary { box-shadow: 0 8px 22px rgba(109, 124, 255, 0.25); }
#files-hint { margin-top: 14px; }

/* ---------- misc ---------- */

.lock-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(109, 124, 255, 0.12);
  color: var(--accent);
}

.lock-icon.warn { background: rgba(255, 107, 122, 0.12); color: var(--danger); }

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.site-footer p { margin: 0; }

@media (max-width: 620px) {
  .link-box { flex-direction: column; }
  .files-head { flex-direction: column; }
  .files-head .btn { width: 100%; }
  .card { padding: 18px; }
  .dz-title { font-size: 15.5px; }
}
