/* ═══════════════════════════════════════════════════════════════
 * wangpanwang 前台主题层 theme.css  (UI v1.1 · 2026-09-02)
 * 覆盖 Bootstrap 5.3 默认皮肤为品牌靛蓝，提供资源列表行等组件
 * 设计令牌与后台 admin.css 追加段同源（靛蓝 600 = #4F46E5）
 * ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand · 靛蓝（继承后台旧紫蓝基因收敛） ── */
  --wpw-indigo-50:  #EEF2FF;
  --wpw-indigo-100: #E0E7FF;
  --wpw-indigo-200: #C7D2FE;
  --wpw-indigo-300: #A5B4FC;
  --wpw-indigo-500: #6366F1;
  --wpw-indigo-600: #4F46E5;
  --wpw-indigo-700: #4338CA;
  --wpw-indigo-800: #3730A3;
  --wpw-indigo-900: #312E81;

  /* ── Semantic · 语义色（站内状态唯一映射） ── */
  --wpw-success: #059669;   /* 已转存 / 已存 / Cookie 有效 */
  --wpw-warning: #D97706;   /* 待转存 / 待审 */
  --wpw-danger:  #DC2626;   /* 失效 / 软删 */
  --wpw-info:    #2563EB;

  /* ── Neutral · 中性灰 ── */
  --wpw-gray-50:  #F9FAFB;
  --wpw-gray-100: #F3F4F6;
  --wpw-gray-200: #E5E7EB;
  --wpw-gray-300: #D1D5DB;
  --wpw-gray-600: #4B5563;
  --wpw-gray-900: #111827;

  /* ── Bootstrap 主色接管（链接/焦点/激活同源） ── */
  --bs-primary: #4F46E5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4F46E5;
  --bs-link-hover-color: #4338CA;
}

/* ─── 页面底色 ─── */
body {
  background: #F6F7FB;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--wpw-gray-900);
}

/* ─── 顶栏：深靛蓝（后台侧栏基因前台化） ─── */
.wpw-header {
  background: linear-gradient(135deg, #1E2A5E 0%, #312E81 45%, #4338CA 100%);
}
.wpw-header a { color: #fff; text-decoration: none; }

/* ─── 搜索按钮：主按钮语义（靛蓝 600，Bootstrap .btn-primary 接管） ─── */
.btn-primary {
  background: var(--wpw-indigo-600);
  border-color: var(--wpw-indigo-600);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--wpw-indigo-700);
  border-color: var(--wpw-indigo-700);
}
.text-primary { color: var(--wpw-indigo-600) !important; }
a { color: var(--wpw-indigo-600); }

/* ─── 网盘品牌徽章（后台 drive_types.color_class 原样驱动） ───
 * color_class 存 btn-quark / btn-baidu 等，模板直接叠加该类。
 * 预设兜底灰色。如需新增网盘品牌色，在此补一条即可。          */
.badge-drive {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--wpw-gray-600);
  white-space: nowrap;
}
.badge-drive.btn-quark { background: #0C59F2; }
.badge-drive.btn-baidu { background: #E63C3C; }
.badge-drive.btn-alipan { background: #FF6A00; }
.badge-drive.btn-xunlei { background: #0078D4; }

/* ─── 存储状态徽章（前台列表行内） ─── */
.st-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.st-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.st-badge.st-ok {
  background: #ECFDF5;
  color: #047857;
}
.st-badge.st-wait {
  background: #FFFBEB;
  color: #92400E;
}

/* ═══════════════════════════════════════════════════════════════
 * 纯文字资源列表行（v1.2 · 2026-09-04 微调：桌面 48→44 更紧凑）
 * 桌面行高 44px / 移动 ≥52px；标题单行省略保 SEO
 * ═══════════════════════════════════════════════════════════════ */
.wpw-res-list {
  border: 1px solid var(--wpw-gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.wpw-res-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 7px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.15s;
}
.wpw-res-row:last-child { border-bottom: none; }
.wpw-res-row:hover {
  background: var(--wpw-indigo-50);
  text-decoration: none;
}
.wpw-res-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  color: var(--wpw-gray-900);
  transition: color 0.15s;
}
.wpw-res-row:hover .wpw-res-title { color: var(--wpw-indigo-700); }
.wpw-res-meta {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--wpw-gray-600);
  font-variant-numeric: tabular-nums;
}

/* 失效行（搜索检测后 JS 标灰）：整行灰 + 删除线 + 不可点 */
.wpw-res-row.is-invalid {
  opacity: 0.55;
  pointer-events: none;
}
.wpw-res-row.is-invalid .wpw-res-title {
  text-decoration: line-through;
  color: var(--wpw-gray-600);
}

/* ─── 标签云（热搜/热门标签胶囊） ─── */
.tag-cloud a {
  display: inline-block;
  margin: 0.2rem 0.3rem;
  padding: 0.22rem 0.75rem;
  background: var(--wpw-indigo-50);
  border: 1px solid var(--wpw-indigo-100);
  border-radius: 999px;
  color: var(--wpw-indigo-700);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.tag-cloud a:hover {
  background: var(--wpw-indigo-600);
  border-color: var(--wpw-indigo-600);
  color: #fff;
}

/* ─── 类型快捷入口 pill（首页） ─── */
.type-pill-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 20px;
  border-radius: 999px;
  border: 1px solid var(--wpw-indigo-200);
  background: #fff;
  color: var(--wpw-indigo-700);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.type-pill:hover {
  background: var(--wpw-indigo-600);
  border-color: var(--wpw-indigo-600);
  color: #fff;
  text-decoration: none;
}

/* ─── 首页 hero 搜索区（v1.2 · 2026-09-04 微调：桌面 padding 36/20→32/22 更稳） ─── */
.wpw-hero {
  background: linear-gradient(180deg, #DCE3FE 0%, #C7D2FE 100%);
  border: 1px solid #A5B4FC;
  border-radius: 16px;
  padding: 32px 22px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .06);
}
.wpw-hero .form-control-lg {
  border-radius: 999px 0 0 999px;
  border: 1px solid var(--wpw-indigo-200);
  height: 50px;
}
.wpw-hero .btn-lg {
  border-radius: 0 999px 999px 0;
  height: 50px;
  padding-left: 28px;
  padding-right: 28px;
}
.form-control:focus {
  border-color: var(--wpw-indigo-500);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

/* ─── 详情页主标题（v1.2 · 2026-09-04 微调：h4 24→26px / 500→600 更抓眼） ─── */
.card-body h1.h4 {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--wpw-gray-900);
  letter-spacing: -.2px;
}

/* ─── 详情页资源声明（v1.2 · 2026-09-04 微调：12.8→13.5px / 行高 1.75 长读更柔和） ─── */
.card-body > p.small {
  font-size: 13.5px;
  line-height: 1.75;
}


/* ─── 侧栏卡片：卡片头靛蓝文字 ─── */
.card-header.bg-light.fw-semibold {
  background: var(--wpw-gray-50) !important;
  color: var(--wpw-indigo-800);
  font-weight: 600;
  border-bottom: 1px solid var(--wpw-gray-100);
}

/* ─── 面包屑链接 ─── */
.breadcrumb a { color: var(--wpw-indigo-600); text-decoration: none; }
.breadcrumb a:hover { color: var(--wpw-indigo-800); text-decoration: underline; }

/* ─── 分页激活（Bootstrap 变量接管 + 保险） ─── */
.page-link { color: var(--wpw-indigo-600); }
.page-item.active .page-link {
  background: var(--wpw-indigo-600);
  border-color: var(--wpw-indigo-600);
}

/* ─── 空状态 ─── */
.empty-block {
  border: 1px dashed var(--wpw-gray-300);
  background: var(--wpw-gray-50);
  border-radius: 12px;
  padding: 40px 16px;
  color: var(--wpw-gray-600);
  text-align: center;
}

/* ─── 登录/注册居中卡（auth） ─── */
.auth-wrap { max-width:420px; margin:2rem auto; }
.auth-card { border:0; border-radius:1rem; box-shadow:0 .35rem 1.2rem rgba(17,24,39,.08); }
.auth-card .card-header { background:#fff; border:0; padding:1.5rem 1.5rem .25rem; }
.auth-card .card-header h1 { color:var(--wpw-indigo-800); }
.auth-card .form-control { min-height:46px; }
.auth-card .btn { min-height:46px; font-size:15px; }
@media (min-width: 400px) { .auth-wrap { max-width:460px; } }

/* ─── 移动端（320px 铁律） ─── */
@media (max-width: 575px) {
  .wpw-res-row { min-height: 52px; padding: 10px 14px; gap: 10px; }
  .wpw-res-title { font-size: 14px; }
  .wpw-res-meta { font-size: 11px; }
  .badge-drive, .st-badge { font-size: 11px; }
}
