/* ==========================================================================
   dicts.v1.css — 词库下载页 / 上传页样式
   - 复用 style.v11.css 设计令牌与基础组件（btn / nav / footer）
   - 上传页表单骨架复用 feedback.v1.css 的 fb-* 类，本文件只放词库特有部分
   ========================================================================== */

.dt-page {
  padding: calc(var(--nav-height) + 48px) 24px 96px;
  min-height: 100vh;
}
.dt-container {
  max-width: 880px;
  margin: 0 auto;
}
.dt-upload-container {
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- 页头 ---------- */
.dt-head {
  text-align: center;
  margin-bottom: 32px;
}
.dt-head h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dt-head p {
  margin: 12px auto 20px;
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- 词库卡片列表 ---------- */
.dt-list {
  display: grid;
  gap: 18px;
}
.dt-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.dt-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dt-card-title h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.dt-badge {
  flex: none;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.dt-badge-zip {
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}
.dt-badge-tsv {
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}

.dt-card-desc {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.dt-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.dt-card-meta span {
  white-space: nowrap;
}
.dt-card-meta span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--border-strong);
}
.dt-card-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.dt-card-file {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.dt-card-file code {
  font-family: inherit;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 7px;
  margin-right: 6px;
}

/* 右列：截图 + 下载按钮（定宽：防截图 intrinsic 宽度把 auto 列撑爆挤窄信息列） */
.dt-card-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  width: 180px;
}
.dt-card-shot {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.03);
}
.dt-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 默认缩略图（无截图词库）：不响应点击放大 */
.dt-card-shot-default {
  cursor: default;
}
.dt-card-side .btn {
  text-align: center;
  white-space: nowrap;
}

.dt-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 56px 0;
  font-size: 0.95rem;
}
.dt-empty a { color: var(--accent-1); }

/* ---------- 上传页：审核说明框 ---------- */
.dt-notice {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 22px;
}
.dt-notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.9;
}

/* ---------- 词库文件选中预览（fb-thumbs 复用网格，单元为宽条） ---------- */
.dt-file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.dt-file-pill .dt-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dt-file-pill .dt-file-size {
  flex: none;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.dt-file-pill button {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.dt-file-pill button:hover { background: #dc2626; color: #fff; }
#dtFilePreview { grid-template-columns: 1fr; }

/* ---------- 页脚间距（本页自带 footer） ---------- */
.dt-footer { position: static; }

/* ---------- 截图大图层 ---------- */
.dt-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: zoom-out;
  padding: 32px;
}
.dt-lightbox.open { display: flex; }
.dt-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .nav .nav-links {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
  }
}
@media (max-width: 640px) {
  .dt-card {
    grid-template-columns: 1fr;
  }
  .dt-card-side {
    min-width: 0;
  }
  .dt-card-shot {
    aspect-ratio: 16 / 9;
  }
  .dt-head h1 { font-size: 1.6rem; }
}
