/*
 * WooYun 首页顶部栏配色
 * NewAPI 的顶部栏是透明的，会压在自定义主页的深色首屏上，文字难以辨认。
 * 这里只在首页（页面里嵌着 /landing/ 主页时）给顶部栏加深色毛玻璃底板，并统一改成浅色文字；其他页面不受影响。
 * 由宝塔网站「内容替换」在 </head> 前插入 <link> 引用本文件。
 */
body:has(iframe[src*="/landing/"]) header.fixed > div > nav {
  margin-top: 10px;
  padding-left: 14px !important;
  padding-right: 10px !important;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(9, 8, 18, .58) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 34px -14px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #f3f2fa;
}

/* 站点名 */
body:has(iframe[src*="/landing/"]) header.fixed nav > div:first-child a {
  color: #fff !important;
}

/* 站点 Logo：原图是深灰色，在深色顶部栏上看不清，首页这里显示成白色 */
body:has(iframe[src*="/landing/"]) header.fixed nav img[src*="/landing/logo"] {
  filter: brightness(0) invert(1);
  opacity: .92;
}

/* 导航链接与图标按钮（语言、主题、通知、手机端菜单） */
body:has(iframe[src*="/landing/"]) header.fixed nav a,
body:has(iframe[src*="/landing/"]) header.fixed nav button:not(.bg-primary) {
  color: rgba(236, 235, 248, .74) !important;
}
body:has(iframe[src*="/landing/"]) header.fixed nav a.text-foreground,
body:has(iframe[src*="/landing/"]) header.fixed nav a:hover,
body:has(iframe[src*="/landing/"]) header.fixed nav button:not(.bg-primary):hover {
  color: #fff !important;
}
body:has(iframe[src*="/landing/"]) header.fixed nav button:not(.bg-primary):hover,
body:has(iframe[src*="/landing/"]) header.fixed nav a:not(.bg-primary):hover {
  background: rgba(255, 255, 255, .08) !important;
}

/* 当前页「主页」加一条品牌色下划线 */
body:has(iframe[src*="/landing/"]) header.fixed nav a.text-foreground {
  position: relative;
}
body:has(iframe[src*="/landing/"]) header.fixed nav a.text-foreground::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8d54ff, #e02ff9);
}

/* 分隔线 */
body:has(iframe[src*="/landing/"]) header.fixed nav .h-4.w-px {
  background: rgba(255, 255, 255, .16) !important;
}

/* 登录按钮保持品牌色，文字纯白 */
body:has(iframe[src*="/landing/"]) header.fixed nav .bg-primary {
  color: #fff !important;
  background: linear-gradient(135deg, #8d54ff, #e02ff9) !important;
  box-shadow: 0 6px 18px -8px #e02ff9;
}

/*
 * 隐藏所有页面（首页、控制台、后台）顶部栏标题右边的版本号。
 * 版本号只对管理员显示，同时也是「检查更新」的入口；隐藏后仍可在「系统设置 → 维护」里查看版本和检查更新。
 */
[class~="@container/system-brand"] > button {
  display: none !important;
}
