/* ============================================================
   AI 图片元数据标记工具 — 沿用主站设计系统
   ============================================================ */
:root {
  --brand: #ff6a2b;
  --brand-deep: #f04e0b;
  --brand-soft: #fff1ea;
  --ink: #0f1b2d;
  --ink-2: #33415c;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e6eaf2;
  --bg: #f6f7fb;
  --card: #ffffff;
  --navy: #101b33;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05), 0 2px 8px rgba(15, 27, 45, .04);
  --shadow-md: 0 4px 16px rgba(15, 27, 45, .08), 0 1px 4px rgba(15, 27, 45, .05);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
code {
  background: #f1f5f9; padding: 1px 6px; border-radius: 5px;
  font-size: 12.5px; color: var(--ink-2);
}

/* ---------- 顶栏 ---------- */
.tool-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 24px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(230, 234, 242, .8);
}
.tool-home { font-size: 14px; color: var(--ink-3); font-weight: 500; transition: color .2s; }
.tool-home:hover { color: var(--brand); }
.tool-title { font-weight: 700; font-size: 16px; }
.tool-title::before {
  content: ""; display: inline-block; vertical-align: -2px;
  width: 1px; height: 16px; background: var(--line); margin-right: 14px;
}
.tool-badge {
  margin-left: auto; font-size: 12px; color: var(--brand-deep);
  background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}

/* ---------- 广告位 ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f1f4f9, #f1f4f9 12px, #eceff5 12px, #eceff5 24px);
  border: 1px dashed var(--line); color: var(--ink-4);
}
.ad-label { font-size: 12px; letter-spacing: 4px; }
.ad-leaderboard { width: min(970px, calc(100% - 48px)); height: 90px; margin: 16px auto; border-radius: var(--radius); }
.ad-rect { width: 100%; height: 250px; border-radius: var(--radius); }
/* 已填充广告 */
.ad-slot.ad-filled { background: none; border: none; overflow: hidden; }
.ad-content {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px;
  width: 100%; height: 100%; padding: 10px 18px; color: #fff; text-align: center;
}
.ad-img { max-height: 100%; max-width: 60%; object-fit: contain; border-radius: 8px; }
.ad-rect .ad-img { max-width: 100%; }
.ad-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-text b { font-size: 15px; font-weight: 700; }
.ad-text i { font-style: normal; font-size: 12px; opacity: .85; }
.ad-flag {
  position: absolute; top: 6px; right: 8px; font-size: 10px; letter-spacing: 1px;
  background: rgba(0,0,0,.28); padding: 1px 6px; border-radius: 4px; color: #fff;
}

/* ---------- 主布局 ---------- */
.tool-main { flex: 1; width: min(1280px, 100%); margin: 0 auto; padding: 8px 24px 32px; }
.tool-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.panel-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }

/* ---------- 拖拽区 ---------- */
.drop-zone {
  background: var(--card); border: 2px dashed #cdd6e4; border-radius: var(--radius);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s; outline: none;
}
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.drop-zone.dragging { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.01); box-shadow: 0 0 0 4px rgba(255,106,43,.15); }
.drop-icon { font-size: 34px; margin-bottom: 8px; }
.drop-title { font-weight: 700; font-size: 15px; }
.drop-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 面板 ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.panel-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.meta-desc p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; }
.meta-desc .kw {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px; font-weight: 600; color: var(--brand-deep);
  background: var(--brand-soft); border: 1px solid #ffd9c4;
  padding: 6px 10px; border-radius: 8px; word-break: break-all;
}
.meta-desc .dim { color: var(--ink-3); font-size: 12.5px; }

/* ---------- 政策说明 ---------- */
.info-card {
  margin-top: 14px; background: #fffbf5; border: 1px solid #fde5cf;
  border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.info-more { color: var(--brand-deep); margin-left: 6px; font-size: 12.5px; }
.info-body { margin-top: 10px; cursor: default; }
.info-body p { margin-bottom: 8px; }
.info-body ul { padding-left: 18px; margin-bottom: 8px; }
.info-body li { margin-bottom: 4px; }

/* ---------- 文件列表 ---------- */
.list-col { min-width: 0; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.list-count { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.toolbar-actions { display: flex; gap: 10px; }

.btn { padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: all .18s var(--ease); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 4px 12px rgba(255,106,43,.3); }
.btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,106,43,.4); }
.btn-ghost { border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-ghost:not(:disabled):hover { border-color: var(--brand); color: var(--brand-deep); }

.empty-state { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 64px 20px; text-align: center; color: var(--ink-3); }
.empty-icon { font-size: 42px; margin-bottom: 10px; }
.empty-hint { font-size: 13px; color: var(--ink-4); margin-top: 4px; }

.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow-sm);
  padding: 12px 16px; transition: box-shadow .2s;
}
.file-row:hover { box-shadow: var(--shadow-md); }
.file-info { min-width: 0; flex: 1; }
.file-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-sub { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.file-tag { flex-shrink: 0; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.file-fmt {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 7px; border-radius: 6px; background: #eef2f9; color: var(--ink-3);
  min-width: 44px; text-align: center;
}
.fmt-jpg  { background: #e7f0ff; color: #2563eb; }
.fmt-png  { background: #e8f7ee; color: #16a34a; }
.fmt-gif  { background: #fdf0e6; color: #b45309; }
.fmt-webp { background: #f3e8ff; color: #7c3aed; }
.tag-ok      { background: #e8f7ee; color: var(--green); }
.tag-already { background: #fef4e2; color: #b45309; }
.tag-error   { background: #fdeaea; color: var(--red); }
.img-dl { flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--brand-deep); padding: 5px 10px; border-radius: 8px; transition: background .2s; }
.img-dl:hover { background: var(--brand-soft); }
.file-remove { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; color: var(--ink-4); font-size: 13px; display: grid; place-items: center; transition: all .2s; }
.file-remove:hover { background: #fdeaea; color: var(--red); }

/* ---------- 页脚 ---------- */
.tool-footer { text-align: center; padding: 20px 24px 28px; font-size: 12.5px; color: var(--ink-4); }
.tool-footer a { color: var(--ink-3); font-weight: 600; }
.tool-footer a:hover { color: var(--brand); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .tool-layout { grid-template-columns: 1fr; }
  .panel-col { position: static; }
  .ad-leaderboard { height: 60px; }
}
@media (max-width: 560px) {
  .tool-main { padding: 8px 14px 24px; }
  .tool-topbar { padding: 0 14px; }
  .tool-badge { display: none; }
  .ad-leaderboard { width: calc(100% - 28px); }
  .file-sub { display: none; }
}
