/**
 * 资源集合前台：从 index 拆出的页面样式 + 站点卡片（参考 onenav main.css 中 sites-item / style-sites-max / blur-img-bg）
 */

html {
  scroll-behavior: smooth;
}
html.dark body {
  background-color: #0f172a;
  color: #e2e8f0;
}
html.dark .rc-page-bg {
  background-color: #0f172a;
  color: #e2e8f0;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 折叠：隐藏标题与分类文字；顶栏整块收起，底栏仅图标 */
.rc-sidebar-collapsed .rc-sidebar-head {
  display: none;
}
.rc-sidebar-collapsed .rc-cat-btn .rc-cat-label {
  display: none;
}
.rc-sidebar-collapsed .rc-sidebar-toggle-text {
  display: none;
}
.rc-sidebar-collapsed .rc-sidebar-foot {
  padding: 0.5rem 0.35rem;
  border-top-color: rgba(148, 163, 184, 0.2);
}
.rc-sidebar-collapsed .rc-sidebar-inner {
  width: 3.5rem;
}
@media (min-width: 1024px) {
  #sidebar.rc-sidebar-collapsed {
    width: 4.5rem;
    min-width: 4.5rem;
    flex: 0 0 4.5rem;
    align-self: flex-start;
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 5rem);
  }
}
#category-bar button {
  text-align: left;
}

/* —— Hero —— */
.hero-nav {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background-size: 100% 100%;
  transition: background 0.7s ease;
}

/* 顶部 hero：不再使用 iframe，直接用热门资源轮播图做背景 */
.hero-hot-banner {
  position: absolute;
  inset: 0;
  z-index: 1; /* hero-inner z-index: 10 */
}
.hero-hot-banner .rc-hot-banner-frame {
  border-radius: 0;
  border: none;
  height: 100%;
}
.hero-hot-banner .rc-hot-banner-overlay {
  padding: 22px 24px;
}
.hero-hot-banner .rc-hot-banner-title {
  font-size: 34px;
}
.hero-hot-banner .rc-hot-banner-dots {
  bottom: 18px;
}
.hero-nav.rc-hero-night {
  background: linear-gradient(180deg, 
    #020817 0%,    /* 最深夜空 */
    #0a1428 35%,   /* 深蓝夜空 */
    #102340 65%,   /* 静谧藏青 */
    #0c1c33 100%   /* 柔和夜蓝 */
  );
}
.hero-nav.rc-hero-noon {
  background: linear-gradient(180deg, 
    #0284c7 0%,    /* 纯正天蓝 */
    #38bdf8 30%,   /* 清透亮蓝 */
    #7dd3fc 60%,   /* 柔和浅蓝 */
    #bae6fd 100%   /* 干净淡蓝白 */
  );
}
.hero-nav.rc-hero-morning {
  /* 干净通透的清晨渐变：淡蓝 → 浅青 → 暖白 → 柔黄 */
  background: linear-gradient(180deg, 
    #4a83b8 0%,    /* 浅天蓝（清晨天空） */
    #87b9e0 25%,   /* 淡青蓝 */
    #c6e7ff 50%,   /* 清透白蓝 */
    #fdf3d0 75%,   /* 柔和米黄 */
    #fff9e6 100%   /* 暖白晨光 */
  );
}
.hero-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 25% 15%, rgba(56, 189, 248, 0.12), transparent 58%),
    radial-gradient(ellipse 90% 60% at 88% 25%, rgba(var(--rc-accent-light-rgb), 0.08), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 5%, rgba(129, 140, 248, 0.06), transparent 45%);
  background-size: 160% 160%;
  background-position: 20% 30%, 80% 20%, 50% 0%;
  animation: rc-nebula 28s ease-in-out infinite alternate;
  opacity: 0.75;
}
@keyframes rc-nebula {
  0% {
    background-position: 10% 40%, 90% 30%, 40% 10%;
    opacity: 0.72;
  }
  100% {
    background-position: 85% 65%, 15% 75%, 60% 50%;
    opacity: 0.95;
  }
}
@media (min-width: 640px) {
  .hero-nav {
    min-height: 390px;
  }
}
.hero-sky-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-fx-iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-nav.hero-nav--iframe-fx {
  background: transparent !important;
}
.hero-nav.hero-nav--iframe-fx::before,
.hero-nav.hero-nav--iframe-fx .hero-aurora,
.hero-nav.hero-nav--iframe-fx .hero-vignette {
  display: none !important;
}
.hero-nav.rc-hero-noon::before {
  opacity: 0.22;
  animation-duration: 36s;
}
.hero-nav.rc-hero-morning::before {
  opacity: 0.4;
  animation-duration: 32s;
}
.hero-nav.rc-hero-noon .hero-aurora {
  opacity: 0.35;
  animation: none;
}
.hero-nav.rc-hero-morning .hero-aurora {
  opacity: 0.45;
  animation-duration: 22s;
}
.hero-nav.rc-hero-noon .hero-vignette {
  background: radial-gradient(ellipse 90% 75% at 50% 40%, transparent 40%, rgba(255, 255, 255, 0.12) 100%);
}
.hero-nav.rc-hero-morning .hero-vignette {
  background: radial-gradient(ellipse 90% 75% at 50% 35%, transparent 32%, rgba(120, 40, 20, 0.18) 100%);
}
/* 首页 Hero：进入完整搜索页的次要链接 */
.rc-hero-search-subtle {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.rc-hero-search-subtle:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.75);
}
.hero-nav.rc-hero-noon .rc-hero-search-subtle,
.hero-nav.rc-hero-morning .rc-hero-search-subtle {
  color: rgba(15, 23, 42, 0.75);
  border-bottom-color: rgba(15, 23, 42, 0.2);
}
.hero-nav.rc-hero-noon .rc-hero-search-subtle:hover,
.hero-nav.rc-hero-morning .rc-hero-search-subtle:hover {
  color: var(--rc-accent-600);
  border-bottom-color: var(--rc-accent-600);
}

.hero-tagline {
  color: #fff;
}
.hero-nav.rc-hero-noon .hero-tagline {
  color: #0f172a;
}
.hero-nav.rc-hero-morning .hero-tagline {
  color: #1c1917;
}
.hero-nav.rc-hero-noon .hero-hero-text-glow,
.hero-nav.rc-hero-morning .hero-hero-text-glow {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}
.hero-nav.rc-hero-noon .rc-scope {
  color: rgba(15, 23, 42, 0.5);
}
.hero-nav.rc-hero-noon .rc-scope:hover {
  color: rgba(15, 23, 42, 0.85);
}
.hero-nav.rc-hero-noon .rc-scope.rc-scope-active {
  color: #0f172a;
  border-bottom-color: var(--rc-accent-600);
}
.hero-nav.rc-hero-morning .rc-scope {
  color: rgba(28, 25, 23, 0.55);
}
.hero-nav.rc-hero-morning .rc-scope:hover {
  color: rgba(28, 25, 23, 0.88);
}
.hero-nav.rc-hero-morning .rc-scope.rc-scope-active {
  color: #1c1917;
  border-bottom-color: var(--rc-accent-600);
}
.hero-aurora {
  position: absolute;
  inset: -20% -10% 30%;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 75% 30%, rgba(var(--rc-accent-light-rgb), 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(129, 140, 248, 0.1), transparent 45%);
  animation: rc-aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes rc-aurora {
  0% {
    opacity: 0.68;
    transform: translate(-2%, 0);
  }
  100% {
    opacity: 0.98;
    transform: translate(2%, 1%);
  }
}
.hero-vignette {
  background: radial-gradient(ellipse 90% 75% at 50% 40%, transparent 35%, rgba(3, 6, 14, 0.55) 100%);
}
.hero-hero-text-glow {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 0, 0, 0.45);
}
.hero-inner {
  position: relative;
  z-index: 10;
}

.rc-scope {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.4rem 0.65rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.rc-scope:hover {
  color: rgba(255, 255, 255, 0.88);
}
.rc-scope.rc-scope-active {
  color: #fff;
  border-bottom-color: var(--rc-accent-500);
  font-weight: 500;
}

/* Hero 区有 .text-white，预编译 tailwind 未必含 text-slate-800/bg-rose-600，搜索区用原生样式兜底 */
#search-form {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.rc-search-shell {
  display: flex;
  align-items: stretch;
  border-radius: 1rem;
  background: #fff;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
@media (min-width: 640px) {
  .rc-search-shell {
    border-radius: 9999px;
  }
}
.hero-nav .rc-search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  caret-color: var(--rc-accent-600);
}
@media (min-width: 640px) {
  .hero-nav .rc-search-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}
.hero-nav .rc-search-input::placeholder {
  color: #64748b;
  opacity: 1;
}
.hero-nav .rc-search-input::-webkit-search-cancel-button {
  cursor: pointer;
  opacity: 0.65;
}
.hero-nav .rc-search-input:-webkit-autofill,
.hero-nav .rc-search-input:-webkit-autofill:hover,
.hero-nav .rc-search-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #0f172a;
  transition: background-color 9999s ease-out;
}

.rc-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  min-width: 3.25rem;
  min-height: 2.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--rc-accent-500) 0%, var(--rc-accent-600) 100%);
  transition: background 0.2s, filter 0.2s;
}
.rc-search-btn:hover {
  background: linear-gradient(180deg, var(--rc-accent-400) 0%, var(--rc-accent-500) 100%);
  color: #fff;
}
.rc-search-btn:active {
  filter: brightness(0.92);
}
.rc-search-btn i {
  color: #fff;
  font-size: 0.95rem;
}
.rc-search-btn-text {
  color: #fff;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .rc-search-btn {
    min-width: 5rem;
    padding: 0.65rem 1.35rem;
    font-size: 1rem;
  }
}
html.dark .hero-nav .rc-search-shell {
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
html.dark .hero-nav .rc-search-input:-webkit-autofill,
html.dark .hero-nav .rc-search-input:-webkit-autofill:hover,
html.dark .hero-nav .rc-search-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #0f172a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rc-search-scope-select {
  flex: 0 0 auto;
  min-width: 5rem;
  max-width: 6.5rem;
  padding: 0.65rem 0.75rem 0.65rem 0.85rem;
  margin: 0;
  border: none;
  border-right: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0;
  background: rgba(248, 250, 252, 0.98);
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.65rem;
}
@media (min-width: 640px) {
  .rc-search-scope-select {
    min-width: 5.5rem;
    max-width: 7rem;
    font-size: 0.9375rem;
    padding-left: 1rem;
    border-top-left-radius: 9999px;
    border-bottom-left-radius: 9999px;
  }
}

.rc-search-history-block {
  color: rgba(255, 255, 255, 0.92);
}
.hero-nav.rc-hero-noon .rc-search-history-block,
.hero-nav.rc-hero-morning .rc-search-history-block {
  color: rgba(15, 23, 42, 0.82);
}
.rc-history-clear {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rc-history-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rc-history-tag:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
}
.hero-nav.rc-hero-noon .rc-history-tag,
.hero-nav.rc-hero-morning .rc-history-tag {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.55);
}
.hero-nav.rc-hero-noon .rc-history-tag:hover,
.hero-nav.rc-hero-morning .rc-history-tag:hover {
  background: rgba(255, 255, 255, 0.85);
}

.rc-search-cat {
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.rc-search-cat:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.rc-search-cat.rc-search-cat-active {
  color: #fff;
  border-color: var(--rc-accent-400);
  background: linear-gradient(180deg, var(--rc-accent-500) 0%, var(--rc-accent-600) 100%);
  box-shadow: 0 4px 14px rgba(var(--rc-accent-rgb), 0.35);
}
.hero-nav.rc-hero-noon .rc-search-cat,
.hero-nav.rc-hero-morning .rc-search-cat {
  color: rgba(15, 23, 42, 0.65);
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.45);
}
.hero-nav.rc-hero-noon .rc-search-cat:hover,
.hero-nav.rc-hero-morning .rc-search-cat:hover {
  color: rgba(15, 23, 42, 0.9);
  background: rgba(255, 255, 255, 0.72);
}
.hero-nav.rc-hero-noon .rc-search-cat.rc-search-cat-active,
.hero-nav.rc-hero-morning .rc-search-cat.rc-search-cat-active {
  color: #fff;
  border-color: var(--rc-accent-600);
  background: linear-gradient(180deg, var(--rc-accent-500) 0%, var(--rc-accent-600) 100%);
}

.rc-pagination {
  user-select: none;
}
.rc-page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html.dark .rc-page-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}
.rc-page-btn:hover:not(:disabled) {
  border-color: var(--rc-accent-500);
  color: var(--rc-accent-600);
}
.rc-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.rc-page-btn.rc-page-btn-active {
  border-color: var(--rc-accent-600);
  background: linear-gradient(180deg, var(--rc-accent-500) 0%, var(--rc-accent-600) 100%);
  color: #fff;
}
.rc-page-btn.rc-page-btn-active:hover {
  color: #fff;
}
.rc-page-ellipsis {
  padding: 0 0.25rem;
  font-size: 0.875rem;
  color: #94a3b8;
}
html.dark .rc-page-ellipsis {
  color: #64748b;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-nav::before,
  .hero-aurora {
    animation: none !important;
  }
  #sidebar.rc-cat-drawer {
    transition: none !important;
  }
  .rc-cat-drawer-backdrop {
    transition: none !important;
  }
}

/* 首页分区锚点：原生跳转/浏览器「定位到」时的顶栏留白（与 main.js 偏移大致一致） */
.rc-section-anchor {
  scroll-margin-top: 5rem;
}
@media (min-width: 1024px) {
  .rc-section-anchor {
    scroll-margin-top: 5.5rem;
  }
}

/* —— 主内容区 —— */
/*
 * 说明：assets/css/tailwind.min 为预编译包，不含任意值类（如 lg:w-[288px]、max-w-[1480px]）。
 * 以下用原生 CSS 写死侧栏宽度与主区域 max-width，避免侧栏在桌面端被 w-full 拉满整行。
 */
.rc-header-inner {
  max-width: 87.5rem; /* 1400px */
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

/* 顶栏右侧工具区：用户下拉超出 h-14 时不要裁剪 */
.rc-header-inner > div:last-child {
  overflow: visible;
}

#rc-nav-auth {
  position: relative;
  z-index: 20;
  overflow: visible;
}
.rc-page-main {
  max-width: 92.5rem; /* 1480px */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  #sidebar:not(.rc-sidebar-collapsed) {
    width: 18rem; /* 288px */
    max-width: 18rem;
    flex: 0 0 18rem;
    align-self: flex-start;
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 5rem);
  }
}
#category-bar {
  max-height: 220px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#category-bar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
html.dark #category-bar {
  scrollbar-width: none;
}
@media (min-width: 1024px) {
  #category-bar {
    max-height: min(560px, calc(100vh - 12rem));
  }
}

/* —— 移动端：分类侧滑抽屉（< lg） —— */
.rc-cat-drawer-backdrop {
  display: none;
}
@media (max-width: 1023px) {
  /* 侧栏 fixed 脱出文档流后，避免与主内容之间仍保留 flex gap */
  .rc-page-main {
    gap: 0;
  }

  .rc-cat-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  html.dark .rc-cat-drawer-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }
  .rc-cat-drawer-backdrop.rc-cat-drawer-backdrop--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #sidebar.rc-cat-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(18rem, 86vw) !important;
    max-width: min(18rem, 86vw) !important;
    flex: none !important;
    margin: 0;
    z-index: 60;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    pointer-events: none;
  }
  #sidebar.rc-cat-drawer.rc-cat-drawer--open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    box-shadow: 8px 0 40px rgba(15, 23, 42, 0.18);
  }
  html.dark #sidebar.rc-cat-drawer.rc-cat-drawer--open {
    box-shadow: 8px 0 48px rgba(0, 0, 0, 0.45);
  }

  #sidebar.rc-cat-drawer .rc-sidebar-inner {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    border-radius: 0 16px 16px 0;
  }

  /* 抽屉内始终展开文字，不受桌面「收起」态影响 */
  #sidebar.rc-sidebar-collapsed .rc-sidebar-inner {
    width: 100% !important;
    max-width: none !important;
  }
  #sidebar.rc-sidebar-collapsed .rc-sidebar-head {
    display: flex !important;
  }
  #sidebar.rc-sidebar-collapsed .rc-cat-btn .rc-cat-label {
    display: inline !important;
  }
  #sidebar.rc-sidebar-collapsed .rc-sidebar-toggle-text {
    display: inline !important;
  }

  /* 移动端不展示底栏「收起/展开」（改由顶栏菜单与遮罩关闭） */
  #sidebar.rc-cat-drawer .rc-sidebar-foot {
    display: none;
  }

  #sidebar.rc-cat-drawer #category-bar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 1024px) {
  .rc-cat-drawer-backdrop {
    display: none !important;
  }
}

body.rc-cat-drawer-scroll-lock {
  overflow: hidden;
}

.rc-cat-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (min-width: 1024px) {
  .rc-cat-drawer-close {
    display: none !important;
  }
}
.rc-cat-drawer-close:hover {
  background: rgba(148, 163, 184, 0.22);
  color: var(--rc-accent-600);
}
html.dark .rc-cat-drawer-close {
  color: #94a3b8;
}
html.dark .rc-cat-drawer-close:hover {
  background: rgba(71, 85, 105, 0.45);
  color: var(--rc-accent-400);
}

.rc-page-shell {
  background-color: #f4f6f9;
}
html.dark .rc-page-shell {
  background-color: #0f172a;
}
.rc-header {
  background: #fff;
  border-bottom: 1px solid #ebeef3;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  /* 下拉用户菜单会超出顶栏高度，避免被裁切 */
  overflow: visible;
}
html.dark .rc-header {
  background: rgba(15, 23, 42, 0.98);
  border-bottom-color: rgba(51, 65, 85, 0.6);
  box-shadow: none;
}
.rc-header-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.2s, color 0.2s;
}
.rc-header-icon:hover {
  background: #f1f5f9;
  color: var(--rc-accent-600);
}
html.dark .rc-header-icon:hover {
  background: #1e293b;
  color: var(--rc-accent-400);
}
.rc-header-link {
  font-size: 0.875rem;
  color: #334155;
  transition: color 0.2s;
}
.rc-header-link:hover {
  color: var(--rc-accent-600);
}
html.dark .rc-header-link {
  color: #cbd5e1;
}
html.dark .rc-header-link:hover {
  color: var(--rc-accent-400);
}

/* 顶栏：打开分类抽屉，仅移动端（与 .rc-cat-drawer 断点一致，不依赖 Tailwind 是否包含 lg:hidden） */
.rc-header-menu-btn {
  display: inline-flex;
}
@media (min-width: 1024px) {
  .rc-header-menu-btn {
    display: none !important;
  }
}

/* 用户头像 + 悬停卡片（参考 B 站顶栏交互；小屏点击展开） */
.rc-user-menu {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  z-index: 200;
}

.rc-user-menu__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 9999px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.rc-user-menu__trigger:hover,
.rc-user-menu__trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(var(--rc-accent-rgb, 2, 132, 199), 0.35);
  outline: none;
}

.rc-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rc-accent-500, #38bdf8), var(--rc-accent-600, #0284c7));
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  user-select: none;
}

html.dark .rc-user-avatar {
  border-color: rgba(30, 41, 59, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.rc-user-avatar--sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  font-size: 0.8rem;
}

.rc-user-avatar--lg {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 9999px;
  font-size: 1.35rem;
  /* 略上移与卡片叠边，避免过大负边距顶穿被父级裁切 */
  margin-top: -1.25rem;
  margin-bottom: 0.35rem;
  border-width: 3px;
}

.rc-user-avatar--photo {
  object-fit: cover;
  padding: 0;
  font-size: 0;
  line-height: 0;
  background: #e2e8f0;
}

html.dark .rc-user-avatar--photo {
  background: #334155;
}

.rc-user-menu__dropdown {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

@media (min-width: 1024px) {
  .rc-user-menu__scrim {
    display: none !important;
  }

  .rc-user-menu__panel {
    display: contents;
  }

  .rc-user-menu__grab {
    display: none !important;
  }

  .rc-user-menu__dropdown {
    position: absolute;
    left: 50%;
    right: auto;
    top: 100%;
    padding-top: 0.5rem;
    z-index: 300;
    min-width: 288px;
    max-width: min(320px, calc(100vw - 1.5rem));
    transform: translateX(-50%);
  }
}

@media (max-width: 1023px) {
  .rc-user-menu__dropdown {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    transform: none !important;
  }

  .rc-user-menu__scrim {
    flex: 1 1 auto;
    min-height: 4rem;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.42);
    -webkit-tap-highlight-color: transparent;
  }

  html.dark .rc-user-menu__scrim {
    background: rgba(0, 0, 0, 0.55);
  }

  .rc-user-menu__panel {
    flex: 0 0 auto;
    max-height: min(90vh, 720px);
    overflow: hidden auto;
    padding: 0 0.5rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  .rc-user-menu__grab {
    width: 2.25rem;
    height: 4px;
    border-radius: 9999px;
    background: #cbd5e1;
    margin: 0.5rem auto 0.25rem;
    flex-shrink: 0;
  }

  html.dark .rc-user-menu__grab {
    background: #475569;
  }

  .rc-user-menu__panel .rc-user-menu__card {
    border-radius: 1rem 1rem 0 0;
    margin: 0 auto;
    max-width: 28rem;
  }

  .rc-user-menu__panel .rc-user-avatar--lg {
    margin-top: 0;
    margin-bottom: 0.4rem;
  }

  .rc-user-menu__panel .rc-user-menu__banner {
    padding-top: 0.15rem;
  }

  .rc-user-menu__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.12rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .rc-user-menu__stat-label {
    font-size: 0.56rem;
    line-height: 1.15;
    padding: 0 0.05rem;
  }

  .rc-user-menu__stat-num {
    font-size: 0.82rem;
  }
}

.rc-user-menu__card {
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.95);
  overflow: hidden;
}

html.dark .rc-user-menu__card {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(51, 65, 85, 0.75);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

.rc-user-menu__banner {
  text-align: center;
  padding: 0.35rem 1rem 0.85rem;
  /* 中性顶区，避免站点主色偏红时整段粉感过重 */
  background: linear-gradient(180deg, #f1f5f9 0%, rgba(241, 245, 249, 0) 100%);
}

html.dark .rc-user-menu__banner {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.35) 0%, transparent 100%);
}

.rc-user-menu__nickname {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

html.dark .rc-user-menu__nickname {
  color: #f1f5f9;
}

.rc-user-menu__meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.35;
  word-break: break-all;
}

html.dark .rc-user-menu__meta {
  color: #94a3b8;
}

.rc-user-menu__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.65rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

html.dark .rc-user-menu__stats {
  border-color: rgba(51, 65, 85, 0.65);
}

.rc-user-menu__stat {
  text-align: center;
  padding: 0.2rem 0;
}

.rc-user-menu__stat--muted {
  grid-column: 1 / -1;
}

.rc-user-menu__stat-num {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

html.dark .rc-user-menu__stat-num {
  color: #f8fafc;
}

.rc-user-menu__stat-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.rc-user-menu__actions {
  padding: 0.35rem 0 0.5rem;
}

.rc-user-menu__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: #334155;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

html.dark .rc-user-menu__row {
  color: #e2e8f0;
}

.rc-user-menu__row:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.dark .rc-user-menu__row:hover {
  background: rgba(51, 65, 85, 0.55);
  color: #f8fafc;
}

.rc-user-menu__row > i:first-child {
  width: 1.1rem;
  text-align: center;
  color: #64748b;
  transition: color 0.15s ease;
}

html.dark .rc-user-menu__row > i:first-child {
  color: #94a3b8;
}

.rc-user-menu__row:hover > i:first-child {
  color: currentColor;
}

.rc-user-menu__row .rc-user-menu__chev {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.45;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.rc-user-menu__row:hover .rc-user-menu__chev {
  color: currentColor;
  opacity: 0.55;
}

.rc-user-menu__row--danger {
  color: #b91c1c !important;
}

html.dark .rc-user-menu__row--danger {
  color: #f87171 !important;
}

.rc-user-menu__row--danger:hover {
  background: rgba(254, 226, 226, 0.85);
  color: #991b1b !important;
}

html.dark .rc-user-menu__row--danger:hover {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5 !important;
}

.rc-user-menu__row--danger:hover > i:first-child {
  color: currentColor;
}

@media (min-width: 1024px) and (hover: hover) {
  .rc-user-menu:hover .rc-user-menu__dropdown,
  .rc-user-menu:focus-within .rc-user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 1023px) {
  .rc-user-menu.rc-user-menu--open .rc-user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* 打开用户菜单时禁止背后滚动（手机抽屉） */
body.rc-user-menu-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1023px) {
  .rc-user-menu__row:active {
    background: #e8ecf1;
  }

  html.dark .rc-user-menu__row:active {
    background: rgba(51, 65, 85, 0.75);
  }

  .rc-user-menu__row--danger:active {
    background: rgba(254, 202, 202, 0.85);
  }

  html.dark .rc-user-menu__row--danger:active {
    background: rgba(127, 29, 29, 0.45);
  }
}

.rc-sidebar-card {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}
html.dark .rc-sidebar-card {
  background: rgba(30, 41, 59, 0.48);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rc-sidebar-card {
    background: #fff;
    border-color: #e8ecf1;
  }
  html.dark .rc-sidebar-card {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(51, 65, 85, 0.7);
  }
}
.rc-sidebar-card .rc-sidebar-head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.28);
}
html.dark .rc-sidebar-card .rc-sidebar-head {
  border-bottom-color: rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.22);
}

.rc-sidebar-foot {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.55rem 0.65rem 0.65rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 0 0 16px 16px;
}
html.dark .rc-sidebar-foot {
  border-top-color: rgba(71, 85, 105, 0.5);
  background: rgba(15, 23, 42, 0.32);
}
.rc-sidebar-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s, color 0.2s;
}
.rc-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--rc-accent-600);
}
html.dark .rc-sidebar-toggle {
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.35);
}
html.dark .rc-sidebar-toggle:hover {
  background: rgba(71, 85, 105, 0.55);
  color: var(--rc-accent-400);
}
.rc-sidebar-toggle-icon {
  display: inline-flex;
  font-size: 0.75rem;
  opacity: 0.9;
}
.rc-sidebar-toggle:hover .rc-sidebar-toggle-icon {
  opacity: 1;
}

.rc-cat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  text-align: left;
  color: #475569;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, font-weight 0.2s;
}
html.dark .rc-cat-btn {
  color: #cbd5e1;
}
/* 默认不高亮：仅悬停 / 选中时显色（与 .rc-cat-active 区分） */
.rc-cat-btn:hover {
  background: rgba(var(--rc-accent-rgb), 0.08);
  color: var(--rc-accent-700);
  border-color: rgba(var(--rc-accent-rgb), 0.22);
  font-weight: 500;
}
html.dark .rc-cat-btn:hover {
  background: rgba(var(--rc-accent-rgb), 0.12);
  color: var(--rc-accent-400);
  border-color: rgba(var(--rc-accent-rgb), 0.28);
}
.rc-cat-btn.rc-cat-active {
  background: rgba(var(--rc-accent-rgb), 0.1);
  color: var(--rc-accent-600);
  border-color: rgba(var(--rc-accent-rgb), 0.22);
  font-weight: 600;
}
html.dark .rc-cat-btn.rc-cat-active {
  background: rgba(var(--rc-accent-rgb), 0.15);
  color: var(--rc-accent-400);
  border-color: rgba(var(--rc-accent-rgb), 0.35);
}
.rc-cat-btn i {
  width: 1.25rem;
  text-align: center;
  color: #94a3b8;
  opacity: 1;
  transition: color 0.2s;
}
html.dark .rc-cat-btn:not(:hover):not(.rc-cat-active) i {
  color: #64748b;
}
.rc-cat-btn:hover i {
  color: var(--rc-accent-500);
}
html.dark .rc-cat-btn:hover i {
  color: var(--rc-accent-400);
}
.rc-cat-btn.rc-cat-active i {
  color: var(--rc-accent-600);
}
html.dark .rc-cat-btn.rc-cat-active i {
  color: var(--rc-accent-400);
}

.rc-section-head {
  margin-bottom: 1.125rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8ecf1;
}
html.dark .rc-section-head {
  border-bottom-color: rgba(51, 65, 85, 0.6);
}
.rc-section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
html.dark .rc-section-title {
  color: #f8fafc;
}
.rc-section-title i {
  color: #484b4f;
  font-size: 1rem;
}
.rc-more-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.rc-more-link:hover {
  color: var(--rc-accent-600);
  background: #fef2f2;
}
html.dark .rc-more-link:hover {
  color: #fda4af;
  background: rgba(var(--rc-accent-rgb), 0.12);
}

.rc-list-bar {
  position: sticky;
  top: 3.5rem;
  z-index: 9;
  padding-top: 0.35rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #e8ecf1;
  background: #f4f6f9;
}
html.dark .rc-list-bar {
  border-bottom-color: rgba(51, 65, 85, 0.6);
  background: #0f172a;
}

.rc-fab {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e8ecf1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  color: #64748b;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}
.rc-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  color: var(--rc-accent-600);
  border-color: #fecdd3;
}
html.dark .rc-fab {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
html.dark .rc-fab:hover {
  color: #fda4af;
  border-color: var(--rc-accent-400);
}

/* —— 首页骨架屏（减轻等待焦虑） —— */
.rc-sk {
  display: block;
  border-radius: 0.5rem;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.16) 0%,
    rgba(148, 163, 184, 0.28) 45%,
    rgba(148, 163, 184, 0.16) 90%
  );
  background-size: 200% 100%;
  animation: rc-sk-shimmer 1.15s ease-in-out infinite;
}
html.dark .rc-sk {
  background: linear-gradient(
    90deg,
    rgba(71, 85, 105, 0.35) 0%,
    rgba(100, 116, 139, 0.5) 45%,
    rgba(71, 85, 105, 0.35) 90%
  );
  background-size: 200% 100%;
}
@keyframes rc-sk-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rc-sk {
    animation: none;
    background: rgba(148, 163, 184, 0.22);
  }
  html.dark .rc-sk {
    background: rgba(71, 85, 105, 0.45);
  }
}
.rc-sk-pill {
  height: 2.25rem;
  border-radius: 0.65rem;
  min-width: 4.5rem;
}
.rc-skeleton-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.rc-skeleton-section {
  margin-bottom: 2.5rem;
}
.rc-skeleton-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.rc-sk-line-title {
  height: 1.125rem;
  width: 8rem;
  border-radius: 0.35rem;
}
.rc-sk-line-more {
  height: 0.875rem;
  width: 2.75rem;
  border-radius: 0.25rem;
}
.rc-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .rc-skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
  }
}
@media (min-width: 1024px) {
  .rc-skeleton-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .rc-skeleton-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.rc-sk-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.65rem;
  min-height: 5.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.5);
}
html.dark .rc-sk-card {
  border-color: rgba(71, 85, 105, 0.5);
  background: rgba(30, 41, 59, 0.4);
}
.rc-sk-card__ico {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.rc-sk-card__lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.15rem;
}
.rc-sk-line-sm {
  height: 0.65rem;
  border-radius: 0.2rem;
  width: 70%;
}
.rc-sk-line-xs {
  height: 0.55rem;
  border-radius: 0.2rem;
  width: 45%;
}

/* 卡片背景模糊：等主图加载后再挂背景，避免双倍请求与首屏抢带宽 */
.rc-sites-card__blur--defer {
  opacity: 0;
  filter: none;
  transform: scale(0) translate(-50%);
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.rc-sites-card__blur--defer.rc-sites-card__blur--ready {
  opacity: 0.6;
  filter: blur(10px) opacity(70%);
}

/* —— 站点卡片：onenav sites-item / style-sites-max / blur-img-bg 精简版 —— */
.rc-sites-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  background-color: #fff;
  border-radius: 12px;
  --rc-site-muted: rgba(116, 116, 116, 0.1);
  /* 由 main.js 根据图标主色写入，用于悬停光晕 */
  --rc-icon-glow-rgb: var(--rc-accent-light-rgb);
  border: 1px solid #e8ecf1;
  padding: 0;
  /* 允许图标外发光溢出，避免裁切 */
  overflow: visible;
  transition: box-shadow 0.3s, transform 0.2s ease, background-color 0.2s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
html.dark .rc-sites-card {
  background-color: rgba(30, 41, 59, 0.92);
  border-color: rgba(51, 65, 85, 0.7);
  --rc-site-muted: rgba(71, 85, 105, 0.35);
}
.rc-sites-card:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  transform: none;
}
html.dark .rc-sites-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.rc-sites-card__main {
  min-width: 0;
  flex: 1 1 auto;
  transition: padding-right 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

.rc-sites-card__body {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  padding: 10px 10px 0 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  box-sizing: border-box;
}

.rc-sites-card__header {
  margin-right: 8px;
  flex-shrink: 0;
}

.rc-sites-card__media {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: visible;
  background: var(--rc-site-muted);
  isolation: isolate;
}
/* 参考 onenav .posts-item.sites-item .item-image：悬停时按图标主色外发光（--rc-icon-glow-rgb 由 JS 采样） */
.rc-sites-card__media::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 140%;
  margin-left: -70%;
  margin-top: -70%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--rc-icon-glow-rgb), 0.5) 0%,
    rgba(var(--rc-icon-glow-rgb), 0.22) 42%,
    rgba(var(--rc-icon-glow-rgb), 0) 72%
  );
  filter: blur(12px);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.38s ease, transform 0.38s ease;
}
.rc-sites-card:hover .rc-sites-card__media::before {
  opacity: 1;
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .rc-sites-card__media::before {
    transition: none;
  }
}

.rc-sites-card__blur {
  position: absolute;
  width: 120%;
  height: 120%;
  left: -10%;
  top: -10%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  filter: blur(10px) opacity(70%);
  opacity: 0.6;
  transform: scale(0) translate(-50%);
  transition: transform 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.rc-sites-card:hover .rc-sites-card__blur {
  transform: scale(1);
}

.rc-sites-card__img-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
}
.rc-sites-card__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(1.05);
  transition: transform 0.4s ease;
}
.rc-sites-card:hover .rc-sites-card__img {
  transform: scale(1);
}

.rc-sites-card__placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #94a3b8;
  border-radius: 50%;
  overflow: hidden;
}

.rc-sites-card__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding-bottom: 2px;
}

.rc-sites-card__title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.dark .rc-sites-card__title {
  color: #f8fafc;
}
.rc-sites-card__title b {
  font-weight: 600;
}

.rc-sites-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.dark .rc-sites-card__desc {
  color: #94a3b8;
}

.rc-sites-card__footer {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-top: 6px;
  padding: 6px 10px 10px 10px;
  gap: 8px;
}
.rc-sites-card__footer::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  right: 10px;
  height: 1px;
  background: var(--rc-site-muted);
}

.rc-sites-card__tags {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
}
@media (min-width: 400px) {
  .rc-sites-card__tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}

.rc-sites-card__tag {
  font-size: 11px;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 9999px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e8ecf1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}
.rc-sites-card__tag:hover {
  border-color: rgba(100, 116, 139, 0.28);
  background: #ffffff;
  color: #334155;
}
html.dark .rc-sites-card__tag:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
}
html.dark .rc-sites-card__tag {
  background: rgba(51, 65, 85, 0.45);
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.6);
}

.rc-sites-card__expand {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  opacity: 0;
  overflow: hidden;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  transition:
    width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width, opacity;
}
html.dark .rc-sites-card__expand {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border-left-color: rgba(71, 85, 105, 0.65);
}
.rc-sites-card--expanded .rc-sites-card__expand {
  width: 152px;
  opacity: 1;
}
.rc-sites-card--expanded .rc-sites-card__main {
  padding-right: 152px;
}
.rc-sites-card__expand-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 9px 10px 4px;
}
html.dark .rc-sites-card__expand-title {
  color: #94a3b8;
}
.rc-sites-card__expand-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 8px 8px;
}
.rc-sites-card__expand-item {
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  white-space: nowrap;
}
html.dark .rc-sites-card__expand-item {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(100, 116, 139, 0.65);
}

/* 桌面端：真实占位变宽，右侧数据列不遮挡原内容 */
@media (min-width: 1024px) {
  .rc-sites-card {
    grid-column: span 1;
  }
  .rc-sites-card--expanded {
    grid-column: span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rc-sites-card__main,
  .rc-sites-card__expand {
    transition: none !important;
  }
}

/* 描述自定义提示（替代浏览器原生 title） */
.rc-sites-card__desc-tip {
  position: relative;
  cursor: default;
  display: inline-block;
  max-width: 100%;
}
.rc-sites-card__desc-tip::before,
.rc-sites-card__desc-tip::after {
  display: none !important;
}
.rc-sites-card__desc-tip::before {
  content: '';
  left: 22px;
  bottom: calc(100% + 3px);
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: rgba(2, 6, 23, 0.92);
  transform: translateY(-4px);
}
.rc-sites-card__desc-tip::after {
  content: attr(data-tip);
  left: 0;
  bottom: calc(100% + 9px);
  max-width: min(360px, 82vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.92);
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.25);
  transform: translateY(-4px);
}
.rc-sites-card__desc-tip[data-tip='']::before,
.rc-sites-card__desc-tip[data-tip='']::after {
  display: none;
}

/* JS 浮层 tooltip（稳定，不受卡片布局影响） */
.rc-float-tip {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  max-width: min(420px, 84vw);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.92);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.25);
  opacity: 0;
  transform: translateY(4px) scale(0.985);
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.rc-float-tip--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.rc-sites-card__goto {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #94a3b8;
  opacity: 0.65;
  transition: opacity 0.3s, color 0.2s;
  text-decoration: none;
}
.rc-sites-card:hover .rc-sites-card__goto {
  opacity: 1;
  color: var(--rc-accent-600);
}
html.dark .rc-sites-card:hover .rc-sites-card__goto {
  color: var(--rc-accent-400);
}

/* —— 加载状态：更像“系统提示” —— */
#load-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
}
html.dark #load-status {
  background: rgba(71, 85, 105, 0.35);
  border-color: rgba(71, 85, 105, 0.6);
  color: #cbd5e1;
}

/* —— 全局细滚动条（减少视觉噪音；分类多时侧栏仍保留一条） —— */
html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}
html::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.65);
}
html.dark {
  scrollbar-color: rgba(71, 85, 105, 0.65) transparent;
}
html.dark::-webkit-scrollbar-thumb {
  background-color: rgba(71, 85, 105, 0.55);
}
html.dark::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.75);
}

/* —— 首页列表：仅“每行最后一列”使用浮层详情 —— */
/* 用 marker 固定宽度，避免 mouseleave 时 width 从 152px -> 0px 造成“回弹动画”。 */
.rc-home-lastcol-marker .rc-sites-card__main {
  padding-right: 0 !important;
}

.rc-home-lastcol-marker .rc-sites-card__expand {
  inset: 0;
  border-left: none;
  border-radius: inherit;
  width: auto !important;
  opacity: 0 !important;
  transform: translateY(6px) !important;

  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.rc-home-lastcol-marker.rc-home-lastcol-show .rc-sites-card__expand {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* 首页中间：Banner 图广告轮播 */
.rc-home-middle-banner {
  height: 280px;
}
@media (max-width: 640px) {
  .rc-home-middle-banner {
    height: 220px;
  }
}

.rc-home-middle-banner.is-empty {
  height: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.rc-middle-gradient-banner {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.rc-middle-gradient-banner__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.52) 0%, rgba(2, 6, 23, 0.05) 65%);
}
.rc-middle-gradient-banner__title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
  margin: 0;
}
.rc-middle-gradient-banner__sub {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.95;
  letter-spacing: 0.12em;
}

.rc-hot-banner-frame {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.rc-hot-banner-slide {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  color: #fff;
  text-decoration: none;
}
.rc-hot-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rc-hot-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.68) 0%, rgba(2, 6, 23, 0.06) 55%, rgba(2, 6, 23, 0.08) 100%);
}
.rc-hot-banner-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(var(--rc-accent-rgb), 0.85);
  color: #fff;
}
.rc-hot-banner-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}
.rc-hot-banner-desc {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.95;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-hot-banner-stats {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}
.rc-hot-banner-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}
.rc-hot-banner-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.rc-hot-banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.52);
}
.rc-hot-banner-dot.is-on {
  background: #fff;
}
@media (max-width: 640px) {
  .rc-hot-banner-title {
    font-size: 22px;
  }
  .rc-hot-banner-desc {
    max-width: 100%;
  }
}

.rc-section-banner-wrap {
  margin: 0 0 10px;
}
.rc-section-banner-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.rc-section-banner-link.is-disabled {
  pointer-events: none;
}
.rc-section-banner-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.rc-home-banner-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.rc-home-banner-frame {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.rc-home-banner-link {
  display: block;
  width: 100%;
  height: 100%;
}
.rc-home-banner-link.is-disabled {
  pointer-events: none;
}

.rc-home-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 180ms ease;
  opacity: 1;
}

.rc-home-banner-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.rc-home-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.rc-home-banner-dot.is-on {
  background: rgba(255, 255, 255, 0.95);
}

/* 预留：下方广告位（默认隐藏） */
.rc-home-bottom-ad-slot {
  display: none;
  height: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.rc-home-bottom-ad-slot.is-visible {
  display: block;
  height: 160px;
  margin-bottom: 0.5rem !important; /* 与 html 里的 mb-2 对齐 */
}

@media (max-width: 640px) {
  .rc-home-bottom-ad-slot.is-visible {
    height: 120px;
  }
}

/* 移动端隐藏卡片 logo 图片，节省空间，只显示文字信息 */
@media (max-width: 480px) {
  .rc-sites-card__header {
    display: none;
  }
  .rc-sites-card__body {
    padding: 8px 10px 0 10px;
  }
  .rc-sites-card__text {
    min-width: 0;
    width: 100%;
  }
  .rc-sites-card__goto {
    display: none;
  }
  .rc-sites-card__tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .rc-sites-card__tags::-webkit-scrollbar {
    display: none;
  }
  .rc-sites-card__tag {
    font-size: 12px;
    padding: 3px 8px;
    flex-shrink: 0;
    white-space: nowrap;
  }
}
