:root {
  --bg: #f3f3f3;
  --card: #ffffff;
  --text: #1b1b1b;
  --text-2: #5a5a5a;
  --border: #e5e5e5;
  --accent: #0078d4;
  --accent-hover: #106ebe;
  --danger: #c42b1c;
  --warn-bg: #fff4ce;
  --warn-text: #8a6100;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.55;
}

.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 18px 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #4c8bf5, #0078d4);
}
h1 { font-size: 20px; margin: 0; font-weight: 600; }
.subtitle { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }

.container { max-width: 920px; margin: 0 auto; padding: 24px 16px 60px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}

.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
textarea, input[type="text"] {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
textarea:focus, input[type="text"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.15);
}

.row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }

.primary-btn, .ghost-btn {
  border: none; border-radius: 8px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.primary-btn { background: var(--accent); color: #fff; }
.primary-btn:hover { background: var(--accent-hover); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ghost-btn { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.ghost-btn:hover { background: #f5f5f5; }

.status-text { font-size: 13px; color: var(--text-2); }
.status-text.error { color: var(--danger); }

.result-area { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.result-head {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.crumb button {
  border: none; background: none; color: var(--accent); cursor: pointer;
  font-size: 13px; padding: 0;
}
.result-title { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.result-meta { font-size: 13px; color: var(--text-2); }

.notice {
  background: var(--warn-bg); color: var(--warn-text);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-top: 12px;
}

.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
.file-icon { width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-size: 14px; word-break: break-all; }
.file-name.dir { color: var(--accent); cursor: pointer; }
.file-sub { font-size: 12px; color: var(--text-2); }
.file-ops { display: flex; gap: 8px; flex: none; }
.file-ops button {
  font-size: 12px; border: 1px solid var(--border); background: #fff;
  border-radius: 6px; padding: 6px 12px; cursor: pointer; color: var(--text);
}
.file-ops button:hover { background: #f5f5f5; }
.file-ops button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }

.link-box {
  margin-top: 10px; padding: 10px 12px; background: #f7f9fc; border: 1px dashed var(--border);
  border-radius: 8px; display: flex; flex-direction: column; gap: 8px;
}
.link-url { font-size: 12px; color: var(--text-2); word-break: break-all; }
.link-ops { display: flex; gap: 8px; }
.link-ops button {
  font-size: 12px; border: 1px solid var(--border); background: #fff;
  border-radius: 6px; padding: 5px 10px; cursor: pointer;
}

.error-card {
  background: #fdf3f2; border: 1px solid #f5c6c2; color: var(--danger);
  border-radius: var(--radius); padding: 18px 20px; font-size: 14px;
}
.empty-card { color: var(--text-2); font-size: 14px; text-align: center; padding: 30px; }

.footer { max-width: 920px; margin: 0 auto; padding: 20px 16px 40px; color: #999; font-size: 12px; text-align: center; }

@media (max-width: 560px) {
  .row-two { grid-template-columns: 1fr; }
  .file-row { flex-wrap: wrap; }
}
