/* =====================================================================
 * 清新版主题（浅底 + 薄荷绿）
 *
 * 用法：任意页面加 ?theme=fresh   切回原版：?theme=dark（会记住 30 天）
 * 原理：整站配色由 common.css 的 :root 变量驱动，这里在 body 上重定义同一批
 *       变量 → 所有组件自动跟着变，不用逐个改选择器。
 * 作用域：body.theme-fresh，黑红版完全不受影响。
 * ===================================================================== */

body.theme-fresh {
  /* ---- 主色：薄荷绿 ---- */
  --color-primary: #0fb98a;
  --color-primary-end: #08876a;
  --color-light-primary: rgba(15, 185, 138, .12);
  --color-link: #0fb98a;
  --hg-btn-gradient: linear-gradient(90deg, #17c99b 0%, #0a9c76 100%);
  --hg-badge-gradient: linear-gradient(135deg, #12c79a 1.5%, #0a9c76 98.5%);
  --hg-score-gradient: linear-gradient(135deg, #17c99b 0%, #7fe3c6 55%, #12b0c9 100%);

  /* ---- 浅色底 / 深色字 ---- */
  --color-page: #f3faf7;
  --color-base1: #ffffff;
  --color-dark: #0d211c;
  --color-text: #0e2a24;
  --color-font1: rgba(14, 42, 36, .55);
  --color-font2: rgba(14, 42, 36, .78);
  --color-border: rgba(14, 42, 36, .10);
  --dx-subtitle-color: rgba(14, 42, 36, .6);

  /* ---- 卡片 / 区块 / 输入框 ---- */
  --hg-card-bg: #ffffff;
  --hg-section-bg: #f3faf7;
  --color-image-placeholder: #e6f2ec;
  --dx-base6-color: #ffffff;
  --color-input-text: #0e2a24;
  --color-input-background: #ffffff;
  --color-input-border: #dcefe6;
  --color-input-placeholder: #9ab5ad;
  --color-dialog-background: #ffffff;
  --dx-base2-color: #ffffff;
  --dx-base3-color: #ffffff;
  --dx-base4-color: #f7fcfa;
  --dx-base5-color: #f3faf7;
  --dx-base7-color: #0e2a24;
  --dx-base8-color: #356056;
  --dx-base9-color: #0e2a24;
  --dx-base10-color: #0e2a24;
  --dx-base11-color: #0e2a24;
  --dx-base12-color: #356056;
  --color-hover-bg: #e7f7f0;
  --dx-scrollbar-thumb-color: #cfe6dd;
  --dx-scrollbar-thumb-hover-color: #a9d6c6;
}

html:has(body.theme-fresh) { background: #f3faf7; }

body.theme-fresh,
body.theme-fresh .hg-body,
body.theme-fresh .hg-main,
body.theme-fresh main.main {
  background: var(--color-page) !important;
  color: var(--color-text);
}

body.theme-fresh {
  background-image:
    radial-gradient(1100px 520px at 8% -8%, #dcf7ec 0%, rgba(220, 247, 236, 0) 62%),
    radial-gradient(900px 460px at 100% 0%, #e0f2fb 0%, rgba(224, 242, 251, 0) 58%) !important;
  background-attachment: fixed;
}

/* ---------------- 顶栏 ---------------- */
body.theme-fresh .hg-header {
  background: rgba(255, 255, 255, .92) !important;
  border-bottom: 1px solid var(--color-border) !important;
  backdrop-filter: saturate(1.15) blur(10px);
  box-shadow: 0 6px 22px rgba(14, 42, 36, .05);
}
body.theme-fresh .hg-header .hg-topbar-nav__item { color: #356056 !important; }
body.theme-fresh .hg-header .hg-topbar-nav__item:hover { color: #08564a !important; background: #eaf7f1 !important; }
body.theme-fresh .hg-header .hg-topbar-nav__item.is-active {
  background: var(--hg-btn-gradient) !important;
  color: #fff !important;
}
body.theme-fresh .hg-header__login,
body.theme-fresh .hg-header__user { color: #0e2a24 !important; }

/* 浅底用深色文字 logo */
body.theme-fresh .hg-header__logo img.logo-on-dark,
body.theme-fresh .hg-mobile-nav__logo img.logo-on-dark { display: none !important; }
body.theme-fresh .hg-header__logo img.logo-on-light,
body.theme-fresh .hg-mobile-nav__logo img.logo-on-light { display: block !important; }
body.theme-fresh .logo-on-light { display: none; }
body.theme-fresh .hg-header__logo img,
body.theme-fresh .hg-mobile-nav__logo img { height: 38px !important; width: auto !important; }

/* 搜索框 */
body.theme-fresh .hg-search {
  background: #fff !important;
  border: 1px solid var(--color-input-border) !important;
  color: #5c7f76 !important;
}
body.theme-fresh .hg-search input { color: #0e2a24 !important; }
body.theme-fresh .hg-search input::placeholder { color: #9ab5ad !important; }
body.theme-fresh .hg-search img { filter: brightness(0) saturate(100%) invert(45%) sepia(9%) saturate(700%) hue-rotate(110deg); opacity: .8; }
body.theme-fresh .hg-search.is-focus { border-color: var(--color-primary) !important; box-shadow: 0 0 0 3px rgba(15, 185, 138, .12); }
body.theme-fresh .hg-header__menu img,
body.theme-fresh .hg-header__search-btn img { filter: brightness(0) saturate(100%) invert(18%) sepia(12%) saturate(1200%) hue-rotate(110deg); }

/* 搜索联想面板 / 抽屉 / 弹层 */
body.theme-fresh .hg-search-suggest__panel,
body.theme-fresh .hg-mobile-nav__inner,
body.theme-fresh .hg-history-dialog__panel {
  background: #fff !important;
  color: #0e2a24 !important;
  box-shadow: 0 18px 48px rgba(14, 42, 36, .12) !important;
  border: 1px solid var(--color-border);
}
body.theme-fresh .hg-search-suggest__section h3,
body.theme-fresh .hg-search-suggest__hot-title,
body.theme-fresh .hg-search-suggest__rank,
body.theme-fresh .hg-history-dialog__header h2,
body.theme-fresh .hg-history-card__body h3 { color: #0e2a24 !important; }
body.theme-fresh .hg-search-suggest__tags a,
body.theme-fresh .hg-search-suggest__clear { background: #eef7f2 !important; color: #356056 !important; }
body.theme-fresh .hg-search-suggest__divider { background: var(--color-border) !important; }

/* ---------------- 标题 / 面包屑 ---------------- */
body.theme-fresh .hg-section-title h2,
body.theme-fresh .hg-page-header__text h1,
body.theme-fresh .hg-search-page__head h1,
body.theme-fresh .hg-search-block-title h2,
body.theme-fresh .hg-faq__title { color: #0e2a24 !important; }
body.theme-fresh .hg-page-header__text p { color: #5c7f76 !important; }
body.theme-fresh .hg-breadcrumb,
body.theme-fresh .hg-breadcrumb a,
body.theme-fresh .hg-breadcrumb__sep { color: #6f9188 !important; }
body.theme-fresh .hg-breadcrumb__current { color: var(--color-primary) !important; }

/* ---------------- 卡片 ---------------- */
body.theme-fresh .hg-drama-card__cover { box-shadow: 0 6px 22px rgba(14, 42, 36, .09); }
body.theme-fresh .hg-drama-card:hover .hg-drama-card__cover { box-shadow: 0 14px 34px rgba(14, 42, 36, .16); }
body.theme-fresh .hg-drama-card__title { color: #0e2a24 !important; }
body.theme-fresh .hg-drama-card__desc { color: #5c7f76 !important; }
body.theme-fresh .hg-drama-card__score { background: var(--hg-score-gradient) !important; color: #fff !important; }
body.theme-fresh .hg-drama-card__badge {
  background: #fff !important;
  color: #08564a !important;
  border: 1px solid #cfeadf;
}

/* ---------------- 标签 / 胶囊 / 页签 ---------------- */
body.theme-fresh .hg-tag {
  background: #eaf7f1 !important;
  color: #356056 !important;
  border: 1px solid #dcefe6 !important;
}
body.theme-fresh .hg-tag:hover { background: #dff4ec !important; color: #08564a !important; }
body.theme-fresh .hg-pill-tabs__item {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  color: #356056 !important;
}
body.theme-fresh .hg-pill-tabs__item.is-active {
  background: var(--hg-btn-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
body.theme-fresh .hg-pill-tabs__item.is-active .hg-pill-tabs__icon { filter: brightness(0) invert(1) !important; }
body.theme-fresh .hg-channel-tabs { border-bottom-color: var(--color-border) !important; }
body.theme-fresh .hg-channel-tabs__item { color: #5c7f76 !important; }
body.theme-fresh .hg-channel-tabs__item:hover { color: #0e2a24 !important; }

/* ---------------- 专区入口 ---------------- */
body.theme-fresh .hg-zone-nav__item {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 6px 22px rgba(14, 42, 36, .07);
}
body.theme-fresh .hg-zone-nav__name { color: #0e2a24 !important; }
body.theme-fresh .hg-zone-nav__hint,
body.theme-fresh .hg-zone-nav__cnt { color: #6f9188 !important; }
body.theme-fresh .hg-zone-nav__item:hover { border-color: var(--color-primary) !important; }

/* ---------------- 分页 ---------------- */
body.theme-fresh .hg-pager__page { color: #356056 !important; }
body.theme-fresh .hg-pager__page.is-active { background: var(--hg-btn-gradient) !important; color: #fff !important; }
body.theme-fresh .hg-pager__jump-input,
body.theme-fresh .hg-pager__input {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  color: #0e2a24 !important;
}
body.theme-fresh .hg-pager__jump-btn { background: var(--hg-btn-gradient) !important; color: #fff !important; }
body.theme-fresh .hg-pager__unit,
body.theme-fresh .hg-pager__jump-unit { color: #5c7f76 !important; }

/* ---------------- 排行 ---------------- */
body.theme-fresh .hg-rank-hero {
  background: linear-gradient(120deg, #e8f9f2 0%, #e6f4fb 100%) !important;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(14, 42, 36, .06);
}
body.theme-fresh .hg-rank-hero__title-row h1 { color: #0e2a24 !important; }
body.theme-fresh .hg-rank-hero__meta,
body.theme-fresh .hg-rank-hero__desc { color: #4b6f66 !important; }
body.theme-fresh .hg-rank-hero__brand { color: var(--color-primary) !important; }
body.theme-fresh .hg-rank-item {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 4px 16px rgba(14, 42, 36, .05);
}
body.theme-fresh .hg-rank-item__title { color: #0e2a24 !important; }
body.theme-fresh .hg-rank-item__meta,
body.theme-fresh .hg-rank-item__desc,
body.theme-fresh .hg-rank-item__tags,
body.theme-fresh .hg-rank-item__heat,
body.theme-fresh .hg-rank-item__heat-label { color: #5c7f76 !important; }
body.theme-fresh .hg-rank-item__heat-value { color: var(--color-primary) !important; }
body.theme-fresh .hg-rank-num { color: #8fb0a7 !important; }

/* ---------------- 专题 ---------------- */
body.theme-fresh .hg-topic-card,
body.theme-fresh .hg-topic-item { background: #fff !important; border: 1px solid var(--color-border) !important; }
body.theme-fresh .hg-topic-card__title,
body.theme-fresh .hg-topic-item__title { color: #0e2a24 !important; }
body.theme-fresh .hg-topic-card__desc { color: #5c7f76 !important; }

/* ---------------- 详情页（播放器仍深色，信息区转浅） ---------------- */
body.theme-fresh .hg-web-play__titlebar,
body.theme-fresh .hg-web-play__title { color: #0e2a24 !important; }
body.theme-fresh .hg-web-play__title-ep { color: var(--color-primary) !important; }
body.theme-fresh .hg-web-play__actions .hg-web-play__action {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  color: #356056 !important;
  box-shadow: 0 4px 14px rgba(14, 42, 36, .06);
}
body.theme-fresh .hg-web-play__action:hover { border-color: var(--color-primary) !important; color: #08564a !important; }
body.theme-fresh .hg-web-play__introcard,
body.theme-fresh .hg-web-play__synopsis,
body.theme-fresh .hg-web-play__related {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(14, 42, 36, .06);
}
body.theme-fresh .hg-web-play__fact b { color: #6f9188 !important; }
body.theme-fresh .hg-web-play__fact span,
body.theme-fresh .hg-web-play__fact a,
body.theme-fresh .hg-web-play__synopsis h2 { color: #0e2a24 !important; }
body.theme-fresh .hg-web-play__synopsis-text p { color: #3d5f57 !important; }
body.theme-fresh .hg-web-play__side {
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(14, 42, 36, .06);
}
body.theme-fresh .hg-web-play__side-title,
body.theme-fresh .hg-web-play__side p { color: #0e2a24 !important; }
body.theme-fresh .hg-web-play__side-current { color: var(--color-primary) !important; }
body.theme-fresh .hg-web-play__side-rule { background: var(--color-border) !important; border: 0; height: 1px; }
body.theme-fresh .hg-web-play__ep {
  background: #f1faf5 !important;
  color: #356056 !important;
  border: 1px solid #e2f2ea !important;
}
body.theme-fresh .hg-web-play__ep.is-active {
  background: var(--hg-btn-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
body.theme-fresh .hg-web-play__scorebox {
  background: linear-gradient(135deg, #effaf4, #e9f7fc) !important;
  border: 1px solid var(--color-border) !important;
}
body.theme-fresh .hg-web-play__scorehead b,
body.theme-fresh .hg-web-play__stars em { color: #4b6f66 !important; }
body.theme-fresh .hg-web-play__scorenum span { color: var(--color-primary) !important; }
body.theme-fresh .hg-web-play__ratesubmit { background: var(--hg-btn-gradient) !important; color: #fff !important; border: 0; }

/* ---------------- 空状态 / FAQ / 搜索热榜 ---------------- */
body.theme-fresh .hg-coming,
body.theme-fresh .hg-search-empty {
  background: #fff !important;
  border: 1px dashed var(--color-border) !important;
  color: #5c7f76 !important;
}
body.theme-fresh .hg-search-empty__title { color: #0e2a24 !important; }
body.theme-fresh .hg-faq__item { background: #fff !important; border: 1px solid var(--color-border) !important; }
body.theme-fresh .hg-faq__item[open] { background: #f4fbf8 !important; }
body.theme-fresh .hg-faq__item summary { color: #0e2a24 !important; }
body.theme-fresh .hg-faq__body p { color: #5c7f76 !important; }
body.theme-fresh .hg-search-hot__item { background: #fff !important; border-color: var(--color-border) !important; }
body.theme-fresh .hg-search-hot__name { color: #0e2a24 !important; }
body.theme-fresh .hg-search-hot__plays { color: #8fb0a7 !important; }

/* ---------------- 会员中心 / 表单 ---------------- */
body.theme-fresh .hg-mp__box,
body.theme-fresh .hg-mp__card,
body.theme-fresh .hg-auth__panel { background: #fff !important; border: 1px solid var(--color-border) !important; color: #0e2a24 !important; }
body.theme-fresh .hg-mp__tabs { border-bottom-color: var(--color-border) !important; }
body.theme-fresh .hg-mp__tab { color: #5c7f76 !important; }
body.theme-fresh .hg-mp__tab.is-active { color: var(--color-primary) !important; }

/* ---------------- 页脚（深墨绿，和浅底拉开层次） ---------------- */
body.theme-fresh .hg-footer {
  background: #0d211c !important;
  border-top: 0 !important;
  margin-top: 56px;
}
body.theme-fresh .hg-footer .hg-footer__copy,
body.theme-fresh .hg-footer .hg-footer__col a { color: rgba(255, 255, 255, .55) !important; }
body.theme-fresh .hg-footer .hg-footer__col a:hover { color: var(--color-primary) !important; }
body.theme-fresh .hg-footer .hg-footer__col h4 { color: #fff !important; }

/* ---------------- 滚动条 ---------------- */
body.theme-fresh ::-webkit-scrollbar { width: 10px; height: 10px; }
body.theme-fresh ::-webkit-scrollbar-thumb { background: #cfe6dd; border-radius: 8px; }
body.theme-fresh ::-webkit-scrollbar-track { background: transparent; }

/* =====================================================================
 * 追加：把 theme.css 里写死的一批「红底」组件一起换成薄荷绿
 * theme.css 用 --hg-red-grad / --hg-red-deep-grad 统一控制，
 * 在 body 上重定义这两个变量即可全量生效。
 * ===================================================================== */
body.theme-fresh {
  --hg-red-grad: linear-gradient(90deg, #17c99b 0%, #0a9c76 100%);
  --hg-red-deep-grad: linear-gradient(-56deg, #0fb98a 0%, #08876a 100%);
}

/* 热门标签条（custom.css 里是深色写死的） */
body.theme-fresh .hg-hot-tags__head h2 { color: #0e2a24 !important; }
body.theme-fresh .hg-hot-tags__hint { color: #6f9188 !important; }
body.theme-fresh .hg-hot-tags__list a,
body.theme-fresh .hg-hot-tags__list .hg-tag {
  background: #eaf7f1 !important;
  color: #356056 !important;
  border: 1px solid #dcefe6 !important;
}
body.theme-fresh .hg-hot-tags__list a:hover,
body.theme-fresh .hg-hot-tags__list .hg-tag:hover {
  background: #d9f2e7 !important;
  color: #08564a !important;
  border-color: #bfe6d6 !important;
}
body.theme-fresh .hg-hot-tags__arrow { background: #fff !important; border: 1px solid #dcefe6 !important; color: #356056 !important; }

/* 首页轮播里的「立即播放」与评分角标 */
body.theme-fresh .hg-hero__play { background: var(--hg-btn-gradient) !important; color: #fff !important; }
body.theme-fresh .hg-hero__score,
body.theme-fresh .hg-hero__score span { color: #0fb98a !important; }
body.theme-fresh .hg-hero__episode { color: #4b6f66 !important; }
body.theme-fresh .hg-hero__site-title { color: #0fb98a !important; }
body.theme-fresh .hg-hero__title { color: #ffffff !important; }
body.theme-fresh .hg-hero__desc { color: rgba(255,255,255,.86) !important; }

/* ---------------- 详情页：标题条 + 操作按钮 ---------------- */
body.theme-fresh .hg-web-play__titlebar {
  background: #ffffff !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 4px 16px rgba(14, 42, 36, .05);
}
body.theme-fresh .hg-web-play__titlebar .hg-web-play__title,
body.theme-fresh .hg-web-play__titlebar h1 { color: #0e2a24 !important; }
body.theme-fresh .hg-web-play__title-ep { color: #0fb98a !important; }

/* 操作条：图标是白色 SVG，浅底上看不见 → 保持深色胶囊按钮 */
body.theme-fresh .hg-web-play__actions .hg-web-play__action {
  background: #16302a !important;
  border: 1px solid #16302a !important;
  color: #dff5ec !important;
  box-shadow: 0 4px 14px rgba(14, 42, 36, .12);
}
body.theme-fresh .hg-web-play__actions .hg-web-play__action:hover {
  background: #0d211c !important;
  border-color: #0fb98a !important;
  color: #ffffff !important;
}
body.theme-fresh .hg-web-play__action img,
body.theme-fresh .hg-web-play__action svg { filter: none !important; opacity: .95; }
body.theme-fresh .hg-web-play__action--immersive {
  background: linear-gradient(90deg, #17c99b 0%, #0a9c76 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* 选集区滚动条 / 空态 */
body.theme-fresh .hg-web-play__episode-scroll { background: transparent !important; }
body.theme-fresh .hg-web-play__side-head p { color: #6f9188 !important; }

/* 相关推荐里的标题 */
body.theme-fresh .hg-web-play__related .hg-section-title h2 { color: #0e2a24 !important; }

/* 轮播评分数字 / 星标 */
body.theme-fresh .hg-hero [data-hero-score],
body.theme-fresh .hg-hero__score,
body.theme-fresh .hg-hero__meta { color: #0fb98a !important; }
body.theme-fresh .hg-hero__score img { filter: hue-rotate(120deg) saturate(1.1) brightness(1.05); }
body.theme-fresh .hg-hero__episode { color: rgba(255,255,255,.8) !important; }

/* ---------------- 排行榜横幅（原来是一张深色背景图 + 深色遮罩）---------------- */
body.theme-fresh .hg-rank-hero {
  background-image: none !important;
  background: linear-gradient(120deg, #e8f9f2 0%, #e6f4fb 100%) !important;
}
body.theme-fresh .hg-rank-hero__bg { opacity: .16 !important; }
body.theme-fresh .hg-rank-hero__mask {
  background: linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .62) 60%, rgba(255, 255, 255, .25) 100%) !important;
}
body.theme-fresh .hg-rank-hero__title-row h1 {
  color: #0e2a24 !important;
  text-shadow: none !important;
}
body.theme-fresh .hg-rank-hero__icon {
  background: #ffffff !important;
  border: 1px solid rgba(15, 185, 138, .3) !important;
}
body.theme-fresh .hg-rank-hero__meta,
body.theme-fresh .hg-rank-hero__meta span,
body.theme-fresh .hg-rank-hero__desc { color: #45685f !important; }
body.theme-fresh .hg-rank-hero__brand { color: #08876a !important; }

/* ---------------- 专题页顶部说明块（原来是一张深色背景图） ---------------- */
body.theme-fresh .hg-topic-intro {
  background: #ffffff !important;
  border: 1px solid rgba(14, 42, 36, .10) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 22px rgba(14, 42, 36, .05);
}
body.theme-fresh .hg-topic-intro__bg { opacity: .07 !important; }
body.theme-fresh .hg-topic-intro__body { background: transparent !important; }
body.theme-fresh .hg-topic-intro__body p,
body.theme-fresh .hg-topic-intro__body a { color: #3d5f57 !important; }
body.theme-fresh .hg-topic-intro__body a { color: #08876a !important; font-weight: 600; }

/* ---------------- 18+ 弹窗按钮（原来写死红色） ---------------- */
body.theme-fresh .hg-age-modal .hg-age-modal__btn--enter {
  background: var(--hg-btn-gradient) !important;
  background-image: var(--hg-btn-gradient) !important;
  color: #fff !important;
}

/* ---------------- 列表页标题（搜索/标签页 H1 在浅色下看不见） ---------------- */
body.theme-fresh .hg-channel-page__head h1,
body.theme-fresh .hg-list-page h1 { color: #0e2a24 !important; }
body.theme-fresh .hg-channel-page__intro { color: #5b7d74 !important; }

/* ---------------- 卡片角标可读性（浅色主题下白字压浅底看不清） ---------------- */
body.theme-fresh .hg-drama-card__score {
  background: linear-gradient(135deg, #0d9478 0%, #0fae8c 55%, #0a86a8 100%) !important;
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .28);
  border: 0 !important;
}
body.theme-fresh .hg-drama-card__episode {
  background: rgba(9, 32, 27, .68) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
body.theme-fresh .hg-ep-time__at {
  background: rgba(9, 32, 27, .68) !important;
  color: #fff !important;
  padding: 0 6px !important;
  border-radius: 7px !important;
  margin-right: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
/* 深色主题保持原样，只是把无底色的时间标签也补一个底 */
body:not(.theme-fresh) .hg-ep-time__at {
  background: rgba(0, 0, 0, .55);
  padding: 0 6px;
  border-radius: 7px;
  margin-right: 4px;
}
