/* ------------------------------------------------------------------
 * 红楼TV 主题补丁
 * 说明：品牌色已通过批量替换写入各 CSS（#f0263c / #c3122e），
 *       这里只处理"底色变了导致前景色不合适"的组件：红底必须配白字、
 *       位图图标需要调色。
 * ------------------------------------------------------------------ */

:root {
  --hg-red-grad: linear-gradient(90deg, #ff3b4f 0%, #c3122e 100%);
  --hg-red-deep-grad: linear-gradient(-56deg, #e0203a 0%, #9e0d24 100%);
}

/* 1. 红底按钮 / 激活态：文字统一白色 */
.hg-topbar-nav__item.is-active,
.hg-header__login,
.hg-hero__play,
.hg-web-play__ep.is-active,
.hg-pill-tabs__item.is-active,
.hg-btn--primary,
.btn-primary,
.hg-mobile-nav__login,
.hg-web-play__ratesubmit:not(:disabled),
.hg-play__action.is-active {
  color: #fff !important;
  background: var(--hg-red-grad) !important;
  border-color: transparent !important;
}

/* 分页当前页 */
.hg-pager__page.is-active {
  background: var(--hg-red-grad) !important;
  color: #fff !important;
}

/* 激活态里的黑色图标 → 反白 */
.hg-hero__play img,
.hg-pill-tabs__item.is-active .hg-pill-tabs__icon,
.hg-btn--primary img,
.hg-header__login img {
  filter: brightness(0) invert(1);
}

/* 2. 卡片角标与评分：深红底 + 白字（原来的浅金渐变配白字看不清） */
.hg-drama-card__score {
  background: var(--hg-red-deep-grad) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.hg-drama-card__badge {
  background: linear-gradient(98deg, #ff5a48 0%, #c3122e 100%) !important;
  color: #fff !important;
}

/* 3. 位图图标调色（原本是黄色） */
.hg-fab__btn--download img {
  filter: hue-rotate(325deg) saturate(1.2);
}

/* 4. 排行榜前三名的名次用品牌红，其余保持灰 */
.hg-rank-num.is-top {
  color: #ff4257;
}

/* 5. 顶部导航激活项在窄屏（移动菜单）同样白字 */
.hg-mobile-nav .hg-nav-item.is-active {
  color: #fff !important;
  background: var(--hg-red-grad) !important;
}

/* 6. 顶部登录态：头像 + 昵称 + 金币 */
.hg-header__user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}

.hg-header__user:hover {
  border-color: rgba(240, 38, 60, .5);
  background: rgba(240, 38, 60, .1);
  text-decoration: none;
}

.hg-header__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff3b4f, #c3122e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hg-header__uname {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hg-header__coins {
  font-size: 11px;
  color: #ff8a95;
  background: rgba(240, 38, 60, .14);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .hg-header__uname,
  .hg-header__coins { display: none; }
  .hg-header__user { padding: 0 4px; background: transparent; border-color: transparent; }
}
