:root {
  --bg: #0b0f19;
  --bg-soft: #121826;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8ecf4;
  --text-dim: #98a3b8;
  --accent: #f6821f;
  --accent-soft: rgba(246, 130, 31, 0.14);
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

.glow {
  position: fixed;
  inset: -30% -10% auto -10%;
  height: 520px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(246, 130, 31, 0.16),
    rgba(90, 120, 255, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(246, 130, 31, 0.35));
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.2px;
}

.tagline {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.stats {
  text-align: right;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* ---------- 容器 ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 上传区 ---------- */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: rgba(246, 130, 31, 0.6);
  background: var(--accent-soft);
}

.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
}

.dropzone.dragging .drop-inner {
  opacity: 0;
}

.drop-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.drop-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.drop-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.drop-active {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.dropzone.dragging .drop-active {
  display: flex;
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1206;
  font-weight: 600;
}

.btn-primary:hover {
  background: #ff9440;
  border-color: #ff9440;
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.35);
  background: transparent;
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.6);
}

/* ---------- 进度条 ---------- */
.progress {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f6821f, #ffc46b);
  transition: width 0.15s ease;
}

/* ---------- 面板 ---------- */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.search {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}

.search input {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px 9px 34px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease;
}

.search input:focus {
  border-color: rgba(246, 130, 31, 0.55);
}

.search input::-webkit-search-cancel-button {
  filter: invert(0.7);
}

/* ---------- 列表 ---------- */
.list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  transition: background 0.14s ease;
}

.row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.row-icon {
  font-size: 20px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-name {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.row-meta {
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.dot {
  opacity: 0.5;
}

.row-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.row:hover .row-actions,
.row:focus-within .row-actions {
  opacity: 1;
}

@media (hover: none) {
  .row-actions {
    opacity: 1;
  }
}

/* ---------- 空状态 ---------- */
.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
  opacity: 0.75;
}

.empty p {
  margin: 2px 0;
}

.empty-hint {
  font-size: 13px;
  opacity: 0.75;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(12px);
  background: #1b2333;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
  max-width: calc(100vw - 40px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffd4d4;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 26px auto 0;
  padding: 0 24px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 620px) {
  .row-actions {
    opacity: 1;
  }

  .row {
    flex-wrap: wrap;
  }

  .row-main {
    flex-basis: calc(100% - 48px);
  }

  .row-actions {
    margin-left: 48px;
  }
}
