:root {
  --bg: #07070d;
  --bg2: #0d0d18;
  --card: rgba(20, 20, 36, 0.72);
  --line: rgba(140, 120, 255, 0.18);
  --text: #ecebff;
  --muted: #9a98b8;
  --neon: #8b5cff;
  --neon2: #00e5ff;
  --hot: #ff3dbb;
  --ok: #2bff9a;
  --bad: #ff4d6d;
  --radius: 18px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(139, 92, 255, 0.22), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(0, 229, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(255, 61, 187, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(139, 92, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}
a { color: var(--neon2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 18px 60px; }

header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: 0.3px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, var(--neon), var(--hot));
  box-shadow: 0 0 22px rgba(139, 92, 255, 0.6);
}
.logo b { background: linear-gradient(90deg, var(--neon2), var(--neon), var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; }

.hero { text-align: center; margin: 8px 0 26px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -0.5px; }
.hero h1 span { background: linear-gradient(90deg, var(--neon2), var(--neon) 50%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.pill { font-size: 12.5px; padding: 5px 11px; border-radius: 99px; background: rgba(139, 92, 255, 0.1); border: 1px solid var(--line); color: #cfc8ff; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.tabs { display: flex; gap: 6px; padding: 5px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 10px;
  font: inherit; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.tabs button.on { background: linear-gradient(135deg, rgba(139, 92, 255, 0.35), rgba(0, 229, 255, 0.18)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(139, 92, 255, 0.5); }
.panel { display: none; }
.panel.on { display: block; animation: rise 0.35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.drop {
  display: block; position: relative; border: 2px dashed rgba(139, 92, 255, 0.45); border-radius: var(--radius);
  padding: 42px 18px; text-align: center; cursor: pointer; transition: 0.25s;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 255, 0.12), transparent 70%);
}
.drop:hover, .drop.over { border-color: var(--neon2); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.08), 0 0 40px rgba(0, 229, 255, 0.15) inset; }
.drop.over { transform: scale(1.01); }
.drop .big { font-size: 46px; filter: drop-shadow(0 0 16px rgba(139, 92, 255, 0.7)); }
.drop .t { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.drop input { display: none; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-top: 14px; }
.chosen .ic { font-size: 28px; }
.chosen .nm { font-weight: 600; word-break: break-all; }
.chosen .x { margin-left: auto; }

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
label.f { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
select, input[type=text], input[type=password], input[type=url] {
  width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit; outline: none; transition: 0.2s;
}
select:focus, input:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(139, 92, 255, 0.2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer;
  color: white; background: linear-gradient(135deg, var(--neon), #5b3cff 50%, var(--hot));
  background-size: 200% 100%; transition: 0.3s; box-shadow: 0 8px 30px rgba(139, 92, 255, 0.35);
}
.btn:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 10px 36px rgba(255, 61, 187, 0.35); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.wide { width: 100%; margin-top: 16px; padding: 14px; font-size: 16px; }
.btn.ghost { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn.ghost:hover { background: rgba(139, 92, 255, 0.15); }
.btn.danger { background: rgba(255, 77, 109, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.4); color: #ffb3c1; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.progress { margin-top: 18px; }
.bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; border: 1px solid var(--line); }
.bar > i {
  display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.25s;
  background: linear-gradient(90deg, var(--neon2), var(--neon), var(--hot));
  background-size: 200% 100%; animation: flow 2s linear infinite;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}
@keyframes flow { to { background-position: -200% 0; } }
.stats { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats b { color: var(--text); }

.linkbox { display: flex; gap: 8px; margin: 10px 0; }
.linkbox .btn { white-space: nowrap; flex-shrink: 0; }
.linkbox input { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--neon2); }
.success { text-align: center; }
.success .big { font-size: 52px; filter: drop-shadow(0 0 18px rgba(43, 255, 154, 0.6)); }
.note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.15); margin-top: 12px; text-align: left; }
.note.warn { background: rgba(255, 196, 0, 0.06); border-color: rgba(255, 196, 0, 0.25); color: #ffe39a; }
.note.bad { background: rgba(255, 77, 109, 0.08); border-color: rgba(255, 77, 109, 0.3); color: #ffb3c1; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.item .ic { font-size: 24px; }
.item .meta { min-width: 0; flex: 1; }
.item .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

.file-head { display: flex; align-items: center; gap: 16px; }
.file-head .ic { font-size: 54px; filter: drop-shadow(0 0 18px rgba(139, 92, 255, 0.6)); }
.file-head h2 { margin: 0; word-break: break-all; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.chip.hot { border-color: rgba(255, 61, 187, 0.5); color: #ffb8e6; }

.preview { margin-top: 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.preview img, .preview video { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.preview audio { width: 100%; display: block; }
.preview iframe { width: 100%; height: 70vh; border: 0; background: white; }
.preview pre { margin: 0; padding: 14px; max-height: 60vh; overflow: auto; font: 13px/1.5 var(--mono); color: #d8d6ff; background: #0a0a14; white-space: pre-wrap; word-break: break-word; }

details.zip { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
details.zip summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.ziplist { max-height: 320px; overflow: auto; border-top: 1px solid var(--line); font: 13px/1.45 var(--mono); }
.ziplist div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.ziplist div span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ziplist .dir { color: var(--neon2); }

footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; }
footer a { color: var(--muted); text-decoration: underline; }

#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { padding: 10px 16px; border-radius: 12px; background: #15152a; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: rise 0.25s; transition: 0.4s; }
.toast.ok { border-color: rgba(43, 255, 154, 0.5); }
.toast.bad { border-color: rgba(255, 77, 109, 0.6); }
.toast.out { opacity: 0; transform: translateY(8px); }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: #11111f; color: var(--text); padding: 22px; width: min(420px, 92vw); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.radio { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.radio label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.radio label:hover { background: rgba(139, 92, 255, 0.08); }

.spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(139, 92, 255, 0.2); border-top-color: var(--neon2); animation: sp 0.8s linear infinite; margin: 18px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.prose h2 { margin-top: 22px; }
.prose li { margin: 4px 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

@media (max-width: 520px) {
  .card { padding: 16px; }
  .linkbox { flex-direction: column; }
}
