:root {
  --bg: #0f1220;
  --card: #191d33;
  --card-hover: #202642;
  --line: #2c3357;
  --text: #eef1ff;
  --muted: #9aa3c7;
  --accent: #6c8cff;
  --accent2: #46d6b0;
  --danger: #ff6b81;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, #2b3a7a55, transparent 60%),
    radial-gradient(700px 500px at 100% 0%, #1d6b5f44, transparent 60%),
    var(--bg);
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

header { margin-bottom: 36px; }

h1 {
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: .5px;
}

h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.card {
  background: linear-gradient(160deg, var(--card), #151930);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.card + .card { margin-top: 28px; }

.card h2 {
  margin: 0 0 18px;
  font-size: 19px;
}

.drop {
  display: block;
  border: 2px dashed #3d477a;
  border-radius: var(--radius);
  padding: 42px 20px;
  text-align: center;
  transition: .2s;
  cursor: pointer;
  background: #12162988;
}

.drop:hover {
  border-color: #5b68a8;
  background: #1b214488;
}

.drop.dragover {
  border-color: var(--accent2);
  border-style: solid;
  background: rgba(70, 214, 176, .14);
  box-shadow: inset 0 0 40px rgba(70, 214, 176, .12);
  transform: scale(1.01);
}

.drop.selected {
  border-color: var(--accent2);
  border-style: solid;
  background: rgba(70, 214, 176, .09);
  box-shadow: inset 0 0 40px rgba(70, 214, 176, .06);
}

.drop.selected strong { color: var(--accent2); }
.drop.selected .drop-icon { filter: drop-shadow(0 0 12px rgba(70, 214, 176, .5)); }

.drop-icon { font-size: 42px; margin-bottom: 10px; transition: .2s; }
.drop strong { display: block; font-size: 17px; margin-bottom: 6px; word-break: break-all; }
.drop small { color: var(--muted); word-break: break-all; }
[hidden] { display: none !important; }

.progress {
  margin-top: 18px;
  height: 28px;
  background: #0d1024;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .15s linear;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

#zip { display: none; }

.row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

input[type=text] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1327;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

input[type=text]:focus { border-color: var(--accent); }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent), #5574e8);
  color: #fff;
}

button:hover, .btn:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: not-allowed; }

.btn-small {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-ghost {
  background: #262d50;
  color: var(--text);
}

.btn-danger { background: #5a2434; color: #ffd7de; }

.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.alert-ok { background: #16463b; border: 1px solid #2b7a67; }
.alert-err { background: #4a1f2c; border: 1px solid #8a3549; }

.alert a { color: #9fe8d4; word-break: break-all; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 16, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.modal-box h3 { margin: 0 0 10px; font-size: 19px; }
.modal-box p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; word-break: break-all; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.modal-box input[type=password],
.modal-box input[type=text] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1327;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.modal-box input[type=password]:focus,
.modal-box input[type=text]:focus { border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.tip {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

code {
  background: #0d1024;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  word-break: break-all;
}

.list { display: grid; gap: 12px; }

.item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #131732;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: .15s;
}

.item:hover { background: var(--card-hover); border-color: #46507f; }

.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 15px; font-weight: 600; margin-bottom: 5px; word-break: break-all; }
.item-meta { font-size: 12px; color: var(--muted); }
.item-link { font-size: 12px; color: var(--accent2); word-break: break-all; margin-top: 6px; }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }

.empty {
  text-align: center;
  padding: 36px 10px;
  color: var(--muted);
  font-size: 14px;
}

form.inline { margin: 0; }

@media (max-width: 640px) {
  .wrap { padding: 32px 16px 60px; }
  .card { padding: 20px; }
  .item { flex-direction: column; align-items: stretch; }
  .item-actions { justify-content: flex-end; }
}
