:root {
  --bg0: #0b1220;
  --bg1: #121c2f;
  --ink: #eef3fb;
  --muted: #9aabc4;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff8a3d;
  --accent2: #3dd6c6;
  --card: rgba(18, 28, 47, 0.78);
  --danger: #ff6b7a;
  --ok: #5ddea0;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --font-display: "Syne", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Manrope", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 214, 198, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 138, 61, 0.16), transparent 50%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #0a101b);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
  opacity: 0.5;
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  animation: rise 0.7s ease both;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--accent), #ffb070 45%, var(--accent2));
  box-shadow: 0 12px 30px rgba(255, 138, 61, 0.35);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(11, 18, 32, 0.55);
  border-radius: 8px;
  border-top-color: transparent;
  transform: rotate(45deg);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 800;
}

.brand p {
  margin: 0;
  max-width: 36em;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 22px;
  animation: rise 0.8s ease 0.08s both;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 138, 61, 0.1);
  border: 1px solid rgba(255, 138, 61, 0.28);
  color: #ffd2ad;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 18px;
}

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

.field label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus {
  border-color: rgba(61, 214, 198, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 214, 198, 0.12);
}
textarea::placeholder { color: #6f819a; }

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 0 22px;
  min-height: 52px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff6a1a);
  color: #1a0d05;
  box-shadow: 0 12px 28px rgba(255, 106, 26, 0.28);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-download {
  background: linear-gradient(135deg, var(--accent2), #2bb8aa);
  color: #041816;
  box-shadow: 0 12px 28px rgba(61, 214, 198, 0.25);
}

.result {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  animation: rise 0.45s ease both;
}
.result.show { display: block; }

.meta {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.meta .name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  word-break: break-all;
}
.meta .sub {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.meta .expire {
  color: #ffd2ad;
}

.linkbox {
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  word-break: break-all;
  font-size: 0.92rem;
  color: #c9d7ea;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 28, 42, 0.95);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 20;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.err {
  display: none;
  margin-top: 14px;
  color: var(--danger);
  background: rgba(255, 107, 122, 0.1);
  border: 1px solid rgba(255, 107, 122, 0.25);
  padding: 12px 14px;
  border-radius: 12px;
}
.err.show { display: block; }

.foot {
  margin-top: 22px;
  color: #6d7f98;
  font-size: 0.85rem;
  text-align: center;
  animation: rise 0.9s ease 0.12s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.browser {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  animation: rise 0.45s ease both;
}
.browser.show { display: block; }

.browser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.browser-path {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
  flex: 1;
}
.browser-meta {
  color: var(--muted);
  font-size: 0.85rem;
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
  width: auto;
}

.filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  max-height: 420px;
  overflow-y: auto;
}
.filelist li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}
.filelist li:last-child { border-bottom: 0; }
.filelist li:hover { background: rgba(61, 214, 198, 0.08); }
.filelist li.empty {
  cursor: default;
  color: var(--muted);
  grid-template-columns: 1fr;
  justify-items: center;
}
.filelist li.empty:hover { background: transparent; }
.filelist .ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  position: relative;
}
.filelist .dir .ico {
  background: linear-gradient(135deg, #ffb070, var(--accent));
}
.filelist .file .ico {
  background: linear-gradient(135deg, var(--accent2), #2bb8aa);
}
.filelist .n {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filelist .s {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-sm { width: auto; }
  .wrap { padding-top: 5vh; }
}
