/* ============================================================
   网盘资源搜索引擎 - 前台全局样式
   视觉规范：蓝色主色 + 琥珀强调，8px 间距基准，圆角系统
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --primary-soft: #eff6ff;
  --accent: #f59e0b;
  --accent-dark: #d97706;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 2px 10px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --shadow-primary: 0 8px 24px rgba(37, 99, 235, .28);

  --grad-primary: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(37, 99, 235, .18); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

a { transition: color .18s ease; }

/* ============================================================
   顶部导航
   ============================================================ */
.site-navbar {
  background: var(--grad-primary);
  box-shadow: 0 2px 16px rgba(30, 58, 138, .28);
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.brand-icon {
  font-size: 1.55rem;
  margin-right: .45rem;
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}
.brand-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #fff, #dbeafe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.navbar-dark .nav-link {
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  font-size: .88rem;
  padding: .35rem .55rem !important;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color .18s ease, background .18s ease;
  white-space: nowrap;
}
.navbar-dark .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.navbar-dark .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}
.navbar-dark .nav-link.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #fbbf24;
}
.navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
  font-size: .8rem;
  border-radius: 16px;
  padding: .25rem .75rem;
  transition: all .18s ease;
  height: 30px;
  display: inline-flex;
  align-items: center;
}

/* 右侧功能区统一容器 */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* 图标按钮组 */
.nav-icon-group {
  display: flex;
  align-items: center;
  gap: .1rem;
}

/* 用户按钮组 */
.nav-user-group {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.navbar .btn-light {
  font-size: .8rem;
  border-radius: 16px;
  padding: .25rem .75rem;
  height: 30px;
  display: inline-flex;
  align-items: center;
}
.navbar .btn-outline-light:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

/* 公告条 */
.site-notice {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: .5rem 0;
  font-size: .9rem;
  border-bottom: 1px solid #fde68a;
}
.site-notice i { margin-right: .35rem; color: #d97706; }

/* 主区域 */
.site-main { min-height: calc(100vh - 340px); padding-bottom: 3rem; }

/* ============================================================
   首页 Hero
   ============================================================ */
.hero-section {
  background: var(--grad-primary);
  color: #fff;
  padding: 3.4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.hero-section::before { width: 380px; height: 380px; right: -120px; top: -140px; }
.hero-section::after { width: 260px; height: 260px; left: -90px; bottom: -120px; }
.hero-section .container { position: relative; z-index: 1; }

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: .5rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}
.hero-subtitle {
  opacity: .88;
  font-size: 1.02rem;
  margin-bottom: 1.8rem;
  font-weight: 400;
}
.hero-search-form { max-width: 640px; margin: 0 auto; }
.hero-search-form .input-group {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.hero-search-form .form-control {
  border: none;
  padding: .85rem 1.4rem;
  font-size: 1rem;
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
}
.hero-search-form .form-control:focus { box-shadow: none; }
.hero-search-form .form-control::placeholder { color: #94a3b8; }
.hero-search-form .btn-search {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
  border: none;
  font-weight: 700;
  padding: .85rem 1.9rem;
  font-size: 1rem;
  border-radius: 0;
  transition: all .2s ease;
}
.hero-search-form .btn-search:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
}

/* 热门搜索关键词 */
.hot-keywords { margin-top: 1.1rem; }
.hot-keywords .keyword-link {
  display: inline-block;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: .3rem .95rem;
  margin: 0 .35rem .45rem 0;
  font-size: .86rem;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: all .18s ease;
}
.hot-keywords .keyword-link:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   区块标题
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.section-header .title {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.section-header .title::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 3px;
}
.section-header a { font-size: .88rem; }

/* ============================================================
   分类卡片
   ============================================================ */
.category-card {
  text-align: center;
  padding: 1.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  height: 100%;
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, .08), rgba(59, 130, 246, .05));
  transition: height .22s ease;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, .35);
  color: var(--primary);
}
.category-card:hover::before { height: 100%; }
.category-card .cat-icon {
  width: 54px;
  height: 54px;
  margin: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all .22s ease;
  position: relative;
  z-index: 1;
}
.category-card:hover .cat-icon {
  background: var(--grad-primary);
  color: #fff;
  transform: scale(1.06);
}
.category-card .cat-text { text-align: left; position: relative; z-index: 1; }
.category-card .cat-name { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.category-card .cat-count {
  font-size: .78rem;
  color: var(--text-light);
  margin-top: .15rem;
}

/* ============================================================
   专题卡片
   ============================================================ */
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: .6rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  height: 100%;
  transition: all .22s ease;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, .3);
}
.topic-card .topic-cover {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}
.topic-card .topic-body { padding: 1.05rem 1.15rem 1.2rem; }
.topic-card .topic-title { font-weight: 700; font-size: 1.02rem; }
.topic-card:hover .topic-title { color: var(--primary); }
.topic-card .topic-subtitle {
  font-size: .84rem;
  color: var(--text-muted);
  margin-top: .3rem;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   资源列表项
   ============================================================ */
.resource-item {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: .85rem;
  display: flex;
  gap: .9rem;
  align-items: center;
  transition: all .2s ease;
}
.resource-item:hover {
  border-color: rgba(37, 99, 235, .3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.resource-item .res-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--primary);
  transition: all .2s ease;
}
.resource-item:hover .res-icon {
  background: var(--grad-primary);
  color: #fff;
}
.resource-item .res-body { flex: 1; min-width: 0; }
.resource-item .res-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s ease;
}
.resource-item .res-title:hover { color: var(--primary); }
.resource-item .res-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .4rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}
.resource-item .res-meta .badge {
  font-weight: 400;
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid var(--border);
  padding: .3em .6em;
  border-radius: 6px;
}
.resource-item .res-meta .meta-time,
.resource-item .res-meta .meta-views {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.resource-item .res-meta i { font-size: .8rem; }

/* ============================================================
   网盘类型徽标
   ============================================================ */
.badge-netdisk {
  font-size: .75rem;
  padding: .3em .65em;
  border-radius: 999px;
  font-weight: 500;
}
.badge-baidu { background: #e0f2fe; color: #0284c7; }
.badge-quark { background: #dcfce7; color: #16a34a; }
.badge-aliyun { background: #fef3c7; color: #d97706; }
.badge-uc { background: #f3e8ff; color: #9333ea; }
.badge-xunlei { background: #fee2e2; color: #dc2626; }
.badge-115 { background: #ede9fe; color: #7c3aed; }
.badge-other { background: #f1f5f9; color: #64748b; }

/* 列表 res-meta 内网盘徽章：覆盖通用灰色徽章样式，保留网盘彩色 */
.resource-item .res-meta .badge-netdisk {
  font-weight: 500;
  border: none;
}
.resource-item .res-meta .badge-baidu  { background: #e0f2fe !important; color: #0284c7 !important; }
.resource-item .res-meta .badge-quark  { background: #dcfce7 !important; color: #16a34a !important; }
.resource-item .res-meta .badge-aliyun { background: #fef3c7 !important; color: #d97706 !important; }
.resource-item .res-meta .badge-uc     { background: #f3e8ff !important; color: #9333ea !important; }
.resource-item .res-meta .badge-xunlei { background: #fee2e2 !important; color: #dc2626 !important; }
.resource-item .res-meta .badge-115    { background: #ede9fe !important; color: #7c3aed !important; }
.resource-item .res-meta .badge-other  { background: #f1f5f9 !important; color: #64748b !important; }

/* ============================================================
   详情页
   ============================================================ */
.detail-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.7rem 1.8rem;
}
.detail-title { font-size: 1.45rem; font-weight: 800; line-height: 1.45; }
.detail-meta { font-size: .86rem; color: var(--text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; }
.detail-meta i { margin-right: .25rem; }

/* 网盘下载按钮 */
.dl-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.dl-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.dl-btn:hover::after { left: 130%; }
.dl-btn:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
  filter: brightness(1.06);
}
.dl-btn:active { transform: translateY(-1px) scale(.98); box-shadow: 0 4px 14px rgba(37, 99, 235, .3); }
.dl-btn .dl-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform .25s ease, background .25s ease;
}
.dl-btn:hover .dl-icon {
  background: rgba(255, 255, 255, .28);
  transform: scale(1.08) rotate(-6deg);
}
.dl-btn .dl-text {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.dl-btn .dl-name { font-size: 1.1rem; font-weight: 700; letter-spacing: 1px; }
.dl-btn .dl-sub { font-size: .8rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 获取中状态 */
.dl-btn.is-loading { pointer-events: none; opacity: .92; }
.dl-btn.is-loading .dl-icon i { animation: dl-spin .9s linear infinite; }
@keyframes dl-spin { to { transform: rotate(360deg); } }

.netdisk-link-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.2rem;
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  flex-wrap: wrap;
  background: #fbfcfe;
  transition: all .2s ease;
}
.netdisk-link-card:hover {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: var(--shadow-md);
  background: #fff;
}
.netdisk-link-card .nd-info { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1; }
.netdisk-link-card .nd-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.netdisk-link-card .nd-name { font-weight: 600; font-size: .98rem; }
.netdisk-link-card .nd-url {
  font-size: .78rem;
  color: var(--text-muted);
  word-break: break-all;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.netdisk-link-card .nd-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.netdisk-link-card .btn { border-radius: 8px; }

/* 详情内容文字 */
.content-text { line-height: 1.95; color: #475569; white-space: pre-wrap; }

/* 中转页 */
.go-wrapper {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.6rem 2rem;
}
.go-wrapper .go-icon { font-size: 3.5rem; color: var(--primary); margin-bottom: 1rem; }
.go-countdown {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.go-timer-text { font-size: .9rem; color: var(--text-muted); margin-top: .5rem; }

/* ============================================================
   热榜
   ============================================================ */
.rank-list { display: flex; flex-direction: column; gap: .55rem; }
.rank-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.rank-item:hover {
  border-color: rgba(37, 99, 235, .3);
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}
.rank-item .rank-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; box-shadow: 0 3px 8px rgba(245, 158, 11, .35); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #334155; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #fca5a5, #f87171); color: #7f1d1d; }
.rank-item .rank-title {
  flex: 1;
  font-size: .95rem;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank-item .rank-title:hover { color: var(--primary); }
.rank-item .rank-stat { font-size: .78rem; color: var(--text-light); flex-shrink: 0; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.2rem;
  margin-top: 3rem;
}
.site-footer h5 { color: #f1f5f9; font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; }
.site-footer h6 { color: #e2e8f0; font-size: .95rem; margin-bottom: .8rem; }
.site-footer .footer-desc { font-size: .85rem; color: #64748b; line-height: 1.8; }
.site-footer a { color: #94a3b8; text-decoration: none; transition: color .18s ease; }
.site-footer a:hover { color: #fff; padding-left: 3px; }
.site-footer ul li { margin-bottom: .4rem; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  font-size: .85rem;
}

/* ============================================================
   搜索页 / 列表页头部
   ============================================================ */
.search-page-header {
  background: var(--grad-primary);
  padding: 1.9rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.search-page-header::before {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  right: -60px;
  top: -80px;
}
.search-page-header .container { position: relative; z-index: 1; }
.search-page-header h1 { font-weight: 700; }
.search-page-header .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.4); }
.search-page-header .breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.search-page-header .breadcrumb a:hover { color: #fff; }
.search-page-header .breadcrumb .active { color: rgba(255,255,255,.6); }

.search-result-count { font-size: .9rem; opacity: .85; }

/* 筛选栏 */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: .85rem 1rem;
  margin-bottom: 1.2rem;
}
.filter-bar .filter-label {
  font-size: .82rem;
  color: var(--text-muted);
  margin-right: .4rem;
  font-weight: 600;
}
.filter-bar .filter-link {
  display: inline-block;
  font-size: .85rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  color: #475569;
  text-decoration: none;
  margin: .15rem .18rem;
  transition: all .18s ease;
}
.filter-bar .filter-link:hover { background: #f1f5f9; color: var(--primary); }
.filter-bar .filter-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .3);
}

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1.2rem;
}
.sidebar-block .sb-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .95rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sidebar-block .sb-title::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 3px;
}
.sidebar-block .side-link-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--border-light);
}
.sidebar-block .side-link-item:last-child { border-bottom: none; }
.sidebar-block .side-link-item a {
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sidebar-block .side-link-item a:hover { color: var(--primary); }
.sidebar-block .side-link-item i { color: var(--primary); flex-shrink: 0; }

/* ============================================================
   登录 / 注册
   ============================================================ */
.auth-wrapper {
  max-width: 430px;
  margin: 3.2rem auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.4rem 2.1rem;
}
.auth-wrapper .auth-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: .3rem;
}
.auth-wrapper .auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   邀请中心
   ============================================================ */
.invite-banner {
  background: linear-gradient(135deg, #7c3aed, #6366f1 55%, #8b5cf6);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 2.2rem 2rem;
  margin-bottom: 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(124, 58, 237, .3);
}
.invite-banner::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  right: -90px;
  bottom: -120px;
}
.invite-banner::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  left: 40%;
  top: -70px;
}
.invite-banner .row { position: relative; z-index: 1; }
.invite-banner .invite-code-box {
  background: rgba(255, 255, 255, .16);
  border: 2px dashed rgba(255, 255, 255, .65);
  border-radius: var(--radius-md);
  padding: .65rem 1rem;
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  word-break: break-all;
  max-width: 100%;
}
.invite-banner .btn-light {
  background: #fff;
  border: none;
  color: #6d28d9;
  font-weight: 600;
  border-radius: 8px;
}
.invite-banner .btn-light:hover { background: #ede9fe; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1rem;
  text-align: center;
  height: 100%;
  transition: all .2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* 推广步骤 */
.step-card { transition: all .2s ease; }
.step-card:hover { transform: translateY(-3px); }

/* 邀请记录表格 */
.invite-table thead th {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.invite-table td { border-color: var(--border-light); }

/* ============================================================
   分页
   ============================================================ */
.pagination-wrap { margin-top: 1.6rem; }
.pagination { gap: .3rem; }
.pagination .page-item .page-link {
  border: 1px solid var(--border);
  border-radius: var(--radius-md) !important;
  color: #475569;
  padding: .4rem .85rem;
  font-size: .88rem;
  min-width: 38px;
  text-align: center;
  transition: all .18s ease;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pagination .page-item .page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.pagination .page-item.active .page-link {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.pagination .page-item.disabled .page-link {
  background: #f8fafc;
  color: #cbd5e1;
  border-color: var(--border-light);
}

/* ============================================================
   通用卡片与按钮
   ============================================================ */
.card {
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card-title-sm { font-size: 1rem; font-weight: 600; }

.btn { border-radius: 8px; font-weight: 500; }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .32);
}
.btn-outline-primary { border-color: #93c5fd; color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ============================================================
   内容页
   ============================================================ */
.content-page {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.2rem;
}
.content-page h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.1rem; }
.content-page p { line-height: 1.9; color: #475569; margin-bottom: .9rem; }
.content-page h2, .content-page h3 { font-weight: 700; margin: 1.4rem 0 .8rem; }

/* ============================================================
   错误页 404
   ============================================================ */
.error-page { text-align: center; padding: 4.5rem 1rem; }
.error-page .error-code {
  font-size: 6.5rem;
  font-weight: 800;
  line-height: 1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 18px 40px rgba(37, 99, 235, .18);
}
.error-page .error-title { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 .35rem; }
.error-page .error-msg { font-size: .98rem; color: var(--text-muted); margin-bottom: 1.6rem; }
.error-page .error-search { max-width: 520px; margin: 0 auto 1.6rem; }
.error-page .btn { border-radius: 999px; padding: .55rem 1.6rem; }

/* 空状态 */
.empty-state { text-align: center; padding: 3.2rem 1rem; }
.empty-state i {
  font-size: 3.2rem;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px dashed var(--border);
  margin-bottom: .4rem;
}
.empty-state .empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #334155;
  margin: .75rem 0 .3rem;
}
.empty-state p { color: var(--text-muted); }
.empty-state .btn { border-radius: 999px; padding: .5rem 1.5rem; }

/* 通用面包屑 */
.breadcrumb { font-size: .88rem; }

/* ============================================================
   新增强化组件 (前台美化)
   ============================================================ */

/* 主内容区 */
.main-content { min-height: 60vh; }

/* 导航搜索框 */
.navbar-search { position: relative; width: 190px; flex-shrink: 0; }
.navbar-search .form-control {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 999px 0 0 999px;
  padding: .35rem .85rem;
  font-size: .82rem;
  height: 32px;
}
.navbar-search .form-control::placeholder { color: rgba(255,255,255,.6); font-size: .82rem; }
.navbar-search .form-control:focus {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
  box-shadow: none;
  color: #fff;
}
.navbar-search .btn-search {
  border-radius: 0 999px 999px 0;
  background: var(--grad-primary);
  color: #fff;
  padding: .35rem .7rem;
  font-size: .85rem;
  height: 32px;
  display: inline-flex;
  align-items: center;
  border: none;
}
@media (max-width: 1199.98px) {
  .navbar-search { width: 160px; }
  .navbar-dark .nav-link { padding: .35rem .45rem !important; font-size: .85rem; }
}
@media (max-width: 991.98px) {
  .navbar-search { width: 100%; margin-top: .6rem; }
  .nav-right-group { flex-wrap: wrap; gap: .5rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid rgba(255,255,255,.1); }
}

/* 深色导航下拉 */
.site-navbar .dropdown-menu {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(15,23,42,.35);
  border-radius: 12px;
  padding: .5rem;
  min-width: 180px;
}
.site-navbar .dropdown-menu .dropdown-item {
  color: #cbd5e1;
  border-radius: 8px;
  font-size: .9rem;
  padding: .5rem .9rem;
}
.site-navbar .dropdown-menu .dropdown-item:hover {
  background: rgba(59,130,246,.15);
  color: #fff;
}
.site-navbar .dropdown-menu .dropdown-divider { border-color: rgba(255,255,255,.08); }

/* Hero 统计 */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: .6rem;
  flex-wrap: wrap;
  color: rgba(255,255,255,.85);
  font-size: .92rem;
  margin-bottom: 1.3rem;
}
.hero-stats strong { color: #fff; font-size: 1.05rem; }
.hero-stats-sep { color: rgba(255,255,255,.35); }

/* 分类主题色 */
.cat-blue   { --cat: #3b82f6; --cat-bg: #eff6ff; }
.cat-violet { --cat: #8b5cf6; --cat-bg: #f5f3ff; }
.cat-purple { --cat: #a855f7; --cat-bg: #faf5ff; }
.cat-pink   { --cat: #ec4899; --cat-bg: #fdf2f8; }
.cat-red    { --cat: #ef4444; --cat-bg: #fef2f2; }
.cat-orange { --cat: #f97316; --cat-bg: #fff7ed; }
.cat-amber  { --cat: #f59e0b; --cat-bg: #fffbeb; }
.cat-green  { --cat: #22c55e; --cat-bg: #f0fdf4; }
.cat-teal   { --cat: #14b8a6; --cat-bg: #f0fdfa; }
.cat-cyan   { --cat: #06b6d4; --cat-bg: #ecfeff; }
.cat-indigo { --cat: #6366f1; --cat-bg: #eef2ff; }

/* 查看更多链接 */
.more-link {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  transition: color .2s;
}
.more-link:hover { color: var(--primary); }

/* 分类区 */
.category-section { margin-top: 1rem; }
.category-section .row { align-items: stretch; }

/* 分类卡片主题色 (覆盖默认 .cat-icon) */
.category-card .cat-icon { background: var(--cat-bg); color: var(--cat); }
.category-card:hover .cat-icon { background: var(--cat); color: #fff; }

/* 资源图标主题色 */
.resource-item .res-icon { background: var(--cat-bg); color: var(--cat); }
.resource-item:hover .res-icon { background: var(--cat); color: #fff; }

/* 分类徽标主题色 */
.cat-badge {
  font-weight: 500 !important;
  background: var(--cat-bg) !important;
  color: var(--cat) !important;
  border: 1px solid transparent !important;
  display: inline-flex;
  align-items: center;
}

/* 页面横幅 */
.page-banner {
  background-color: var(--cat, #3b82f6);
  background-image: linear-gradient(120deg, rgba(255,255,255,.14), rgba(255,255,255,0) 45%);
  color: #fff;
  padding: 2.4rem 0;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.page-banner .banner-icon {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 18px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.page-banner .banner-title { font-size: 1.65rem; font-weight: 700; margin: 0; }
.page-banner .banner-desc { font-size: .92rem; opacity: .9; margin-top: .3rem; }
.page-banner .banner-count {
  font-size: .85rem;
  font-weight: 500;
  background: rgba(255,255,255,.18);
  padding: .2rem .7rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: .5rem;
}
.page-banner .banner-breadcrumb .breadcrumb { margin-bottom: .4rem; }
.page-banner .banner-breadcrumb .breadcrumb-item,
.page-banner .banner-breadcrumb .breadcrumb-item a { color: rgba(255,255,255,.85); font-size: .85rem; }
.page-banner .banner-breadcrumb .breadcrumb-item.active { color: #fff; }
.page-banner .banner-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-banner .hero-search-form { margin-top: .4rem; max-width: 640px; }

/* 筛选tab */
.filter-item {
  display: inline-flex;
  align-items: center;
  padding: .45rem 1.05rem;
  border-radius: 999px;
  font-size: .88rem;
  color: #475569;
  background: #fff;
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all .2s;
}
.filter-item:hover { background: #f1f5f9; color: var(--primary); }
.filter-item.active { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-primary); }

/* 子分类侧栏导航 */
.sub-cat-nav { display: flex; flex-direction: column; gap: .35rem; }
.sub-cat-link {
  display: flex;
  align-items: center;
  padding: .55rem .85rem;
  border-radius: 10px;
  color: #475569;
  font-size: .9rem;
  text-decoration: none;
  transition: all .2s;
}
.sub-cat-link:hover { background: #f1f5f9; color: var(--primary); }
.sub-cat-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* 侧栏卡片 */
.sidebar-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: .95rem;
  padding: .85rem 1rem;
}

/* 页脚补充 */
.footer-title {
  color: #e2e8f0;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .9rem;
}
.footer-cat-list { display: flex; flex-wrap: wrap; gap: .45rem .9rem; font-size: .85rem; }
.footer-cat-list a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.footer-cat-list a:hover { color: #fff; }
.footer-cat-list .footer-cat-parent { flex-basis: 100%; color: #cbd5e1; font-weight: 600; }

/* 详情页相关推荐 */
.related-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem .95rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  text-decoration: none;
  background: #fff;
  transition: all .2s;
  height: 100%;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
}
.related-card .rc-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-card .rc-meta { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* HOT 徽标 */
.hot-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #fb923c);
  padding: .12rem .5rem;
  border-radius: 999px;
  vertical-align: 2px;
  margin-left: .3rem;
}

/* 搜索建议 (功能6) */
.navbar-search { position: relative; }
.suggest-wrap { position: absolute; top: 100%; left: 0; right: 0; z-index: 1080; display: none; }
.suggest-list {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  overflow: hidden;
  margin-top: .3rem;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  color: var(--text);
  text-decoration: none;
  font-size: .86rem;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: #f8fafc; }
.suggest-item .suggest-kw { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  background: #94a3b8;
  margin-right: .3rem;
}
.rank-badge.rank-1 { background: linear-gradient(135deg,#f43f5e,#fb923c); }
.rank-badge.rank-2 { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.rank-badge.rank-3 { background: linear-gradient(135deg,#10b981,#34d399); }

/* 收藏+通知 (功能4) */
.navbar-link-icon {
  color: rgba(255,255,255,.85) !important;
  font-size: 1rem;
  padding: .3rem .35rem !important;
  border-radius: 8px;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}
.navbar-link-icon:hover { color: #fff !important; background: rgba(255,255,255,.1); }

/* 导航栏 QQ 群入口按钮（与品牌金色体系统一） */
.nav-qq-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px;
  padding: .25rem .65rem;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #78350f;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 6px rgba(245,158,11,.35);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  white-space: nowrap;
  cursor: pointer;
  height: 30px;
  flex-shrink: 0;
}
.nav-qq-btn:hover,
.nav-qq-btn:focus {
  color: #78350f;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245,158,11,.5);
}
.nav-qq-btn i { font-size: .88rem; }
.notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  border: 1.5px solid var(--primary);
}
.btn-favorite.active {
  background: var(--warning, #f59e0b);
  color: #fff;
  border-color: var(--warning, #f59e0b);
}
.favorite-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(17,24,39,.92);
  color: #fff;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .82rem;
  z-index: 1090;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: favIn .25s ease;
}
@keyframes favIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.min-width-0 { min-width: 0; }

/* 批量操作 (功能3) */
.batch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .6rem .9rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
}
.resource-item-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.resource-item-wrap .batch-check-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: .2rem .35rem;
  cursor: pointer;
}
.resource-item-wrap .resource-item {
  flex: 1;
  min-width: 0;
}
.resource-item-wrap .batch-check-label .batch-check {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 平台对比 (功能2) */
.compare-box {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #fff);
}
.compare-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .7rem;
}
.compare-list { display: flex; flex-direction: column; gap: .55rem; }
.compare-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem .75rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
  transition: all .2s;
}
.compare-item.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.compare-item .compare-platform {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 84px;
  text-align: center;
}
.compare-item .compare-platform .badge { font-size: .72rem; }
.compare-item .compare-info { flex: 1; min-width: 0; }
.compare-item .compare-res-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.compare-item .compare-res-name:hover { color: var(--primary); }
.compare-item .compare-meta { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }
.compare-item .compare-reason {
  font-size: .75rem;
  color: var(--primary);
  margin-top: .2rem;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 991.98px) {
  .navbar-collapse { padding-top: .5rem; }
  .navbar .btn-outline-light { margin-top: .4rem; }
}

@media (max-width: 767.98px) {
  .hero-title { font-size: 1.55rem; }
  .hero-section { padding: 2.4rem 0 2.1rem; }
  .hero-search-form .btn-search { padding: .85rem 1.2rem; }
  .netdisk-link-card .nd-url { max-width: 100%; }
  .netdisk-link-card { flex-direction: column; align-items: flex-start; }
  .netdisk-link-card .nd-actions { width: 100%; }
  .netdisk-link-card .nd-actions .btn { flex: 1; }
  .detail-panel { padding: 1.3rem 1rem; }
  .content-page { padding: 1.4rem 1.1rem; }
  .invite-banner { padding: 1.6rem 1.2rem; }
  .resource-item { padding: .9rem .95rem; }
}

/* ============================================================
   后台管理 - 侧边栏分组折叠
   ============================================================ */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: transparent;
  padding: 0 .75rem .75rem 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.admin-sidebar .admin-sidebar-inner {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: .7rem .55rem .85rem;
}

.admin-sidebar .admin-sidebar-actions {
  padding: 0 .3rem .6rem;
  border-bottom: 1px dashed var(--border-light);
  margin-bottom: .35rem;
}
.admin-collapse-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  padding: .45rem 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s;
}
.admin-collapse-all:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary);
}

.admin-menu-group { margin-bottom: .1rem; }
.admin-menu-group-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .55rem .55rem;
  font-size: .8rem;
  font-weight: 700;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background .18s, color .18s;
}
.admin-menu-group-title:hover { background: var(--border-light); color: var(--text); }
.admin-menu-group-title i:first-child { font-size: .95rem; color: var(--text-light); }
.admin-group-arrow {
  margin-left: auto;
  font-size: .7rem;
  color: var(--text-light);
  transition: transform .25s ease;
}
.admin-menu-group.open .admin-group-arrow { transform: rotate(180deg); }

.admin-menu-items {
  flex-direction: column;
  flex-wrap: nowrap;
  max-height: 0;
  overflow: hidden;
  padding-left: .3rem;
  transition: max-height .28s ease;
}
.admin-menu-group.open .admin-menu-items { max-height: 540px; }
.admin-menu-items .nav-item { position: relative; width: 100%; max-width: 100%; flex: 0 0 100%; }
.admin-menu-items .nav-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .55rem .5rem 1.4rem;
  font-size: .85rem;
  color: var(--text);
  border-radius: 8px;
  position: relative;
  transition: background .18s, color .18s;
}
.admin-menu-items .nav-link { flex-wrap: nowrap; }
.admin-menu-items .admin-menu-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-menu-items .admin-menu-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 .4rem; font-size: .68rem; font-weight: 700; line-height: 1; color: #fff; background: #dc2626; border-radius: 9px; margin-left: .35rem; flex-shrink: 0; }
.admin-menu-items .nav-link i { font-size: .92rem; color: var(--text-light); transition: color .18s; }
.admin-menu-items .nav-link:hover { background: var(--border-light); color: var(--primary); }
.admin-menu-items .nav-link:hover i { color: var(--primary); }
.admin-menu-items .nav-link.active {
  background: linear-gradient(90deg, var(--primary-soft), rgba(37, 99, 235, .04));
  color: var(--primary);
  font-weight: 600;
}
.admin-menu-items .nav-link.active::before {
  content: '';
  position: absolute;
  left: .12rem;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), #60a5fa);
  box-shadow: 0 0 6px rgba(37, 99, 235, .35);
}
.admin-menu-items .nav-link.active i { color: var(--primary); }

@media (max-width: 767.98px) {
  .admin-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 0 0 .75rem;
  }
}

/* ============================================================
   后台管理 - 全局视觉
   ============================================================ */
.admin-body {
  background: #f1f5f9;
  min-height: 100vh;
}

/* 顶部导航栏 */
.admin-navbar {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6);
  box-shadow: 0 2px 12px rgba(30, 58, 138, .25);
  padding: .55rem 0;
}
.admin-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 1.05rem;
  color: #fff;
}
.admin-brand-text { font-weight: 700; font-size: 1.02rem; letter-spacing: .3px; }
.admin-navbar .navbar-nav .nav-link {
  padding: .42rem .85rem;
  margin-left: .3rem;
  border-radius: 9px;
  font-size: .88rem;
  opacity: .92;
  transition: all .18s;
}
.admin-navbar .navbar-nav .nav-link:hover { background: rgba(255, 255, 255, .15); opacity: 1; }
.admin-navbar .nav-link.nav-logout { color: #fca5a5; }
.admin-navbar .nav-link.nav-logout:hover { background: rgba(239, 68, 68, .22); color: #fff; }
.admin-user-info {
  color: rgba(255, 255, 255, .85);
  font-size: .85rem;
  padding: 0 .9rem;
  border-right: 1px solid rgba(255, 255, 255, .25);
  margin-right: .35rem;
  white-space: nowrap;
}

/* 内容区 */
.admin-content {
  padding-top: 1.4rem;
  padding-bottom: 3rem;
}
.admin-content h4 { font-size: 1.15rem; }
.admin-content h4 i { color: var(--primary); }

/* 后台作用域内的卡片 */
.admin-body .card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.admin-body .card-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  border-radius: 12px 12px 0 0 !important;
  padding: .8rem 1.1rem;
  font-weight: 600;
  color: #334155;
  font-size: .95rem;
}
.admin-body .card-body { padding: 1.1rem 1.15rem; }
.admin-body .card-footer {
  background: #fafcfe;
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 12px 12px !important;
}

/* 后台作用域内的表格 */
.admin-body .table {
  --bs-table-bg: transparent;
  vertical-align: middle;
}
.admin-body .table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-light);
  padding: .7rem .85rem;
}
.admin-body .table tbody td {
  padding: .68rem .85rem;
  color: #334155;
  border-color: #f1f5f9;
}
.admin-body .table-hover tbody tr { transition: background .15s; }
.admin-body .table-hover tbody tr:hover { background: #f8fafc; }
.admin-body .table-responsive { border-radius: 10px; }

/* 后台作用域内的表单与按钮 */
.admin-body .form-control,
.admin-body .form-select {
  border-radius: 8px;
  border-color: var(--border);
  padding: .45rem .8rem;
  font-size: .9rem;
}
.admin-body .form-control:focus,
.admin-body .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}
.admin-body .btn { border-radius: 8px; font-size: .88rem; }
.admin-body .btn-primary {
  background: var(--grad-primary);
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.admin-body .btn-primary:hover { filter: brightness(1.06); }
.admin-body .btn-outline-primary { border-color: #bfdbfe; color: var(--primary); }
.admin-body .btn-outline-primary:hover { background: var(--primary-soft); border-color: var(--primary); }

/* 徽章 */
.admin-body .badge { font-size: .74rem; font-weight: 600; padding: .38em .68em; border-radius: 999px; }
.admin-body .text-success { color: #16a34a !important; }
.admin-body .text-danger { color: #dc2626 !important; }
.admin-body .text-warning { color: #d97706 !important; }

/* 标签页 */
.admin-body .nav-tabs { border-bottom: 1px solid var(--border-light); gap: .15rem; }
.admin-body .nav-tabs .nav-link {
  border: none;
  color: #64748b;
  font-size: .88rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: 9px 9px 0 0;
  position: relative;
}
.admin-body .nav-tabs .nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.admin-body .nav-tabs .nav-link.active {
  color: var(--primary);
  background: transparent;
}
.admin-body .nav-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
}

/* 成功提示浮动 */
.toast-success {
  position: fixed;
  top: 4.5rem;
  right: 1.2rem;
  z-index: 1080;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: .65rem 1.1rem;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(5, 150, 105, .18);
  animation: toast-in .3s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 模态框 */
.admin-body .modal-content { border: none; border-radius: 14px; box-shadow: var(--shadow-md); }
.admin-body .modal-header { border-bottom: 1px solid var(--border-light); }
.admin-body .modal-footer { border-top: 1px solid var(--border-light); }

/* 后台分页微调 */
.admin-body .pagination .page-link { padding: .42rem .8rem; }

/* ============================================================
   专题广场 / 专题详情
   ============================================================ */
.topic-filter { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: .7rem; box-shadow: var(--shadow-sm); }
.topic-filter .form-select { font-size: .85rem; border-radius: 8px; }

.topic-card .topic-cover-default {
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: var(--primary);
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}
.topic-card .topic-cover-lg {
  height: 150px;
  font-size: 2.8rem;
  width: 100%;
  object-fit: cover;
}
.topic-card .topic-cover-lg img { width: 100%; height: 100%; object-fit: cover; }

/* 推荐专题 */
.recommend-topic-banner {
  background: linear-gradient(135deg, #f5f3ff, #eff6ff);
  border: 1px solid #ede9fe;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
}
.recommend-card { position: relative; overflow: visible; }
.recommend-card .topic-cover-default { background: linear-gradient(135deg, #c7d2fe, #e0e7ff); }

/* 专题封面 - 基于分类色的差异化渐变 */
.topic-cover-default.cat-violet,
.topic-cover-lg.cat-violet   { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); color: #8b5cf6; }
.topic-cover-default.cat-purple,
.topic-cover-lg.cat-purple   { background: linear-gradient(135deg, #faf5ff, #e9d5ff); color: #a855f7; }
.topic-cover-default.cat-pink,
.topic-cover-lg.cat-pink     { background: linear-gradient(135deg, #fdf2f8, #fbcfe8); color: #ec4899; }
.topic-cover-default.cat-red,
.topic-cover-lg.cat-red      { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #ef4444; }
.topic-cover-default.cat-orange,
.topic-cover-lg.cat-orange   { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #f97316; }
.topic-cover-default.cat-amber,
.topic-cover-lg.cat-amber    { background: linear-gradient(135deg, #fffbeb, #fde68a); color: #f59e0b; }
.topic-cover-default.cat-green,
.topic-cover-lg.cat-green    { background: linear-gradient(135deg, #f0fdf4, #bbf7d0); color: #22c55e; }
.topic-cover-default.cat-teal,
.topic-cover-lg.cat-teal     { background: linear-gradient(135deg, #f0fdfa, #99f6e4); color: #14b8a6; }
.topic-cover-default.cat-cyan,
.topic-cover-lg.cat-cyan     { background: linear-gradient(135deg, #ecfeff, #a5f3fc); color: #06b6d4; }
.topic-cover-default.cat-indigo,
.topic-cover-lg.cat-indigo   { background: linear-gradient(135deg, #eef2ff, #c7d2fe); color: #6366f1; }
.topic-cover-default.cat-blue,
.topic-cover-lg.cat-blue     { background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: #3b82f6; }
.recommend-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, .4);
}
.topic-card .topic-card-title { font-weight: 700; font-size: .95rem; line-height: 1.4; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.6em; }
.topic-card .topic-card-title a { color: inherit; }
.topic-card:hover .topic-card-title { color: var(--primary); }
.topic-card .topic-card-meta { display: flex; align-items: center; gap: .7rem; margin-top: .45rem; font-size: .75rem; color: var(--text-muted); }
.topic-card .topic-card-meta i { margin-right: .2rem; }
.topic-card.topic-card-sm .topic-card-title { min-height: 0; }

.topic-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.topic-tag { display: inline-block; font-size: .76rem; color: var(--primary); background: var(--primary-soft); border: 1px solid #dbeafe; border-radius: 999px; padding: .22rem .7rem; }

.topic-group { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.topic-group-title { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; }
.topic-group-title .bi { color: var(--primary); }
.topic-group-title span { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.topic-group .resource-list { display: flex; flex-direction: column; gap: .55rem; margin-top: .7rem; }
.topic-group .resource-item { margin-bottom: 0; }

.banner-stats { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .84rem; color: rgba(255,255,255,.92); }
.banner-stats i { margin-right: .25rem; }
.banner-actions { display: flex; gap: .55rem; flex-wrap: wrap; }

/* 专题评论 */
.comment-form { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.comment-rating { display: flex; align-items: center; gap: .2rem; font-size: 1.25rem; color: #f59e0b; height: 38px; }
.comment-rating i { cursor: pointer; }
.comment-list { display: flex; flex-direction: column; gap: .8rem; }
.comment-item { display: flex; gap: .75rem; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: .9rem 1rem; box-shadow: var(--shadow-sm); }
.comment-avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--grad-primary); color: #fff; font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: center; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.comment-name { font-weight: 600; font-size: .88rem; }
.comment-stars { font-size: .8rem; color: #f59e0b; }
.comment-time { margin-left: auto; font-size: .75rem; color: var(--text-muted); }
.comment-content { margin-top: .35rem; font-size: .9rem; line-height: 1.6; color: var(--text); word-break: break-word; }
.comment-replies { margin-top: .6rem; padding: .55rem .7rem; background: var(--bg); border-radius: 8px; display: flex; flex-direction: column; gap: .3rem; }
.comment-reply { font-size: .84rem; color: var(--text-muted); }

.topic-mini-cover { width: 42px; height: 32px; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, #dbeafe, #eff6ff); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.topic-mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.topic-mini-cover i { font-size: 1rem; }

/* 后台: 筛选条 / 批量操作条 / 已选资源 */
.admin-body .filter-bar { background: #fff; border: 1px solid var(--border-light); border-radius: 10px; padding: .65rem .8rem; box-shadow: var(--shadow-sm); }
.admin-body .batch-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.admin-body .selected-res .res-row { background: var(--bg); }
.admin-body .selected-res .res-row input[type="text"], 
.admin-body .selected-res .res-row input[type="number"] { font-size: .78rem; }
.admin-body .search-result { max-height: 260px; overflow-y: auto; }
.admin-body .stat-card { border: none; border-radius: 14px; color: #fff; box-shadow: var(--shadow-md); }
.admin-body .stat-card .stat-body { padding: 1.1rem 1.2rem; }
.admin-body .stat-card .stat-label { font-size: .8rem; opacity: .85; }
.admin-body .stat-card .stat-value { font-size: 1.65rem; font-weight: 700; line-height: 1.25; }
.admin-body .stat-card .stat-desc { font-size: .75rem; opacity: .8; margin-top: .2rem; }

/* ============================================================
   用户系统: 登录/注册/个人中心
   ============================================================ */
.auth-container {
  display: flex;
  justify-content: center;
  padding: 2.8rem 1rem 4rem;
  min-height: calc(100vh - 200px);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.8rem;
  align-self: flex-start;
}
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-icon { font-size: 2.8rem; color: var(--primary); }
.auth-btn { padding: .6rem 1rem; font-size: .95rem; border-radius: 10px; }
.auth-links { text-align: center; }
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.user-nav .list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-light);
  padding: .7rem .9rem;
  font-size: .9rem;
  color: var(--text);
  transition: background .18s, color .18s;
}
.user-nav .list-group-item:last-child { border-bottom: none; }
.user-nav .list-group-item:hover { background: var(--primary-soft); color: var(--primary); }
.user-nav .list-group-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.resource-item-inline {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: background .15s;
}
.resource-item-inline:last-child { border-bottom: none; }
.resource-item-inline:hover { background: #f8fafc; }

/* ============================================================
   按需转存 - 获取链接弹窗（加载中 / 成功 / 失败 三视图美化）
   ============================================================ */
#ondemandLinkModal .modal-dialog { max-width: 380px; }
#ondemandLinkModal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  overflow: hidden;
}

/* ---- 加载中视图 ---- */
#ondemandLoadingView .od-loading-orb {
  width: 78px;
  height: 78px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--primary-soft);
}
#ondemandLoadingView .od-loading-orb::before,
#ondemandLoadingView .od-loading-orb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
#ondemandLoadingView .od-loading-orb::before {
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: od-orb-spin 1s linear infinite;
}
#ondemandLoadingView .od-loading-orb::after {
  inset: -10px;
  border-bottom-color: #93c5fd;
  border-left-color: #93c5fd;
  opacity: .6;
  animation: od-orb-spin 1.6s linear infinite reverse;
}
#ondemandLoadingView .od-loading-orb i {
  font-size: 2.1rem;
  color: var(--primary);
  animation: od-orb-pulse 1.2s ease-in-out infinite;
}
@keyframes od-orb-spin { to { transform: rotate(360deg); } }
@keyframes od-orb-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

#ondemandLoadingView .od-loading-title { font-weight: 700; font-size: 1.02rem; }
#ondemandLoadingView .od-loading-sub { font-size: .8rem; color: var(--text-muted); }
#ondemandLoadingView .dlm-count { margin-top: 1rem; font-size: .8rem; color: var(--text-muted); }
#ondemandLoadingView .dlm-count-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  margin-right: .2rem;
  vertical-align: -1px;
}

#ondemandLoadingView .od-loading-steps {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-top: 1.1rem;
}
#ondemandLoadingView .od-loading-steps .od-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: od-dot-bounce 1.2s ease-in-out infinite;
}
#ondemandLoadingView .od-loading-steps .od-step:nth-child(2) { animation-delay: .15s; }
#ondemandLoadingView .od-loading-steps .od-step:nth-child(3) { animation-delay: .3s; }
#ondemandLoadingView .od-loading-steps .od-step:nth-child(4) { animation-delay: .45s; }
@keyframes od-dot-bounce { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }

/* ---- 成功视图 ---- */
#ondemandSuccessView .modal-header { padding: 1.1rem 1.2rem .4rem; }
#ondemandSuccessView .od-disk-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #dbeafe;
  padding: .3rem .8rem;
  border-radius: 999px;
}
#ondemandSuccessView .od-success-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto .6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(5, 150, 105, .35);
}
#ondemandSuccessView .od-success-title { font-weight: 700; font-size: 1.05rem; }
#ondemandSuccessView .od-success-sub { font-size: .8rem; color: var(--text-muted); }

#ondemandQrWrap {
  width: 168px;
  height: 168px;
  margin: .9rem auto .8rem;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
}
#ondemandQr { border: none !important; border-radius: 8px; }

#ondemandSuccessView .od-url-row .input-group {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
#ondemandSuccessView .od-url-row .form-control { border: none; background: #f8fafc; }
#ondemandSuccessView .od-url-row .btn { border: none; }
#ondemandPasscodeWrap {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 8px;
  padding: .3rem .8rem;
  font-size: .82rem;
  margin-bottom: .6rem;
}
#ondemandCountdownWrap {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  border-radius: 8px;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: .9rem;
}

#ondemandOpenBtn {
  border-radius: 10px;
  padding: .6rem 1rem;
  font-weight: 600;
  background: var(--grad-primary);
  border: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .3);
}
#ondemandOpenBtn:hover { filter: brightness(1.05); }

/* ---- 失败视图 ---- */
#ondemandErrorView .od-error-orb {
  width: 66px;
  height: 66px;
  margin: 0 auto .8rem;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
#ondemandErrorView .od-error-title { font-weight: 700; font-size: 1.05rem; }
#ondemandErrorView .od-error-msg {
  max-width: 280px;
  margin: 0 auto 1.1rem;
  font-size: .82rem;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: .55rem .9rem;
}
#ondemandErrorView .btn { border-radius: 9px; padding: .5rem .8rem; font-weight: 600; }

/* 视图切换淡入动画 */
#ondemandLinkModal .modal-body.od-view { transition: opacity .25s ease, transform .25s ease; }

/* ============================================================
   广告位系统样式
   ============================================================ */
.ad-slot {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  text-align: center;
}
.ad-slot img { display: block; }
.ad-slot a { display: block; }
.ad-slot .ad-text { display: inline-block; padding: .4rem 1rem; }
/* 页脚上方广告：居中且与页脚保持间距 */
.ad-slot-ad_footer_top { text-align: center; }
/* 侧边栏广告 */
.ad-slot-ad_sidebar_top img { border-radius: var(--radius-md); }

.admin-sidebar { min-width: 240px; }
