/* ============================================================
   BRAT Cover — 组件样式（零外部依赖，前缀隔离 bc-）
   BRAT-inspired typographic cover generator
   ============================================================ */
:root {
  --bc-bg: transparent;        /* 去深色画布：融入页面白 */
  --bc-bg-2: #f2f2f4;
  --bc-line: #e2e2e6;
  --bc-line-2: #d8d8dc;
  --bc-text: #1b1b1d;
  --bc-muted: #6c6c72;
  --bc-faint: #9a9aa2;
  --bc-acid: #8ACE00;
  --bc-font: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.bc-body {
  background: var(--bc-bg);
  display: flex;
  flex-direction: column;
}

/* ---- 顶栏：编辑工具条（可选返回 / 导出） ---- */
.bc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--bc-line);
  background: var(--bc-bg);
}
.bc-back {
  color: var(--bc-muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
}
.bc-back:hover { color: var(--bc-text); background: var(--bc-bg-2); }

/* 版本切换：预览下方、输入上方，三个封面原图按钮居中 */
.bc-versions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bc-vbtn {
  display: block;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid var(--bc-line-2);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  touch-action: manipulation;
}
.bc-vbtn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bc-vbtn:hover { border-color: #5a5a64; transform: translateY(-1px); }
.bc-vbtn.on {
  border-color: var(--bc-text);
  box-shadow: 0 0 0 1.5px var(--bc-text);
}

.bc-body .bc-export {
  width: min(56vh, 62vw, 560px) !important;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1;
  color: #0e0e10 !important;
  background: var(--bc-acid) !important;
  border: 1px solid var(--bc-acid) !important;
  border-radius: 7px !important;
  padding: 11px 13px !important;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.bc-body .bc-export:hover { background: #7ab800 !important; }
.bc-body .bc-export:active { transform: scale(0.98); }

/* ---- 主体：全部居中 ---- */
.bc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 14px;
  gap: 14px;
}
.bc-preview {
  width: min(56vh, 62vw, 560px, calc(100vh - var(--hd-h, 60px) - 235px));
  flex-shrink: 0;
}
.bc-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  /* 2026-08-28：移除预览描边（--bc-line 浅色在深/浅底上都显成"白框"），只保留显示圆角。
     导出 = canvas 位图内容，不受 CSS 圆角影响（导出直角）。 */
  border: none;
  border-radius: 10px;
}

/* 输入区：紧邻预览，居中同宽 */
.bc-dock {
  width: min(56vh, 62vw, 560px);
}
.bc-input {
  width: 100%;
  font-family: var(--bc-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--bc-text);
  background: var(--bc-bg-2);
  border: 1px solid var(--bc-line);
  border-radius: 7px;
  padding: 9px 12px;
  resize: none;
  min-height: 44px;
  overflow-y: hidden;
  transition: border-color 120ms ease, background 120ms ease;
}
.bc-input::-webkit-scrollbar { display: none; }
.bc-input:focus {
  outline: none;
  border-color: var(--bc-line-2);
  background: var(--bc-bg-2);
}
.bc-input::placeholder { color: var(--bc-faint); }

/* ---- 注记行（居中一条） ---- */
.bc-meta {
  width: min(56vh, 62vw, 560px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  font-size: 11px;
  color: var(--bc-faint);
  padding-bottom: 10px;
  text-align: center;
}
.bc-meta span { white-space: normal; }

@media (max-width: 720px) {
  .bc-top { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .bc-main { padding: 12px 12px 10px; gap: 10px; }
  .bc-vbtn { width: 54px; height: 54px; }
  .bc-preview, .bc-dock, .bc-meta, .bc-body .bc-export { width: min(92vw, 420px) !important; }
}
@media (max-height: 640px) {
  .bc-preview, .bc-dock, .bc-meta, .bc-body .bc-export { width: min(50vh, 62vw, 480px) !important; }
}
