/* FriendLinkWidget.css
 * 友链展示组件样式
 * 命名空间: .widget-friendlink（避免污染站点级 .dongxun_link）
 */

/* —— 容器：与站点级友链区一致（暗色块） —— */
.widget-friendlink {
  padding: 30px 0 50px 0;
  background: #1E293F;
  border-bottom: 1px solid #4b5054;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: rgba(255, 255, 255, 0.85);
}

.widget-friendlink.empty {
  background: transparent;
  padding: 24px;
  text-align: center;
  color: #999;
  border: 1px dashed #e5e7eb;
  margin: 0 auto;
  max-width: 600px;
  border-radius: 6px;
}

/* —— 内层（保持 78.13vw / 92% 宽度节奏跟站点一致） —— */
.widget-friendlink .passed {
  width: 78.13vw;
  margin: 0 auto;
  max-width: 92%;
  position: relative;
  font-size: 14px;
}

/* —— header 行：标题在左、更多/申请友链在右 —— */
.widget-friendlink .link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-friendlink .link-header > span {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 14px;
}

.widget-friendlink .link-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* —— 按钮：更多 / 申请友链 —— */
.widget-friendlink .link-more-btn,
.widget-friendlink .apply-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget-friendlink .link-more-btn:hover,
.widget-friendlink .apply-link-btn:hover {
  color: #ff7300;
}

/* "更多"按钮在无 hidden 数据时为 disabled 态：视觉灰显、不响应点击 */
.widget-friendlink .link-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.widget-friendlink .link-more-btn:disabled:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* —— 链接容器 —— */
.widget-friendlink .links-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-friendlink .links-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 30px;
}

.widget-friendlink .links-grid a {
  line-height: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget-friendlink .links-grid a:hover {
  color: #ff7300;
}

/* —— 展开段：始终展示 —— */
.widget-friendlink .links-grid.hidden-links {
  display: flex;
}

/* —— 高亮入口："更多链接"—— */
.widget-friendlink .links-grid .highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(255, 115, 0, 0.15);
  color: #ff7300;
}

.widget-friendlink .links-grid .highlight-link:hover {
  background: rgba(255, 115, 0, 0.25);
  color: #ff7300;
}

.widget-friendlink .links-grid .highlight-link .link-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff7300;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
}

/* —— 响应式（移动端） —— */
@media (max-width: 768px) {
  .widget-friendlink {
    padding: 20px 0 30px 0;
  }
  .widget-friendlink .link-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .widget-friendlink .links-grid {
    gap: 0 16px;
  }
}

/* —— 单个友链条目：图标 + 名称 —— */
.widget-friendlink .links-grid a.flw-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.widget-friendlink .links-grid a.flw-item .flw-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* 404 页面样式（原 NotFound.tsx 内联 \3c style>，迁移为外部 CSS） */
.nf-root {
  /* 全屏铺满，不依赖父级容器的高度 —— 永远 100% 视口 */
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 32px 20px;
  background:
    radial-gradient(900px 500px at 50% -10%, #dbeafe 0%, transparent 60%),
    radial-gradient(700px 500px at 100% 110%, #fce7f3 0%, transparent 55%),
    linear-gradient(180deg, #eff6ff 0%, #ffffff 60%, #fef6ff 100%);
  font-family: inherit;
  opacity: 0;
  transition: opacity .4s ease;
}
.nf-root.in { opacity: 1; }

.nf-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  pointer-events: none;
  animation: nf-float 14s ease-in-out infinite;
}
.nf-blob.b1 { width: 340px; height: 340px; background: #93c5fd; top: -80px;  left: -80px;  }
.nf-blob.b2 { width: 300px; height: 300px; background: #c4b5fd; bottom: -60px; right: -60px; animation-delay: -5s; }
.nf-blob.b3 { width: 240px; height: 240px; background: #fda4af; top: 50%; left: 60%; animation-delay: -9s; opacity:.4; }

.nf-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 28px;
  padding: 56px 56px 44px;
  width: min(580px, 94vw);
  text-align: center;
  box-shadow:
    0 30px 80px -25px rgba(59, 130, 246, .22),
    0 12px 32px -12px rgba(99, 102, 241, .18),
    inset 0 1px 0 rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.7);
  animation: nf-rise .65s cubic-bezier(.2,.9,.3,1) both;
}

.nf-big {
  font-size: 150px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  letter-spacing: -8px;
  margin: 4px 0 6px;
  user-select: none;
}
.nf-big .d {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 18px rgba(79,70,229,.25));
  transition: transform .35s cubic-bezier(.2,.9,.3,1);
  display: inline-block;
}
.nf-big .d:nth-child(1):hover { transform: translateY(-6px) rotate(-4deg); }
.nf-big .d:nth-child(3):hover { transform: translateY(-6px) rotate(4deg); }

.nf-orbit {
  display: inline-flex;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #c084fc 100%);
  box-shadow:
    0 16px 36px -10px rgba(79,70,229,.45),
    inset 0 1px 0 rgba(255,255,255,.55);
  position: relative;
  animation: nf-spin 18s linear infinite;
}
.nf-orbit::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(99,102,241,.35);
}
.nf-rocket {
  animation: nf-bob 2.8s ease-in-out infinite;
  transform-origin: center;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.18));
}
.nf-spark {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  animation: nf-twinkle 2s ease-in-out infinite;
}
.nf-spark.s1 { top: 12px; left: 18px; background: #fde047; box-shadow: 0 0 10px 2px #fef3c7; }
.nf-spark.s2 { top: 24px; right: 12px; background: #f9a8d4; box-shadow: 0 0 10px 2px #fce7f3; animation-delay: 1s; }

h1.nf-title {
  margin: 22px 0 10px;
  font-size: 26px;
  color: #111827;
  font-weight: 700;
  letter-spacing: .5px;
}
.nf-desc {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
  margin: 6px 0;
  word-break: break-word;
}
.nf-chip {
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #e0e7ff;
  color: #4338ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.nf-hint {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.6;
}
.nf-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.nf-actions .ant-btn {
  min-width: 130px;
  height: 42px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nf-actions .ant-btn:hover { transform: translateY(-2px); }
.nf-actions .ant-btn-primary {
  box-shadow: 0 8px 20px -6px rgba(59,130,246,.55);
}
.nf-footer {
  margin-top: 24px;
  font-size: 12px;
  color: #cbd5e1;
  letter-spacing: 1px;
}

@keyframes nf-rise {
  from { opacity: 0; transform: translateY(28px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes nf-float {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(28px,-22px); }
}
@keyframes nf-spin { to { transform: rotate(360deg); } }
@keyframes nf-bob {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50%      { transform: translateY(-6px) rotate(12deg); }
}
@keyframes nf-twinkle {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

@media (max-width: 480px) {
  .nf-card { padding: 40px 22px 36px; border-radius: 22px; }
  .nf-big  { font-size: 110px; letter-spacing: -6px; }
  .nf-orbit { width: 92px; height: 92px; }
  h1.nf-title { font-size: 22px; }
}

/* T135 用户要求彻底删除所有 .banner 相关 CSS，重启也不要恢复。
 * 保留空文件避免 HeroCarouselWidget.tsx:4 的 import 报错。
 * 如果将来要恢复 banner 视觉，需要重新设计样式（建议 inline style 或新建 HeroCarouselWidget2.css）。 */

/* FOUC 抑制：外部 CSS（list.css / styles.css）加载完成前隐藏 body，
   避免 header / 容器裸奔时 logo 错位。客户端 bundle.js 加载后会移除
   html.pre-css class 并显示页面。 */
html.pre-css body { visibility: hidden; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; overflow-x: hidden; }

/* ===== HeaderWidget 响应式（原组件内联 \3c style>，迁移为外部 CSS） ===== */

/* 去除 header 及导航元素的所有边框/轮廓/分隔线（防止浏览器默认样式或框架样式产生边框线） */
.dongxun,
.dongxun .head,
.dongxun > *,
.header-box,
.header-box .nav_ul,
.header-box .nav_ul ul,
.header-box .nav_ul ul li,
.header-box .nav_ul ul li a {
  border: none !important;
  outline: none !important;
}
.dongxun {
  box-shadow: none !important;
}
/* 清除导航项伪元素的边框类属性（保留 a::after 的 background 用于 hover 下划线） */
.header-box .nav_ul ul li::before,
.header-box .nav_ul ul li::after,
.header-box .nav_ul ul li a::before {
  border: none !important;
  outline: none !important;
  background: none !important;
}

/* 去除语言切换器（小地球）及搜索区域的边框/轮廓/白线 */
.choseLuangage,
.choseLuangage .slibsange,
.choseLuangage .luangBox,
.choseLuangage .luangBox i,
.header_search,
.header_search .nav_search,
.header_search .nav_search *,
.dongxun .head .nav_ul .right,
.dongxun .head .nav_ul .right * {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.dongxun.menu-shrink {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 15px rgb(0 0 0 / 20%) !important;
}

/* 去除友情链接区域容器的轮廓线（保留链接项自身的设计边框） */
.widget-friendlink,
.widget-friendlink .passed,
.widget-friendlink .links-container,
.widget-friendlink .links-grid,
.widget-friendlink .link-header,
.dongxun_link,
.dongxun_link .passed,
.dongxun_link .links-container,
.dongxun_link .links-grid,
.dongxun_link .link-header {
  outline: none !important;
  box-shadow: none !important;
}
@media (max-width: 992px) {
  .nav-desktop { display: none !important; }
  .mobile-menu-toggle { display: flex !important; }
  .dongxun-header .nav-item:hover .sub-menu { display: none !important; }
}
@media (min-width: 993px) {
  .mobile-menu-toggle { display: none !important; }
}

/* ===== JobListWidget 申请弹窗 body 滚动锁定（已交给 antd Modal lockScroll） =====
   早期版本曾注入 body.job-modal-open { overflow:hidden; padding-right:0 }
   + html.job-modal-open { overflow:hidden } —— 但 html lock 会让 15px 滚动条直接
   消失 → 视口宽度 +15px → 整页 layout 抖动；同时 padding-right:0 还把 antd
   Modal 自带的滚动条宽度补偿干掉了。Bug 双叠加。
   现彻底删除手动 lock：让 antd Modal v5 的 lockScroll() 自动 body.overflow
   = hidden + body.paddingRight = scrollbarWidth，关闭时还原。视口宽度零变化。 */

/* ===== 隐藏 video 控件栏的"更多选项"三点按钮（前台详情页用） =====
   后台编辑器输出的 <video> 元素带 controlslist="nodownload nofullscreen
   noremoteplayback noplaybackrate" + disablepictureinpicture / disableremoteplayback，
   Chromium 仍会渲染出 overflow-menu 按钮本体（即使菜单内可选项已被清空）。
   这里用 shadow DOM 选择器把按钮本体 display:none 掉，与后台编辑器 TiptapEditor/style.css
   行为保持一致。
   注：-webkit-media-controls-overflow-button / -webkit-media-controls-cast-button 等是
   Chromium 私有伪元素，Safari / Firefox 不支持但也无对应的"三点"按钮，无需处理。
   作用范围：全局所有 <video>。前台 NewsContentWidget 容器是 .conmain，这里用 video 直接匹配，
   不依赖祖先类，挂载更稳。 */
video::-webkit-media-controls-overflow-button,
video::-webkit-media-controls-cast-button,
video::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-playback-rate-button,
video::-internal-media-controls-overflow-menu {
  display: none !important;
}

/* ===== 文章内分页（前后端一致的分页标记） =====
   后端 ContentProcessorService.autoPaginate() 在 </p> 边界处插入
   `<p>[page]</p>` 作为分页记号（详见 ContentProcessorService.java:250-278）；
   前台 NewsContentWidget 已用 splitContentByPage.ts 切分到多页，正常情况下
   不会再渲染出 [page] 文本。以下为兜底：
   - 当未来后端迁到 <hr class="article-page-break"> 语义化标记时，
     切页之后可能仍有遗留 hr 占位元素（极端历史脏数据），统一 display:none。
   - 若仍有孤立的 [page] 文本节点漏渲染，用 font-size:0 兜底隐藏。
   - 与 /utils/splitContentByPage.ts 的识别顺序保持一致。 */
.article-page-break {
  display: none !important;
}

/* 兜底：兜住所有 <p> 里只剩 "[page]" 字面量的情况 —— 这只会在切页逻辑
   被绕过时出现，正常路径不应命中。 */
.dongxun_content .conmain p:only-child:not([class]):empty,
.dongxun_content .conmain p[class]:empty {
  display: none !important;
}

/* 用属性精确选择"含 [page] 字面量"的段落，强制隐藏（兼容性写法，避
   免 :has() 新依赖）。先把所有 p 标记 data-no-page（前端 split 后已剥，
   残留的有 data-no-page 直接隐藏），无需 JS。 */
.dongxun_content .conmain [data-page-break-leak="1"] {
  display: none !important;
}

/* ===== 文章内容分页器（仅在 totalPages>1 时渲染） ===== */
.article-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 28px 0 16px;
  padding: 22px 0 12px;
  border-top: 1px dashed #e8e8e8;
  text-align: center;
}
.article-pagination button {
  cursor: pointer;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #333;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all .2s ease;
  font-size: 14px;
  min-width: 60px;
  line-height: 1.5;
  font-family: inherit;
}
.article-pagination button:hover:not(:disabled) {
  border-color: #0557FA;
  color: #0557FA;
}
.article-pagination button:active:not(:disabled) {
  background: #0557FA;
  color: #fff;
}
.article-pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.article-pagination .article-pagination__info {
  font-size: 14px;
  color: #666;
  padding: 0 12px;
  white-space: nowrap;
}
.article-pagination .article-pagination__info b {
  color: #0557FA;
  font-weight: 600;
  margin: 0 4px;
}

