/* Links.php — 仅排版；配色跟随全站深色主题（style.css 变量） */
.main.links-page {
  /* 不覆盖主区背景，沿用 body 深色 */
  color: var(--text);
}
/* 宽屏：占满主栏宽度，不再收窄到 1100px */
.links-site-detail {
  width: 100%;
  max-width: none;
  margin: 0;
}
.links-hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  padding: 20px 22px 22px;
  margin-bottom: 16px;
}
.links-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.links-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
}
.links-breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}
.links-breadcrumb a:hover {
  color: var(--primary);
}
.links-breadcrumb .sep {
  margin: 0 6px;
  color: var(--text-muted);
}
.links-fav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #ff7675;
  background: rgba(255, 118, 117, 0.1);
  border: 1px solid rgba(255, 118, 117, 0.28);
  text-decoration: none;
}
.links-fav-pill:hover {
  background: rgba(255, 118, 117, 0.16);
}
.links-hero-body {
  display: grid;
  /* 宽屏：预览区不超过 50% */
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
}
.links-hero-main {
  min-width: 0;
}
.links-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.links-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.links-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.links-meta-row i {
  color: var(--text-muted);
}
.links-lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 14px;
}
.links-sub-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.links-sub-line strong {
  color: var(--text-dim);
  font-weight: 600;
}
.links-seo-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.links-seo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.links-seo-badge.b-blue {
  background: #5b8ff9;
}
.links-seo-badge.b-orange {
  background: #ff9f43;
}
.links-seo-badge.b-green {
  background: #52c41a;
}
.links-seo-badge.b-teal {
  background: #13c2c2;
}
.links-seo-badge.b-red {
  background: #ff4d4f;
}
.links-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.links-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e84118, #ff6b4a);
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(232, 65, 24, 0.35);
}
.links-btn-primary:hover {
  filter: brightness(1.05);
  color: #fff;
}
.links-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  color: #ff7675;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 118, 117, 0.4);
  text-decoration: none;
}
.links-btn-outline:hover {
  background: rgba(255, 118, 117, 0.1);
  color: #ff9f9e;
}
.links-btn-shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 65, 24, 0.4);
  cursor: pointer;
  font-size: 18px;
}
.links-btn-shield:hover {
  background: rgba(232, 65, 24, 0.12);
}
.links-pastel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.links-pastel-tags .pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.links-pill-blue {
  background: rgba(91, 143, 249, 0.18);
  color: #7eb0ff;
}
.links-pill-pink {
  background: rgba(255, 105, 180, 0.15);
  color: #ff8cc8;
}
.links-pill-green {
  background: rgba(82, 196, 26, 0.15);
  color: #95de64;
}
.links-pill-orange {
  background: rgba(255, 159, 67, 0.16);
  color: #ffc069;
}
.links-pill-purple {
  background: rgba(114, 46, 209, 0.2);
  color: #b37feb;
}
.links-pill-cyan {
  background: rgba(19, 194, 194, 0.16);
  color: #5cdbd3;
}
.links-hero-preview {
  background: #0a0c10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.links-hero-preview img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.links-summary-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  padding: 14px 20px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
  text-align: left;
}
.links-stats-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  padding: 12px 16px 14px;
  margin-bottom: 20px;
}
.links-stats-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.links-stats-head i {
  color: #7eb0ff;
}
.links-chart-wrap {
  width: 100%;
  height: clamp(180px, 20vw, 240px);
  min-height: 180px;
}
@media (min-width: 1600px) {
  .links-chart-wrap {
    height: 260px;
  }
}
/* LinksList.php 归档标题（与莫卿分类页：大标题 + 篇数） */
.links-archive-head {
  margin-bottom: 4px;
}
.links-archive-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.links-archive-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.links-list-end {
  text-align: center;
  padding: 20px 12px 8px;
  font-size: 13px;
  color: var(--text-muted);
}
/* 相关导航：恢复全站 rec-card 默认深色样式，不强制浅色 */
.links-related-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
@media (max-width: 960px) {
  .links-hero-body {
    grid-template-columns: 1fr;
  }
  .links-hero-preview {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  .links-chart-wrap {
    height: 200px;
  }
}
/* ========== LinksList.php 专用：图片模式（左图 + 文案 + 右箭头），不影响其它 resource 页 ========== */
.resource-page.links-list-image-mode {
  padding: 24px 22px 40px;
  overflow: visible;
}
.links-list-image-mode .links-archive-head {
  margin-bottom: 8px;
}
.links-list-image-mode .links-archive-meta {
  margin-bottom: 22px;
}
.links-list-image-mode .resource-toolbar {
  margin-bottom: 26px;
}
/* 卡片最小宽度（提高后少列、单行文案更不易被裁切；窄屏仍单列铺满） */
.links-list-image-mode .resource-grid.links-list-resource-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px 12px;
  margin-top: 2px;
  margin-bottom: 4px;
}
.links-list-image-mode .resource-card.links-list-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 14px 14px 16px;
  min-height: auto;
  position: relative;
  z-index: 1;
}
.links-list-image-mode .resource-card.links-list-card:hover {
  z-index: 2000;
}
.links-list-image-mode .links-list-card__row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.links-list-image-mode .links-list-card__main {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.links-list-image-mode .links-list-card__body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.links-list-image-mode .resource-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  margin: 0;
  border-radius: 12px;
}
.links-list-image-mode .resource-card-title {
  display: block;
  text-align: left;
  min-height: 0;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.links-list-image-mode .resource-card-desc {
  display: block;
  text-align: left;
  min-height: 0;
  min-width: 0;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.35;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
/* 标签单行横排：能摆下几个显示几个，其余被右侧裁掉，不换行 */
.links-list-image-mode .resource-card-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
  overflow: hidden;
  max-height: none;
}
.links-list-image-mode .resource-card-tags .tag-pill {
  flex: 0 0 auto;
  white-space: nowrap;
}
.links-list-image-mode .resource-card-stats {
  top: 8px;
  right: 48px;
  max-width: calc(100% - 120px);
  font-size: 10px;
}
.links-list-image-mode .links-list-card__go {
  flex-shrink: 0;
  width: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 32px;
  position: relative;
  cursor: pointer;
}
.links-list-card__go--top{z-index:20}
.links-pastel-tags--spaced{margin-bottom:10px}

/* QR Code Modal */
.qr-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}
.qr-modal.active {
  display: flex;
}
.qr-modal-content {
  background: var(--card-bg, #1a1d26);
  border: 1px solid var(--border, #2a2e3a);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
}
.qr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #fff);
}
.qr-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted, #8b92a8);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
}
.qr-modal-close:hover {
  color: var(--primary, #ff6b4a);
}
.qr-modal-body #qrcode {
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  display: inline-block;
}
.qr-modal-body #qrcode img {
  display: block;
}
.qr-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted, #8b92a8);
}

/* Feedback Modal */
.feedback-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}
.feedback-modal.active {
  display: flex;
}
.feedback-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.feedback-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.feedback-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
}
.feedback-modal-close:hover {
  color: #ff6b4a;
}
.feedback-modal-body {
  padding: 20px;
}
.feedback-hint {
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #096dd9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feedback-hint i {
  color: #1890ff;
}
.feedback-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.feedback-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: all 0.2s;
}
.feedback-option:hover {
  border-color: #ff6b4a;
  background: #fff5f5;
}
.feedback-option input[type="radio"] {
  margin: 0;
}
.feedback-option input[type="radio"]:checked + span {
  color: #ff6b4a;
  font-weight: 500;
}
.feedback-option:has(input:checked) {
  border-color: #ff6b4a;
  background: #fff5f5;
}
.feedback-note {
  width: 100%;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
  margin-bottom: 16px;
  font-family: inherit;
}
.feedback-note:focus {
  outline: none;
  border-color: #ff6b4a;
}
.feedback-submit {
  width: 100%;
  padding: 12px;
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.feedback-submit:hover {
  background: #ff7875;
}
.feedback-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.links-list-image-mode .links-list-card__go::after {
  /* 复用首页 hover “详情”气泡效果：仅绝对定位，不改变原布局 */
  content: "详情";
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  height: 24px;
  padding: 0 10px 0 14px;
  background: #fb0000;
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  z-index: 3001;
  transition: opacity .15s ease;
}
.links-list-image-mode .resource-card:hover .links-list-card__go::after,
.links-list-image-mode .links-list-card__go:hover::after,
.links-list-image-mode .resource-card:focus-visible .links-list-card__go::after {
  opacity: 1;
}
.links-list-image-mode .resource-card:hover .links-list-card__go {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(232, 65, 24, 0.35);
  background: rgba(232, 65, 24, 0.08);
}
@media (max-width: 560px) {
  .links-list-image-mode .resource-card-stats {
    right: 44px;
    max-width: 52%;
  }
}
