/* ==========================================================================
   chaoaibi 影视 · 皮肤（黑白灰极简 / 顶部导航 / 全宽海报墙）
   引入位置：main.css、v2.css 之后（本文件最后加载，负责最终外观）
   ========================================================================== */

:root {
  --bg: #f6f6f6;
  --panel: #ffffff;
  --line: #e9e9e9;
  --line-soft: #f1f1f1;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --ink-3: #8f8f8f;
  --accent: #111111;
  --accent-soft: #f2f2f2;
  --radius: 10px;
  /* 覆盖 v2 主题色，避免残留金/红 */
  --v2-gold: #111111;
  --v2-gold-d: #000000;
  --v2-red: #111111;
  --v2-ink: #111111;
  --v2-ink-2: #4a4a4a;
  --v2-ink-3: #8f8f8f;
  --v2-line: #e9e9e9;
  --v2-bg: #f6f6f6;
  --v2-card: #ffffff;
}

html,
body {
  background: #f6f6f6 !important;
  background-image: none !important;
  color: #111 !important;
  color-scheme: light;
}

::selection {
  background: #111;
  color: #fff;
}

.wrap {
  width: 100% !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

/* ---------------------------- 顶栏 ---------------------------- */
.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #ececec !important;
  box-shadow: none !important;
  position: sticky;
  top: 0;
  z-index: 60;
}

.site-header .header-bar {
  height: 64px !important;
  max-width: 1480px !important;
  margin: 0 auto;
  padding: 0 24px;
  display: flex !important;
  align-items: center;
  gap: 26px;
}

.site-header .brand {
  color: #111 !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: 0 0 auto;
}

/* 去掉 v2 里自动追加的「影视」字样，改用模板里的 span */
.site-header .brand::after {
  content: none !important;
  display: none !important;
}

.site-header .brand .lv {
  color: #111 !important;
}

.site-header .brand .brand-sub,
.footer-brand .fb-sub {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.16em !important;
  color: #8f8f8f !important;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.2;
}

/* 搜索 */
.site-header .search-form {
  margin-left: auto;
  flex: 0 1 260px;
  display: flex;
  align-items: center;
  background: #f3f3f3 !important;
  border: 1px solid transparent !important;
  border-radius: 999px;
  height: 38px;
  padding: 0 6px 0 16px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.site-header .search-form:focus-within {
  background: #fff !important;
  border-color: #111 !important;
}

.site-header .search-form input {
  background: transparent !important;
  border: 0 !important;
  height: 100%;
  width: 100%;
  color: #111 !important;
  font-size: 13px;
  outline: none;
}

.site-header .search-form input::placeholder {
  color: #a2a2a2 !important;
}

.site-header .search-form button {
  background: transparent !important;
  border: 0 !important;
  color: #7a7a7a !important;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.site-header .search-form button:hover {
  color: #111 !important;
  background: #ececec !important;
}

.site-header .menu-btn,
.menu-btn {
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  color: #444 !important;
  border-radius: 8px !important;
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

/* ---------------------------- 分类导航（顶部一行） ---------------------------- */
.site-header .nav-bar,
.nav-bar {
  background: #ffffff !important;
  border-top: 1px solid #f0f0f0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
  position: static !important;
  overflow: visible;
}

.site-header .nav-list,
.nav-list {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0 !important;
  height: 48px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-header .nav-list::-webkit-scrollbar {
  display: none;
}

.site-header .nav-item,
.site-header .nav-list a,
.nav-item,
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto !important;
  height: 48px !important;
  line-height: 48px !important;
  padding: 0 12px !important;
  font-size: 13.5px !important;
  font-weight: 400;
  color: #6d6d6d !important;
  -webkit-text-fill-color: currentColor !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-header .nav-item span,
.site-header .nav-list a span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  background: none !important;
  padding: 0 !important;
  font-weight: inherit !important;
}

.site-header .nav-item:hover,
.site-header .nav-list a:hover,
.nav-list a:hover {
  color: #111 !important;
  -webkit-text-fill-color: currentColor !important;
  background: transparent !important;
}

.site-header .nav-item.is-active,
.site-header .nav-list a.is-active,
.nav-list a.is-active {
  color: #111 !important;
  -webkit-text-fill-color: currentColor !important;
  background: transparent !important;
  font-weight: 600 !important;
}

/* 当前分类：底部 2px 黑色下划线（用内阴影，避免和旧主题的伪元素打架） */
.site-header .nav-item.is-active,
.site-header .nav-list a.is-active {
  box-shadow: inset 0 -2px 0 0 #111 !important;
  border-bottom: 2px solid #111 !important;
  box-sizing: border-box !important;
}

.site-header .nav-item::after,
.site-header .nav-list a::after,
.nav-item::after,
.nav-item.is-active::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* ---------------------------- 公告条 ---------------------------- */
.v2-notice {
  background: #fbfbfb !important;
  border-bottom: 1px solid #f0f0f0 !important;
  color: #9a9a9a !important;
  height: 34px;
  display: flex;
  align-items: center;
}

.v2-notice .wrap {
  overflow: hidden;
}

.v2-notice-track {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: #9a9a9a !important;
  font-size: 12px !important;
  letter-spacing: 0.01em;
  animation: none !important;
  transform: none !important;
  white-space: nowrap;
  overflow: hidden;
}

.v2-notice-track span:nth-child(n + 3) {
  display: none !important;
}

.v2-notice-track span {
  color: #9a9a9a !important;
}

/* ---------------------------- 主体：全宽单列 ---------------------------- */
.page {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
  padding: 26px 0 8px !important;
  box-sizing: border-box !important;
}

.sidebar,
body[data-page] .sidebar {
  display: none !important;
}

.content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

/* ---------------------------- 区块 ---------------------------- */
.panel {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 0 34px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
}

.panel-head {
  display: flex !important;
  align-items: baseline;
  gap: 12px;
  padding: 0 0 14px !important;
  border: 0 !important;
  margin: 0 !important;
}

.panel-head h2 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #111 !important;
  letter-spacing: 0.01em;
  margin: 0;
}

.panel-head h2::before {
  display: none !important;
  content: none !important;
}

.panel-head .sub {
  font-size: 12px !important;
  color: #a2a2a2 !important;
  font-weight: 400;
}

.panel-head .more {
  margin-left: auto;
  font-size: 12.5px !important;
  color: #8f8f8f !important;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.panel-head .more:hover {
  color: #111 !important;
}

.panel-body {
  padding: 0 !important;
  background: transparent !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ---------------------------- 海报墙 ---------------------------- */
.grid--cards,
.grid.grid--cards {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(204px, 1fr)) !important;
  gap: 26px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.grid--rel {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
  gap: 22px 14px !important;
}

.card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  text-align: left !important;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-3px) !important;
}

.card-cover,
.card-cover img,
.card-cover .cover {
  border-radius: 10px !important;
  overflow: hidden !important;
  display: block !important;
  width: 100% !important;
}

.card-cover {
  aspect-ratio: 16 / 10 !important;
  position: relative;
  border: 0 !important;
  background: #ececec !important;
  box-shadow: none !important;
}

.card-cover img {
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  transition: transform 0.4s ease;
}

.card:hover .card-cover img {
  transform: scale(1.03) !important;
}

.card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(12, 12, 12, 0.72) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 3px 7px !important;
  border-radius: 4px !important;
  backdrop-filter: blur(4px);
}

.card-score {
  position: absolute;
  top: auto !important;
  right: 8px;
  bottom: 8px;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #111 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.14) !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease;
}

.card-play svg {
  width: 34px;
  height: 34px;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  padding: 8px;
  box-sizing: content-box;
}

.card:hover .card-play {
  opacity: 1 !important;
}

.card-title {
  margin: 10px 0 0 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: #1a1a1a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

.card:hover .card-title {
  color: #000 !important;
}

.card-meta {
  margin-top: 4px !important;
  font-size: 12px !important;
  color: #9a9a9a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ---------------------------- 列表页筛选 ---------------------------- */
.v2-browse-head {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 0 18px !important;
  margin: 0 !important;
}

#cat-chips,
#sort-chips {
  display: flex !important;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

#sort-chips {
  margin-left: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  color: #5c5c5c !important;
  background: #fff !important;
  border: 1px solid #e4e4e4 !important;
  border-radius: 999px !important;
  text-decoration: none;
  transition: all 0.15s ease;
}

.chip:hover {
  color: #111 !important;
  border-color: #111 !important;
}

.chip.is-active {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  font-weight: 500;
}

.pager {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 0 !important;
  padding: 0 !important;
}

.pager button {
  height: 34px;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  color: #5c5c5c !important;
  background: #fff !important;
  border: 1px solid #e4e4e4 !important;
  border-radius: 999px !important;
  cursor: pointer;
}

.pager button:hover:not(:disabled) {
  color: #111 !important;
  border-color: #111 !important;
}

.pager button.is-active {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 首页三个板块的小分页 */
.panel-pager {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px !important;
}

.panel-pager .pg-btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
  color: #5c5c5c !important;
  background: #fff !important;
  border: 1px solid #e4e4e4 !important;
  border-radius: 999px !important;
  cursor: pointer;
}

.panel-pager .pg-btn:hover:not(:disabled) {
  color: #111 !important;
  border-color: #111 !important;
}

.panel-pager .pg-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.panel-pager .pg-info {
  font-size: 12px !important;
  color: #9a9a9a !important;
}

/* ---------------------------- 空态 ---------------------------- */
.empty {
  padding: 60px 0;
  text-align: center;
  color: #9a9a9a !important;
}

.empty h3 {
  color: #111 !important;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

/* ---------------------------- 播放页 ---------------------------- */
.watch-panel {
  background: #fff !important;
  border: 1px solid #ececec !important;
  border-radius: 12px !important;
  padding: 20px 20px 16px !important;
  margin-bottom: 34px !important;
}

.watch-head {
  padding: 0 0 12px !important;
  border: 0 !important;
}

.watch-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #111 !important;
  margin: 0 !important;
}

.watch-meta {
  color: #9a9a9a !important;
  border: 0 !important;
}

.watch-time,
.watch-plays {
  color: #9a9a9a !important;
  font-size: 12.5px !important;
}

.watch-meta .line-btn {
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
  color: #5c5c5c !important;
  background: #fff !important;
  border: 1px solid #e4e4e4 !important;
  border-radius: 999px !important;
}

.watch-meta .line-btn.is-active {
  color: #fff !important;
  background: #111 !important;
  border-color: #111 !important;
}

#player {
  background: #0b0b0b !important;
  border-radius: 10px !important;
  overflow: hidden;
}

/* ---------------------------- 页脚 ---------------------------- */
.site-footer {
  background: #ffffff !important;
  border-top: 1px solid #ededed !important;
  color: #9a9a9a !important;
  margin-top: 20px;
  padding: 26px 0 22px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #111 !important;
}

.footer-brand .lv {
  color: #111 !important;
}

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.footer-links a {
  font-size: 12.5px !important;
  color: #7a7a7a !important;
  text-decoration: none;
}

.footer-links a:hover {
  color: #111 !important;
}

.footer-bottom {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 12px !important;
  color: #a2a2a2 !important;
}

.footer-bottom span {
  color: #a2a2a2 !important;
}

/* ---------------------------- 抽屉菜单 ---------------------------- */
.drawer-mask {
  background: rgba(16, 16, 16, 0.42) !important;
}

.drawer-panel {
  background: #fff !important;
  color: #111 !important;
  border-radius: 0 !important;
}

.drawer-head {
  border-bottom: 1px solid #efefef !important;
}

.drawer-head h3 {
  color: #111 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.drawer-head h3 .lv {
  color: #111 !important;
}

.drawer-close {
  color: #666 !important;
  background: transparent !important;
}

.drawer-close:hover {
  background: #f2f2f2 !important;
  color: #111 !important;
}

.drawer-search input {
  background: #f4f4f4 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  color: #111 !important;
}

.drawer-search button {
  background: #111 !important;
  border-radius: 999px !important;
  color: #fff !important;
}

.drawer-links a {
  color: #4a4a4a !important;
  border-bottom: 1px solid #f1f1f1 !important;
}

.drawer-links a:hover {
  background: #f7f7f7 !important;
  color: #111 !important;
}

.drawer-links a .count {
  color: #a2a2a2 !important;
}

.drawer-links a.is-active {
  color: #111 !important;
  font-weight: 600 !important;
  background: #f2f2f2 !important;
}

/* ---------------------------- 滚动条 ---------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f4f4f4 !important;
}

::-webkit-scrollbar-thumb {
  background: #cfcfcf !important;
  border-radius: 10px;
  border: 2px solid #f4f4f4;
}

::-webkit-scrollbar-thumb:hover {
  background: #b4b4b4 !important;
}

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 1200px) {
  .grid--cards,
  .grid.grid--cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 22px 14px !important;
  }
}

@media (max-width: 900px) {
  .wrap {
    padding: 0 16px !important;
  }

  .site-header .header-bar {
    height: 56px !important;
    padding: 0 16px;
    gap: 14px;
  }

  .site-header .brand {
    font-size: 19px !important;
  }

  .site-header .search-form {
    display: none !important;
  }

  .site-header .menu-btn,
  .menu-btn {
    display: inline-flex !important;
    margin-left: auto;
  }

  .site-header .nav-list,
  .nav-list {
    height: 44px !important;
    padding: 0 16px !important;
  }

  .site-header .nav-item,
  .nav-item {
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }

  .page {
    padding: 18px 0 4px !important;
  }

  .panel {
    margin-bottom: 26px !important;
  }

  .panel-head {
    padding-bottom: 12px !important;
  }

  .panel-head h2 {
    font-size: 16px !important;
  }

  .grid--cards,
  .grid.grid--cards {
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)) !important;
    gap: 20px 10px !important;
  }

  .card-title {
    font-size: 12.5px !important;
    margin-top: 8px !important;
  }

  .card-meta {
    font-size: 11px !important;
  }

  #sort-chips {
    margin-left: 0;
  }

  /* 公告条：手机只留第一条，单行省略 */
  .v2-notice {
    height: 32px !important;
  }

  .v2-notice .wrap {
    overflow: hidden !important;
  }

  .v2-notice-track {
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .v2-notice-track span:nth-child(n + 2) {
    display: none !important;
  }

  .v2-notice-track span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 11.5px !important;
  }

  /* 手机端标题略小，六列→两列已由下方 420 断点接管 */
  .grid--cards .card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-footer {
    padding: 22px 0 18px;
  }

  .footer-links {
    margin-left: 0;
    gap: 14px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }

  .watch-panel {
    padding: 14px 14px 12px !important;
  }

  .watch-title {
    font-size: 17px !important;
  }
}

@media (max-width: 420px) {
  .grid--cards,
  .grid.grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 10px !important;
  }
}

/* ---------------------- 页脚文字补丁（压过 v2.css 的白色字） ---------------------- */
.site-footer .footer-brand,
.site-footer .footer-brand a {
  color: #111 !important;
}

.site-footer .footer-brand .fb-sub,
.site-footer .footer-brand .lv {
  color: #8a8a8a !important;
  background: transparent !important;
  border-color: #e2e2e2 !important;
}

.site-footer .footer-links a {
  color: #7a7a7a !important;
}

.site-footer .footer-links a:hover {
  color: #111 !important;
}

.site-footer .footer-bottom {
  color: #a2a2a2 !important;
  border-top: 1px solid #f0f0f0 !important;
}

.site-footer .footer-bottom span {
  color: #a2a2a2 !important;
}