/* r159 · 深色模式顶部统一 / 消息页搜索框不再贴死顶栏 / 动态页封面铺到最顶
   只做这三件，别的一概不动。 */


/* ===== 0) 深色模式：整页底色 + 顶上那条色带一律纯黑，不留任何白 ===== */
html[data-theme=dark],
html[data-theme=dark] body {
  background-color: #000 !important;
  background-image: none !important;
  --status-band-cur: #000 !important;
  --status-top-cur: #000 !important;
}
html[data-theme=dark] body::before {
  background: #000 !important;
}

/* ===== 1) 深色模式：所有页面顶栏跟着变黑，跟页面同一个色，顶上不留白条 ===== */
html[data-theme=dark] body .app-header,
html[data-theme=dark] body .app-header-solid,
html[data-theme=dark] body .app-header-mine,
html[data-theme=dark] body .app-header-float,
html[data-theme=dark] body .vip-head,
html[data-theme=dark] body .chat-header {
  background-color: #000 !important;
  background-image: none !important;
  color: #e7eaf0 !important;
  --status-top: #000 !important;
  --status-band: #000 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

html[data-theme=dark] body .app-header h1,
html[data-theme=dark] body .app-header h2,
html[data-theme=dark] body .app-header .app-title,
html[data-theme=dark] body .app-header .title,
html[data-theme=dark] body .app-header .header-title,
html[data-theme=dark] body .app-header strong,
html[data-theme=dark] body .app-header-mine h1,
html[data-theme=dark] body .app-header-mine .header-title,
html[data-theme=dark] body .app-header-solid h1,
html[data-theme=dark] body .app-header-solid .header-title,
html[data-theme=dark] body .app-header-float h1,
html[data-theme=dark] body .app-header-float .header-title {
  color: #e7eaf0 !important;
  -webkit-text-fill-color: #e7eaf0 !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  text-shadow: none !important;
}

html[data-theme=dark] body .app-header svg,
html[data-theme=dark] body .app-header button,
html[data-theme=dark] body .app-header-mine svg,
html[data-theme=dark] body .app-header-mine button,
html[data-theme=dark] body .app-header-float svg,
html[data-theme=dark] body .app-header-float button {
  color: #e7eaf0 !important;
}

/* 顶栏上下那些玻璃伪元素在深色下会透出一条浅色，全部关掉，顶栏就是一整块纯黑 */
html[data-theme=dark] body .app-header:before,
html[data-theme=dark] body .app-header:after,
html[data-theme=dark] body .app-header-solid:before,
html[data-theme=dark] body .app-header-solid:after,
html[data-theme=dark] body .app-header-mine:before,
html[data-theme=dark] body .app-header-mine:after,
html[data-theme=dark] body .app-header-float:before,
html[data-theme=dark] body .app-header-float:after {
  display: none !important;
  background: none !important;
}

/* ===== 2) 消息页：搜索框别贴死在顶栏下沿，留一条匀称的缝，不再卡位 ===== */
html body .app-header + div .search-bar {
  margin-top: 8px !important;
}

/* ===== 3) 动态页：封面图铺到屏幕最顶端，比原来的 256px 更高 ===== */
html[data-jy-moments] body .app-header-float {
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
  --status-top: #000 !important;
  --status-band: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  text-shadow: none !important;
}

html[data-jy-moments] body .app-header-float button {
  color: #fff !important;
  background-color: rgba(15, 23, 42, .22) !important;
}

html[data-jy-moments] body .app-header-float svg,
html[data-jy-moments] body .app-header-float h1,
html[data-jy-moments] body .app-header-float .header-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35) !important;
}

html[data-jy-moments] body .app-body > div:first-child {
  height: calc(env(safe-area-inset-top, 0px) + 300px) !important;
  min-height: calc(env(safe-area-inset-top, 0px) + 300px) !important;
  background-position: center top !important;
  background-size: cover !important;
  margin-top: 0 !important;
}
