/* 资源搜索聚合网站 样式表 */
@font-face {
  font-family: 'Montserrat';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Han Mono SC';
  src: url('https://resource-static.bj.bcebos.com/fonts-skill/SourceHanMonoSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --primary: #3E4759;
  --on-primary: #FFFFFF;
  --accent: #D94E17;
  --on-accent: #FFFFFF;
  --background: #FFFFFF;
  --foreground: #111111;
  --muted: #F5F5F5;
  --border: #E5E5E5;
  --secondary: #39393B;
  --radius: 4px;
}

/* ===== 深色模式变量 ===== */
body.dark {
  --primary: #8ca5d4;
  --on-primary: #1a1b1e;
  --accent: #f07340;
  --on-accent: #FFFFFF;
  --background: #25262b;
  --foreground: #e2e5eb;
  --muted: #2c2e33;
  --border: #373a40;
  --secondary: #a0aec0;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #f0f4fd;
  background-attachment: fixed;
  color: var(--foreground);
  font-family: 'Source Han Mono SC', 'PingFang SC', 'Microsoft YaHei', monospace, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
body.dark {
  background: #0d0f1a;
  background-attachment: fixed;
}

h1, h2, h3, h4, .brand-text, .hero-title {
  font-family: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}


/* Header - 首页悬浮，其他页白色实底 */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: background .3s, border-color .3s;
}
.site-header.scrolled,
body.page-inner .site-header {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  border-radius: var(--radius);
}
.brand-text { font-size: 18px; }
.header-nav a {
  color: var(--foreground);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}
.header-nav a:hover { border-bottom-color: var(--accent); }
/* 首页header悬浮时导航白色文字 */
.hero ~ * .site-header a,
.site-header:not(.scrolled):not(.page-inner *) .header-nav a { color: #fff; }
.site-header.scrolled .header-nav a,
body.page-inner .site-header .header-nav a { color: var(--foreground); }

/* ═══════════════════════════════════════════════════
   Hero — 深色沉浸 + 玻璃质感（方案B）
═══════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #050816 0%, #0d1035 35%, #130826 65%, #0a0d20 100%);
  padding: 108px 16px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
/* 发光光晕装饰 */
.hero-glow-1 {
  position: absolute;
  top: -80px; left: 15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.35) 0%, rgba(99,102,241,0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowFloat1 8s ease-in-out infinite;
}
.hero-glow-2 {
  position: absolute;
  top: 20px; right: 10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(168,85,247,0.28) 0%, rgba(168,85,247,0.06) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowFloat2 10s ease-in-out infinite;
}
.hero-glow-3 {
  position: absolute;
  bottom: -60px; left: 40%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(59,130,246,0.22) 0%, rgba(59,130,246,0.05) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowFloat3 12s ease-in-out infinite;
}
/* 细星点背景网格 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.4;
}
/* 底部过渡渐变 */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #f0f4fd);
  pointer-events: none;
}
body.dark .hero::after {
  background: linear-gradient(to bottom, transparent, #0d0f1a);
}
@keyframes glowFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px,-20px) scale(1.08); }
}
@keyframes glowFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-25px,18px) scale(1.05); }
}
@keyframes glowFloat3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(20px,-15px) scale(1.06); }
}
.hero-bg-decor { display: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-badge { display: none; }
.hero .container { width: 100%; }
/* 标题：渐变文字 */
.hero-title {
  font-size: 42px;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 40%, #a78bfa 70%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(139,92,246,0.4));
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
/* 浮动🔍图标 */
.hero-title-icon {
  display: inline-block;
  font-size: 0.85em;
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  filter: drop-shadow(0 0 12px rgba(167,139,250,0.7));
  animation: iconFloat 3s ease-in-out infinite;
  flex-shrink: 0;
  line-height: 1;
}
@keyframes iconFloat {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  40%      { transform: translateY(-8px) rotate(5deg); }
  70%      { transform: translateY(-4px) rotate(-2deg); }
}
.hero-sub {
  color: rgba(200,212,240,0.85);
  margin: 0 0 28px;
  font-size: 17px;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  min-height: 1.6em;
}
/* 打字机光标 */
.hero-sub::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: #a78bfa;
  animation: cursorBlink 0.75s step-end infinite;
  font-weight: 300;
}
.hero-sub.typing-done::after {
  animation: cursorBlink 1.2s step-end infinite;
  opacity: 0.5;
}
@keyframes cursorBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}
.hero-accent {
  color: #a78bfa;
  font-weight: 700;
}
/* 亮色模式下 hero 不启用 — 用 JS class 控制，默认深色 hero */
/* 搜索框 — 深色玻璃态（Hero区）*/
.search-wrap {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 0;
  gap: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.search-wrap:focus-within {
  border-color: rgba(167,139,250,0.6);
  box-shadow: 0 12px 48px rgba(139,92,246,0.25), 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.search-disk-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-disk-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 34px 0 20px;
  height: 54px;
  font-size: 14px;
  font-weight: 600;
  color: #c4b5fd;
  cursor: pointer;
  font-family: inherit;
  min-width: 108px;
  max-width: 124px;
}
.search-disk-select option { background: #1e1b4b; color: #e0e7ff; }
.search-disk-select:focus { outline: none; }
.search-disk-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 6px;
  color: #a78bfa;
  pointer-events: none;
  flex-shrink: 0;
}
.search-divider {
  width: 1px;
  height: 22px;
  background: rgba(167,139,250,0.35);
  flex-shrink: 0;
  margin: 0 2px;
}
.search-icon { display: none; }
.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: #f0f4ff;
  min-width: 0;
  padding: 16px 20px;
}
.search-wrap input::placeholder { color: rgba(200,210,240,0.5); transition: color .2s; }
.search-wrap input:focus::placeholder { color: rgba(200,210,240,0.3); }
.btn-search {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 40%, #4f46e5 80%, #3b82f6 100%) !important;
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 0 36px;
  height: 54px;
  margin: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 0.04em;
  box-shadow: 0 0 20px rgba(139,92,246,0.5);
}
.btn-search:hover { opacity: .93; box-shadow: 0 0 32px rgba(139,92,246,0.7); }
.btn-search:active { transform: scale(.97); }
/* 亮色模式下滚动后区域：搜索框恢复亮色（非 Hero 页面用，结果页/其他页复用） */
.page-inner .search-wrap,
body:not(.on-hero) .search-form input {
  background: rgba(255,255,255,0.96);
  border-color: #c7d7f5;
  color: #1a1a2e;
}
/* ===== 首页双栏：猜你喜欢 + 热门资源 ===== */
.home-dual-section { padding: 36px 0 48px; }
.home-dual-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
/* 无猜你喜欢时热门资源全宽单栏 */
.home-dual-wrap.home-dual-single {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 auto;
}
.home-dual-col { height: 100%; }
/* 手机端：上下堆叠 */
@media (max-width: 768px) {
  .home-dual-wrap {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}
/* 删除联想框样式，保留 kw-mark */
.kw-mark {
  background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
  color: #92400e;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
  font-weight: 700;
}
body.dark .kw-mark {
  background: linear-gradient(120deg, #ca8a04 0%, #a16207 100%);
  color: #fef9c3;
}
.today-title { color: #1a1a2e; }
.today-date  { color: #1a1a2e; }
.today-more  { color: #6d28d9; }
.today-more:hover { color: #4f46e5; }
.search-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.search-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}
.search-form input:focus { border-color: var(--primary); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: #2f3746; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: #b8400f; }
.btn-secondary { background: var(--muted); color: var(--foreground); }
.btn-secondary:hover { background: #e8e8e8; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover { background: var(--muted); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* Results */
.results-section { padding: 24px 0 64px; }
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.results-meta h2 { margin: 0; font-size: 20px; }
.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); }
.chip.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.site-group {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.site-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.site-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.status-dot.empty { background: #bbb; }
.status-dot.error { background: #c0392b; }
.site-status { font-size: 12px; color: #777; }

/* ===== 搜索结果卡片重构 ===== */
.result-card {
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeUp 0.22s ease-out;
  box-shadow: 0 4px 20px rgba(99,102,241,0.08), 0 1px 4px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.result-card:hover {
  box-shadow: 0 8px 32px rgba(139,92,246,0.18), 0 2px 8px rgba(0,0,0,0.06);
  border-color: rgba(139,92,246,0.38);
  transform: translateY(-2px);
}
.result-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--foreground);
  line-height: 1.4;
}
.result-snippet {
  font-size: 13px;
  color: #555;
  margin: 0 0 12px;
  line-height: 1.5;
}
.result-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}
.result-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.link-type {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
}
.link-url {
  font-size: 13px;
  color: var(--primary);
  word-break: break-all;
  min-width: 0;
}
.copy-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.report-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: #888;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.report-btn:hover { border-color: #f97316; color: #f97316; }

/* 操作按钮行（桌面端保持原来位置） */
.result-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-link-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* 桌面端：复制链接+反馈在 link-row 同行 */
@media (min-width: 521px) {
  .result-link-row + .result-actions {
    display: flex;
  }
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #777;
}
.empty-state h3 { margin: 0 0 8px; color: var(--foreground); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
  color: #777;
  text-align: center;
}

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 24px 0;
}
.admin-sidebar .brand {
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: var(--on-primary);
}
.admin-sidebar .brand-mark { background: var(--accent); }
.admin-nav { padding: 16px 0; }
.admin-nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.8);
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.08);
  color: var(--on-primary);
  border-left-color: var(--accent);
}
.admin-main {
  flex: 1;
  min-width: 0;
  padding: 32px;
  background: var(--muted);
}
.admin-main h1 { margin: 0 0 24px; font-size: 24px; }
.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-header h2 { margin: 0; font-size: 18px; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table th {
  font-weight: 600;
  color: var(--primary);
  background: var(--muted);
  white-space: nowrap;
}
.data-table td { word-break: break-all; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.badge-on { background: #e8f5e9; color: #1b5e20; }
.badge-off { background: #f5f5f5; color: #777; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.form-field input, .form-field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.form-field input:focus { border-color: var(--primary); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }

.login-page {
  display: flex;
  min-height: 100vh;
}
.login-side {
  flex: 1;
  background: var(--primary);
  color: var(--on-primary);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-side h1 { font-size: 28px; margin: 0 0 12px; }
.login-side p { color: rgba(255,255,255,0.75); line-height: 1.6; }
.login-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-form {
  width: 100%;
  max-width: 360px;
}
.login-form h2 { margin: 0 0 24px; font-size: 22px; }
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: #b71c1c; border: 1px solid #f5c6cb; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero { padding: 88px 16px 48px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-glow-1 { width: 300px; height: 300px; top: -40px; left: 0; }
  .hero-glow-2 { width: 260px; height: 260px; top: 10px; right: -20px; }
  .hero-glow-3 { width: 220px; height: 220px; bottom: -30px; left: 30%; }
  .today-glass-card { padding: 16px 14px; border-radius: 14px; }
  .search-wrap { max-width: 100%; border-radius: 999px; }
  .search-disk-wrap { flex-shrink: 0; }
  .search-disk-select { min-width: 84px; max-width: 94px; font-size: 13px; padding: 0 26px 0 14px; }
  .search-disk-arrow { width: 10px !important; height: 6px !important; right: 9px; }
  .search-wrap input { padding: 13px 10px; font-size: 14px; }
  .btn-search { padding: 0 18px; font-size: 14px; height: 46px; border-radius: 999px; margin: 4px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 20px; }
  .login-side { display: none; }
  .data-table-wrap { overflow-x: auto; }
}
/* ===== 手机端全面优化 ===== */
@media (max-width: 520px) {
  /* ---- 首页 Hero ---- */
  .hero { padding: 80px 16px 36px; }
  .hero-title { font-size: 24px; letter-spacing: -0.3px; margin-bottom: 8px; }
  .hero-sub { font-size: 13px; margin-bottom: 18px; padding: 0 4px; }
  .hero-glow-1, .hero-glow-2, .hero-glow-3 { opacity: 0.7; }

  /* ---- 搜索框（移动端专用，不改桌面端）---- */
  .search-wrap {
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(139,92,246,0.2);
    height: auto;
    min-height: 50px;
    align-items: stretch;
  }
  .search-disk-wrap {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    height: 50px;
  }
  .search-disk-select {
    min-width: 78px;
    max-width: 88px;
    font-size: 12px;
    padding: 0 24px 0 10px;
    height: 50px;
    line-height: 50px;
  }
  .search-disk-arrow {
    right: 7px !important;
    width: 10px !important;
    height: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    pointer-events: none;
  }
  .search-divider {
    width: 1px;
    height: 18px;
    margin: 0 1px;
    flex-shrink: 0;
    align-self: center;
  }
  .search-wrap input {
    padding: 0 10px;
    font-size: 14px;
    height: 50px;
    line-height: 50px;
  }
  .btn-search {
    padding: 0 16px;
    height: 42px;
    font-size: 14px;
    border-radius: 999px;
    margin: 4px;
    flex-shrink: 0;
  }
  .btn-search svg { display: none; }

  /* ---- 热门标签：横向滑动 ---- */
  .hot-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 4px 0 10px;
    margin-top: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hot-tags::-webkit-scrollbar { display: none; }
  .hot-tag {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 18px;
    white-space: nowrap;
  }

  /* ---- 今日资源 ---- */
  .today-section { padding: 24px 0 32px; }
  .today-title { font-size: 15px; }
  .today-grid { gap: 0; }
  .today-item { padding: 9px 0; }
  .today-link { font-size: 13px; }

  /* ---- 友情链接区域 ---- */
  .friendly-links-section { padding: 16px 0 28px; }
  .fl-header { gap: 12px; justify-content: center; }
  .fl-title { font-size: 12px; }
  .btn-link-apply { font-size: 12px; padding: 5px 13px; display: none !important; }
  .fl-list { gap: 8px; justify-content: center; padding: 0 12px; }
  .fl-item { font-size: 12px; padding: 5px 12px; }
  /* 热门资源：单列 + 只显示前6个（仅首页 home-today-section） */
  .home-today-section .today-grid { grid-template-columns: 1fr !important; }
  .home-today-section .today-grid .today-item:nth-child(n+7) { display: none !important; }

  /* ---- 投稿/想要页 ---- */
  .contrib-page { padding: 0 0 40px; background: #f5f6fa; }
  .contrib-card { padding: 18px 16px; border-radius: 10px; }
  .contrib-card-head { flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
  .contrib-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
  .contrib-title { font-size: 18px; }
  .contrib-desc { font-size: 12px; }
  .want-shortcut { margin-left: 0; width: 100%; justify-content: center; font-size: 12px; padding: 6px 10px; }

  /* ---- 投稿须知 ---- */
  .notice-box { padding: 12px 14px; font-size: 13px; }
  .notice-box ul { padding-left: 16px; line-height: 1.8; }

  /* ---- 标签选择器 ---- */
  .tag-picker-pills { padding: 10px 12px; gap: 6px; }
  .tag-pill { padding: 4px 11px; font-size: 12px; }
  .tag-input-wrap { flex-wrap: wrap; }
  .tag-input-wrap input { width: 100%; }

  /* ---- 验证码行 ---- */
  .captcha-row { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
  .captcha-row input[type="text"] { width: 100% !important; max-width: 100% !important; letter-spacing: 8px; font-size: 18px; text-align: center; }
  .captcha-row img { height: 44px !important; border-radius: 8px !important; }
  .captcha-row .captcha-refresh { font-size: 13px; }

  /* ---- 提交按钮区 ---- */
  .cf-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .btn-contrib, .btn-want-submit { width: 100%; text-align: center; padding: 13px; font-size: 15px; }
  .btn-link-back { text-align: center; font-size: 13px; }

  /* ---- 导航栏 ---- */
  .header-inner { height: 54px; }
  .header-nav { gap: 6px; }
  .header-nav a { padding: 6px 2px; font-size: 13px; }
  .nav-pill { padding: 5px 11px; font-size: 12px; font-weight: 700; border-radius: 16px; }

  /* ---- 结果卡片 ---- */
  .result-card { padding: 14px 14px 12px; border-radius: 12px; border-left: 3px solid var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
  .result-title { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
  .result-meta-row { gap: 5px; margin-top: 4px; }
  .badge-source { font-size: 11px; padding: 1px 7px; }
  .result-date { font-size: 11px; }
  .tag { font-size: 11px; }
  .result-bottom { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 10px; }
  .result-link-row { min-width: 0; }
  .result-link { min-width: 0; overflow: hidden; }
  .link-type { font-size: 11px; height: 22px; padding: 0 7px; border-radius: 4px; background: #eff6ff; color: #1d4ed8;
    font-weight: 600;
  }
  .link-url {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    min-width: 0;
    flex: 1;
  }
  /* 按钮行：复制(主) + 反馈(次) 并排铺满 */
  .result-actions { flex-direction: row; gap: 8px; }
  .copy-btn {
    flex: 1;
    height: 40px;
    font-size: 13px;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0;
  }
  .copy-btn:hover { background: #b83d0f; }
  .copy-btn.copied { background: #059669; }
  .report-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
    background: #f8f9fb;
    color: #888;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
  }
}

/* ===== 资源共享 / 审核 新增样式 ===== */
.share-section {
  padding: 48px 0 60px;
  background: #f8f9fb;
  border-top: 1px solid #eee;
}
.share-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; color: #3E4759; }
.share-desc  { color: #666; margin-bottom: 20px; }
.notice-box {
  background: #fff8f0;
  border: 1px solid #f0c070;
  border-left: 4px solid #D94E17;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}
.notice-box strong { display: block; margin-bottom: 8px; color: #c04010; }
.notice-box ul { margin: 0; padding-left: 20px; line-height: 2; color: #555; }
.share-form { max-width: 640px; }
.form-row   { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; color: #3E4759; margin-bottom: 6px; }
.form-row input[type="text"],
.form-row input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd;
  border-radius: 6px; font-size: 15px; box-sizing: border-box;
  transition: border-color .2s;
}
.form-row input:focus { outline: none; border-color: #D94E17; box-shadow: 0 0 0 3px rgba(217,78,23,.1); }
.form-hint  { font-size: 12px; color: #888; display: block; margin-top: 4px; }
.req        { color: #D94E17; }
.form-check label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-error   { background: #fff1f2; border: 1px solid #fca5a5; color: #991b1b; }
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-ok       { background:#dcfce7; color:#166534; }
.badge-pending  { background:#fef9c3; color:#854d0e; }
.badge-rejected { background:#fee2e2; color:#991b1b; }
.badge-disabled { background:#f1f5f9; color:#64748b; }
.btn-sm { padding: 4px 12px; font-size: 13px; }

/* ===== 新增样式 v3 ===== */

/* 导航共享按钮 */
.header-nav .btn-share-nav {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  margin-left: 8px;
  transition: background .2s;
}
.header-nav .btn-share-nav:hover { background: #b83d0f; color: #fff; }

/* 搜索框旁共享按钮 */
.btn-share {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff !important;
  padding: 0 20px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  height: 46px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .2s;
}
.btn-share:hover { background: #2e3547; }

/* 结果卡片元数据行 */
.result-card-top { margin-bottom: 10px; }
.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.badge-source {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-source.user  { background: #fef9c3; color: #854d0e; }
.badge-source.admin { background: #dbeafe; color: #1e40af; }
.result-date { font-size: 12px; color: #888; }
.tag { display:inline-block; background:#f1f5f9; color:#555; border-radius:4px; padding:1px 6px; font-size:12px; margin:1px; }

/* 可点击链接 */
.link-clickable {
  color: var(--accent) !important;
  word-break: break-all;
  text-decoration: none;
}
.link-clickable:hover { text-decoration: underline; }

/* 独立投稿页 */
.share-page { padding: 48px 0 64px; }
.share-container { max-width: 720px; }
.share-page-header { margin-bottom: 28px; }
.share-page-header h1 { font-size: 26px; margin: 0 0 8px; color: var(--primary); }
.share-page-header p  { color: #666; margin: 0; font-size: 15px; }

/* 返回按钮 */
.btn-back {
  display: inline-flex; align-items: center;
  background: #6b7280; color: #fff !important;
  padding: 8px 18px; border-radius: 5px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.btn-back:hover { background: #4b5563; }

/* ===== v4 新增样式 ===== */

/* 导航胶囊按钮 */
.nav-pill {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  margin-left: 6px;
  text-decoration: none !important;
  transition: opacity .2s, transform .15s;
}
.nav-pill:hover { opacity: .85; transform: translateY(-1px); }
.nav-pill-orange { background: var(--accent); color: #fff !important; }
.nav-pill-blue   { background: #2563eb;       color: #fff !important; }

/* 热门标签 — 半透明发光胶囊（Hero区深色背景） */
.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}
.hot-tags-label { display: none; }
.hot-tag {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 20px;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e0d4ff;
  text-shadow: none;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all .2s cubic-bezier(.25,.46,.45,.94);
  letter-spacing: 0.04em;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #e0d4ff !important;
  background-clip: unset !important;
  background-image: none !important;
}
.hot-tag:hover {
  background: rgba(167,139,250,0.25);
  border-color: rgba(167,139,250,0.75);
  color: #fff;
  -webkit-text-fill-color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* 今日资源区块 — 玻璃卡片 */
.today-section {
  padding: 36px 0 48px;
  background: transparent;
}
.home-today-section {
  position: relative;
  margin: 0 0 8px;
}
.today-glass-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(167,139,250,0.18);
  border-radius: 20px;
  padding: 24px 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(99,102,241,0.08), 0 1px 4px rgba(0,0,0,0.04);
}
.today-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.today-title {
  font-size: 18px;
  margin: 0;
  color: #1a1a1a;
  font-weight: 700;
}
.today-date {
  color: #1a1a1a;
  font-weight: 700;
  margin-right: 4px;
}
.today-more-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.today-order-sel {
  font-size: 12px;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 2px 8px;
  background: #fff;
  cursor: pointer;
  outline: none;
  height: 26px;
  font-family: inherit;
  transition: border-color .15s;
}
.today-order-sel:focus { border-color: #2563eb; }
.today-more {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
/* 全量资源页 */
.all-res-section { padding-top: 40px; }
.all-res-back {
  color: #6b7280;
  font-size: 20px;
  font-weight: 400;
  text-decoration: none;
  margin-right: 6px;
  vertical-align: middle;
  line-height: 1;
  transition: color .15s;
}
.all-res-back:hover { color: #2563eb; }
.all-res-count {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 8px;
  vertical-align: middle;
}
.all-res-order {
  display: flex;
  gap: 6px;
  align-items: center;
}
.all-res-order-btn {
  font-size: 12px;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 10px;
  text-decoration: none;
  background: #fff;
  transition: all .15s;
  white-space: nowrap;
}
.all-res-order-btn:hover { border-color: #2563eb; color: #2563eb; }
.all-res-order-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
/* 全量资源列表：强制单列 */
.all-res-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
.all-res-grid .today-item {
  display: flex;
  align-items: center;
  width: 100%;
}
.all-res-date {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
/* 夜间模式 */
body.dark .all-res-order-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #9ca3af; }
body.dark .all-res-order-btn:hover { border-color: #60a5fa; color: #60a5fa; }
body.dark .all-res-order-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
body.dark .all-res-count { color: #6b7280; }
.today-more:hover { text-decoration: underline; }
.today-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 28px;
}
/* 双栏首页内每列条目强制竖向排列（覆盖 repeat(3,1fr)，此处靠后确保优先级胜出） */
.home-dual-section .today-glass-card .today-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
/* 媒体查询必须在基础样式之后，否则会被覆盖 */
@media (max-width: 900px) {
  .today-grid { grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
}
@media (max-width: 480px) {
  .today-grid { grid-template-columns: 1fr; gap: 0; }
}
.today-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(100,120,200,0.1);
  border-radius: 8px;
  transition: background .15s, transform .15s;
}
.today-item:hover {
  background: rgba(109,40,217,0.06);
  transform: translateX(3px);
}
.today-num {
  font-size: 13px;
  font-weight: 700;
  color: #999;
  min-width: 28px;
  flex-shrink: 0;
}
/* 01-03 橙色，04-06 蓝色，其余灰色 */
.today-num.num-top-1 { color: #f97316; }
.today-num.num-top-2 { color: #eab308; }
.today-num.num-top-3 { color: #22c55e; }
.today-num.num-top-4 { color: #3b82f6; }
.today-num.num-top-5 { color: #0ea5e9; }
.today-num.num-top-6 { color: #8b5cf6; }
.today-link {
  font-size: 15px;
  color: #333;
  text-decoration: none;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.today-link:hover { color: #2563eb; }

/* 投稿/想要页布局 */
.contrib-page { padding: 36px 0 56px; background: #f5f6fa; min-height: calc(100vh - 64px); }
.contrib-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 768px) { .contrib-layout { grid-template-columns: 1fr; } }

.contrib-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.contrib-card + .contrib-card { margin-top: 16px; }
.contrib-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.contrib-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.contrib-icon.orange { background: #fff3ee; }
.contrib-icon.blue   { background: #eff6ff; }
.contrib-title { font-size: 22px; margin: 0 0 4px; color: #1a1a1a; }
.contrib-desc  { margin: 0; font-size: 13px; color: #888; }

/* 投稿表单 */
.contrib-form .cf-row { margin-bottom: 16px; }
.contrib-form .cf-row label {
  display: block; font-size: 13px; font-weight: 600;
  color: #3E4759; margin-bottom: 5px;
}
.contrib-form input[type="text"],
.contrib-form input[type="url"],
.contrib-form textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid #e0e4ed; border-radius: 7px;
  font-size: 14px; box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.contrib-form input:focus,
.contrib-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,78,23,.1);
}
.cf-hint  { font-size: 12px; color: #999; margin-top: 4px; display: block; }
.cf-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .cf-row-2col { grid-template-columns: 1fr; } }
.cf-check label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer; color: #555;
}
.cf-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.cf-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px;
}
.btn-contrib {
  padding: 11px 28px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 7px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-contrib:hover { background: #b83d0f; transform: translateY(-1px); }
.btn-link-back { font-size: 13px; color: #888; text-decoration: none; }
.btn-link-back:hover { color: var(--accent); }

/* 想要资源侧边卡片 */
.want-intro { font-size: 14px; color: #555; line-height: 1.7; margin: 0 0 14px; }
.want-tips {
  list-style: none; padding: 0; margin: 0 0 20px;
  font-size: 13px; color: #666;
}
.want-tips li { padding: 5px 0; border-bottom: 1px dashed #f0f0f0; }
.want-tips li:last-child { border-bottom: none; }
.btn-want-big {
  display: block; text-align: center;
  padding: 12px; background: #2563eb; color: #fff !important;
  border-radius: 8px; font-weight: 700; font-size: 14px;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-want-big:hover { background: #1d4ed8; transform: translateY(-1px); }
.tips-card h3 { font-size: 14px; margin: 0 0 12px; color: #3E4759; }

/* 想要资源提交按钮 */
.btn-want-submit {
  padding: 11px 28px;
  background: #2563eb; color: #fff;
  border: none; border-radius: 7px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.btn-want-submit:hover { background: #1d4ed8; }
.want-notice-row {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: #888;
}
.want-notice-row strong { color: var(--accent); }

/* ===== v5 新增样式 ===== */

/* ---- 友情链接 ---- */
.friendly-links-section {
  background: transparent;
  padding: 20px 0 36px;
  border-top: 1px solid rgba(100,130,200,0.15);
}
/* 友情链接移动端：只隐藏申请友联按钮，区域正常显示 */
@media (max-width: 768px) {
  .friendly-links-section .btn-link-apply { display: none !important; }
}
.fl-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.fl-title {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}
.btn-link-apply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #4b6cb7 0%, #7c3aed 100%);
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(75,108,183,0.35);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  white-space: nowrap;
}
.btn-link-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(75,108,183,0.45);
  opacity: .92;
}
.btn-link-apply:active { transform: translateY(0); }
/* 申请友联弹框 */
.la-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(10,14,30,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: laFadeIn .2s ease;
}
@keyframes laFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes laSlideUp { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.la-box {
  background: #fff;
  border-radius: 18px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.1);
  overflow: hidden;
  animation: laSlideUp .25s cubic-bezier(.22,.68,0,1.2);
}
.la-header {
  background: linear-gradient(135deg, #4b6cb7 0%, #7c3aed 100%);
  padding: 24px 24px 20px;
  position: relative;
}
.la-header-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.la-header-icon svg { width: 22px; height: 22px; color: #fff; }
.la-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
  line-height: 1.3;
}
.la-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,.72);
  margin: 0;
}
.la-close {
  position: absolute; top: 14px; right: 16px;
  background: rgba(255,255,255,.18); border: none;
  width: 28px; height: 28px; border-radius: 50%;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  transition: background .15s;
}
.la-close:hover { background: rgba(255,255,255,.32); }
.la-result {
  margin: 14px 24px 0;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.la-ok  { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.la-err { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.la-body { padding: 6px 24px 0; }
.la-field { padding-top: 16px; }
.la-field label {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 7px;
}
.la-field label svg { width: 14px; height: 14px; color: #7c3aed; }
.la-req { color: #e53e3e; margin-left: 1px; }
.la-field input {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px; outline: none;
  background: #f9fafb;
  color: #111;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.la-field input:focus {
  border-color: #7c3aed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.la-footer {
  padding: 20px 24px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.la-tip {
  font-size: 11px; color: #9ca3af; margin: 0; flex: 1;
  display: flex; align-items: center; gap: 4px;
}
.la-submit {
  background: linear-gradient(135deg, #4b6cb7 0%, #7c3aed 100%);
  color: #fff; border: none;
  padding: 10px 26px; border-radius: 24px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(124,58,237,.35);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}
.la-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124,58,237,.45); }
.la-submit:active { transform: translateY(0); }
.la-submit:disabled { opacity: .55; cursor: default; transform: none; }
/* 回到顶部 */
.back-to-top {
  position: fixed; right: 20px; bottom: 28px; z-index: 999;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #4b6cb7 0%, #7c3aed 100%);
  color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(75,108,183,.4);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, box-shadow .2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { box-shadow: 0 6px 22px rgba(124,58,237,.55); transform: translateY(-2px); }
.back-to-top svg { width: 20px; height: 20px; }
.fl-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.fl-item {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(100,140,220,0.25);
  border-radius: 4px;
  font-size: 13px;
  color: #4b6cb7 !important;
  text-decoration: none;
  transition: all .15s;
}
.fl-item:hover {
  background: #fff;
  border-color: #4b6cb7;
  color: #1e40af !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.results-section,
.today-section {
  padding-top: 28px;
}
.brand-text  { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .02em; }
.brand       { text-decoration: none; }

/* Hero 背景图片叠加层 */
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
}

/* Hero 有背景图时的样式覆盖 */
.hero.hero-has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero.hero-has-bg .hero-title,
.hero.hero-has-bg .hero-sub,
.hero.hero-has-bg .hot-tag {
  background-color: rgba(255,255,255,0.82);
  border-color: rgba(255,255,255,0.55);
  /* 保持渐变字体，不用 color 覆盖 */
}
.hero.hero-has-bg .hot-tag {
  background-color: rgba(255,255,255,0.82);
  border-color: rgba(255,255,255,0.55);
}
.hero.hero-has-bg .hot-tag:hover {
  background-color: #fff;
  border-color: #d1d5db;
}

/* 标签选择器 - 人性化版 */
.tag-picker { margin-top: 4px; }
.tag-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fdf4ff 0%, #eff6ff 100%);
  border: 1.5px dashed #c4b5fd;
  border-radius: 10px;
}
.tag-picker-pills::before {
  content: '点击选择标签：';
  display: block;
  width: 100%;
  font-size: 11px;
  color: #7c3aed;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px;
  background: #fff;
  border: 1.5px solid #ddd6fe;
  border-radius: 20px;
  font-size: 13px;
  color: #5b21b6;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
  font-weight: 500;
}
.tag-pill:hover  { background: #f5f3ff; border-color: #7c3aed; color: #5b21b6; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(124,58,237,0.15); }
.tag-pill.active { background: #7c3aed; border-color: #7c3aed; color: #fff; box-shadow: 0 2px 8px rgba(124,58,237,0.3); }
.tag-pill.active::before { content: '✓ '; }
.tag-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tag-input-wrap input {
  flex: 1;
  border: 1.5px solid #ddd6fe;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #4c1d95;
  background: #fdf4ff;
  outline: none;
  transition: border-color .15s;
}
.tag-input-wrap input:focus { border-color: #7c3aed; background: #fff; }
.tag-clear-btn {
  padding: 7px 14px;
  font-size: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.tag-clear-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* 想要资源顶部快捷入口 */
.want-shortcut {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.want-shortcut:hover { background: #dbeafe; }

/* 想要资源成功提示框 */
.want-success-box {
  text-align: center;
  padding: 32px 24px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  margin: 8px 0;
}
.want-success-icon { font-size: 48px; margin-bottom: 12px; }
.want-success-box h3 { font-size: 20px; margin: 0 0 8px; color: #166534; }
.want-success-box p  { font-size: 14px; color: #15803d; margin: 0; }

/* 想要资源类型列表 */
.want-type-list { margin: 0 0 4px; }
.want-type-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
  color: #555;
  border-bottom: 1px dashed #f0f0f0;
}
.want-type-item:last-child { border-bottom: none; }
.want-type-item span { font-size: 16px; }

/* ===== 导航增强 ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-home-link {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-home-link:hover { border-bottom-color: var(--accent); }
/* 首页header透明时 brand 白色 */
body:not(.page-inner) .site-header:not(.scrolled) .brand-text,
body:not(.page-inner) .site-header:not(.scrolled) .nav-home-link { color: #fff; }
body:not(.page-inner) .site-header:not(.scrolled) .brand-mark { background: rgba(255,255,255,0.25); }

/* ===== 手机端导航修复 ===== */
@media (max-width: 520px) {
  .header-inner { padding: 0 14px; height: 52px; }
  /* 品牌名：手机端隐藏 */
  .brand { display: none !important; }
  /* 显示"首页"文字链接 */
  .nav-home-link { display: block !important; }
  /* 导航占满整行，不换行 */
  .header-nav { width: 100%; gap: 6px; flex-wrap: nowrap; align-items: center; justify-content: flex-end; }
  /* pill 按钮紧凑化 */
  .nav-pill { padding: 5px 10px; font-size: 12px; border-radius: 16px; }
  /* 手机端隐藏夜间模式开关 */
  .theme-toggle { display: none !important; }
  /* 热门标签：覆盖后面全局 flex-wrap:wrap，强制横向滑动单行 */
  .hot-tags {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 8px;
    padding: 4px 0 10px;
    margin-top: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hot-tags::-webkit-scrollbar { display: none; }
  .hot-tag {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* ===== 深色模式适配 ===== */

/* 主题切换按钮 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  font-size: 16px;
  line-height: 34px;
  transition: background .2s, border-color .2s, transform .15s;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
  /* 固定尺寸防止 emoji 变化时引起 layout shift */
  min-width: 34px;
  min-height: 34px;
}
.theme-toggle:hover { background: rgba(255,255,255,0.22); transform: rotate(20deg); }
body.page-inner .site-header .theme-toggle,
body.dark .site-header.scrolled .theme-toggle,
body.page-inner .site-header.scrolled .theme-toggle {
  border-color: var(--border);
  background: var(--muted);
}
body.page-inner .site-header .theme-toggle:hover { background: var(--border); }

/* 导航栏深色 */
body.dark .site-header.scrolled,
body.dark.page-inner .site-header {
  background: rgba(30,31,38,0.97);
  border-bottom-color: var(--border);
}
body.dark .site-header:not(.scrolled) {
  background: rgba(26,27,34,0.2);
}

/* 搜索框深色 */
body.dark .search-wrap {
  background: rgba(44,46,54,0.96);
  border-color: rgba(74,79,94,0.8);
  box-shadow: 0 6px 32px rgba(0,0,0,0.4);
}
body.dark .search-wrap input { color: var(--foreground); }
body.dark .search-wrap input::placeholder { color: #6b7280; }
body.dark .btn-search { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important; }
body.dark .search-disk-select { color: #c4b5fd; }
body.dark .search-disk-arrow { color: #a78bfa; }
body.dark .search-divider { background: rgba(167,139,250,0.35); }

/* 热门标签深色 — 已统一用发光胶囊，body.dark 下保持一致 */
body.dark .hero-title {
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 40%, #a78bfa 70%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(139,92,246,0.5));
}
body.dark .hero-sub {
  color: rgba(200,212,240,0.85) !important;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
body.dark .hero-accent {
  color: #a78bfa !important;
}
body.dark .hot-tag {
  background: rgba(60, 50, 90, 0.85) !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  border-color: rgba(167,139,250,0.6) !important;
  color: #e8ddff !important;
  -webkit-text-fill-color: #e8ddff !important;
}
body.dark .hot-tag:hover {
  background: rgba(100, 70, 180, 0.5) !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  border-color: rgba(167,139,250,0.9) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* 结果卡片深色 — 玻璃质感 */
body.dark .result-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(139,92,246,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
body.dark .result-card:hover {
  border-color: rgba(167,139,250,0.5);
  box-shadow: 0 8px 36px rgba(139,92,246,0.22), 0 2px 8px rgba(0,0,0,0.3);
}
body.dark .result-title { color: var(--foreground); }
body.dark .link-type { background: #373a40; color: #93c5fd; }
body.dark .link-clickable { color: #60a5fa !important; }
body.dark .badge-source.admin { background: #1e3a5f; color: #93c5fd; }
body.dark .badge-source.user  { background: #3d2e00; color: #fbbf24; }
body.dark .result-date { color: #6b7280; }
body.dark .tag {
  background: #4a4d55 !important;
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}
body.dark .copy-btn {
  background: var(--background);
  border-color: var(--border);
  color: var(--foreground);
}
body.dark .copy-btn:hover { border-color: var(--accent); color: var(--accent); }
body.dark .copy-btn.copied { background: #059669; border-color: #059669; color: #fff; }
body.dark .report-btn { background: #2c2e33; border-color: var(--border); color: #6b7280; }
body.dark .report-btn:hover { border-color: #f97316; color: #f97316; }
body.dark .filter-group .chip { background: var(--muted); border-color: var(--border); color: var(--foreground); }
body.dark .filter-group .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
body.dark .empty-state { color: #6b7280; }

/* 今日资源深色 — 玻璃卡片 */
body.dark .today-glass-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(167,139,250,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
body.dark .today-item { border-bottom-color: rgba(255,255,255,0.06); }
body.dark .today-date { color: #60a5fa; }
body.dark .today-title { color: #60a5fa; }
body.dark .today-link { color: #c9d1d9; }
body.dark .today-link:hover { color: #a78bfa; }

/* 投稿/想要页深色 */
body.dark .contrib-page { background: #1a1b1e; }
body.dark .contrib-card {
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
body.dark .contrib-title { color: var(--foreground); }
body.dark .contrib-desc { color: #6b7280; }
body.dark .contrib-form input,
body.dark .contrib-form textarea {
  background: #2c2e33;
  border-color: var(--border);
  color: var(--foreground);
}
body.dark .contrib-form input:focus,
body.dark .contrib-form textarea:focus { border-color: var(--accent); }
body.dark .contrib-form input::placeholder,
body.dark .contrib-form textarea::placeholder { color: #4b5563; }
body.dark .cf-row label { color: #c9d1d9; }
body.dark .cf-hint { color: #6b7280; }
body.dark .notice-box {
  background: #2a1f10;
  border-color: #7c4a1e;
  border-left-color: var(--accent);
}
body.dark .notice-box strong { color: #fbbf24; }
body.dark .notice-box ul { color: #a0aec0; }
body.dark .alert-success { background: #052e16; border-color: #166534; color: #86efac; }
body.dark .alert-error   { background: #2d0d0d; border-color: #7f1d1d; color: #fca5a5; }
body.dark .want-success-box { background: #052e16; border-color: #166534; }
body.dark .want-success-box h3 { color: #86efac; }
body.dark .want-success-box p { color: #4ade80; }
body.dark .want-type-item { border-bottom-color: #373a40; color: #a0aec0; }
body.dark .want-tips li { border-bottom-color: #373a40; color: #a0aec0; }
body.dark .tag-picker-pills { background: linear-gradient(135deg,#2a1f3d,#1e2030); border-color: #5b21b6; }
body.dark .tag-pill { background: #2c2e33; border-color: #4c1d95; color: #c4b5fd; }
body.dark .tag-pill:hover { background: #3b2d6e; }
body.dark .tag-pill.active { background: #7c3aed; color: #fff; }
body.dark .tag-input-wrap input { background: #2c2e33; border-color: #4c1d95; color: #c4b5fd; }
body.dark .tag-clear-btn { background: #2c2e33; border-color: var(--border); color: #6b7280; }
body.dark .want-shortcut { background: #1e2d4f; border-color: #2a4a7f; color: #60a5fa !important; }
body.dark .btn-contrib { background: var(--accent); }
body.dark .btn-want-submit { background: #2563eb; }
body.dark .cf-check label { color: #a0aec0; }
body.dark .btn-link-back { color: #6b7280; }
body.dark .btn-link-back:hover { color: var(--accent); }
body.dark .captcha-row img { border-color: var(--border) !important; }
body.dark input[type="text"].captcha-input { background: #2c2e33; border-color: var(--border) !important; color: var(--foreground); }

/* 友情链接深色 */
body.dark .fl-item { background: rgba(44,46,54,0.8); border-color: rgba(100,140,220,0.2); color: #7eb3ff !important; }
body.dark .fl-item:hover { background: #2c3a5a; border-color: #4b6cb7; }
body.dark .friendly-links-section { border-top-color: rgba(255,255,255,0.06); }
body.dark .fl-title { color: #4b5563; }
body.dark .btn-link-apply { opacity: .85; }
body.dark .btn-link-apply:hover { opacity: 1; }
body.dark .la-box { background: #1e2030; }
body.dark .la-field input { background: #25262b; border-color: #3a3c44; color: #e2e5eb; }
body.dark .la-field input:focus { border-color: #7c3aed; background: #2a2b3a; box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
body.dark .la-field label { color: #a0a8b8; }
body.dark .la-tip { color: #6b7280; }

/* Footer 深色 */
body.dark .site-footer { border-top-color: var(--border); color: #4b5563; }
body.dark .site-footer a { color: #6b7280; }

/* 筛选/标签行深色 */
body.dark .results-meta h2 { color: var(--foreground); }
body.dark .results-meta small { color: #6b7280; }

/* 平滑过渡 */
.result-card, .contrib-card, .site-header, .search-wrap,
.hot-tag, .copy-btn, .report-btn, .theme-toggle,
.contrib-form input, .contrib-form textarea,
.today-item, .fl-item {
  transition: background-color .25s, border-color .25s, color .2s, box-shadow .25s;
}

/* ============================================================
   终极覆盖：放在文件最末尾，优先级高于所有前面的规则
   ============================================================ */

/* 1. 双栏布局：today-grid-single 强制单列（HTML里实际用的是这个类名） */
.today-grid-single {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  display: grid !important;
}

/* 2. 夜间模式热门词标签（.hot-tag）文字强制可见 */
body.dark .hot-tag,
body.dark .hot-tag:link,
body.dark .hot-tag:visited {
  background: #3b2f6e !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #e8ddff !important;
  color: #e8ddff !important;
  border-color: rgba(167,139,250,0.7) !important;
}
body.dark .hot-tag:hover {
  background: #5b3fa8 !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
}
