/* ==========================================================================
   YQfun 风格模板（苹果CMS V10）—— 公共样式 + 首页样式
   设计基准：YQfun PC 网页版（顶栏 / 轮播 / 分区Tab / 卡片流 / 排行 / 更新表）
   适配：PC 1240 栅格、平板、H5（含底部 TabBar），深色 / 浅色双主题
   说明：所有颜色、圆角、间距统一走 CSS 变量，改主题只改这里
   ========================================================================== */

/* ------------------------------ 1. 主题变量 ------------------------------ */
:root {
  --ac-primary: #ff6a00;              /* YQfun 主橙 */
  --ac-primary-2: #ff8f2d;
  --ac-primary-soft: rgba(255, 106, 0, .10);
  --ac-red: #fd4c5b;
  --ac-blue: #00a1d6;
  --ac-green: #3fc27a;

  --ac-bg: #f4f5f7;                   /* 页面底色 */
  --ac-card: #ffffff;                 /* 卡片 / 顶栏底色 */
  --ac-card-2: #fafbfc;               /* 内嵌块底色 */
  --ac-mask: rgba(0, 0, 0, .45);

  --ac-text: #16181d;                 /* 主文字 */
  --ac-text-2: #5f646d;               /* 次文字 */
  --ac-text-3: #9aa0a9;               /* 弱文字 */

  --ac-line: #ebecef;                 /* 分割线 */
  --ac-shadow: 0 2px 10px rgba(22, 24, 29, .05);
  --ac-shadow-hover: 0 10px 24px rgba(22, 24, 29, .12);

  --ac-r-sm: 4px;
  --ac-r: 8px;
  --ac-r-lg: 12px;

  --ac-max: 1240px;                   /* 页面最大宽度 */
  --ac-header-h: 56px;                /* 顶栏高度 */
  --ac-gap: 16px;
}

/* 深色主题：只覆盖颜色类变量，布局完全复用 */
html[data-theme="dark"] {
  --ac-bg: #141517;
  --ac-card: #1d1e21;
  --ac-card-2: #24262a;
  --ac-text: #e9ebef;
  --ac-text-2: #a7adb7;
  --ac-text-3: #6f757f;
  --ac-line: #2b2d32;
  --ac-primary-soft: rgba(255, 138, 43, .14);
  --ac-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --ac-shadow-hover: 0 10px 26px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ------------------------------ 2. 基础重置 ------------------------------ */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--ac-bg);
  color: var(--ac-text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
  padding-bottom: 0;
}

a { color: inherit; text-decoration: none; }
img { border: 0; display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }

/* 键盘可访问性 */
:focus-visible { outline: 2px solid var(--ac-primary); outline-offset: 2px; border-radius: 4px; }

/* 通用工具类 */
.ac-wrap { max-width: var(--ac-max); margin: 0 auto; padding: 0 var(--ac-gap); }
.ac-i { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; flex: none; }
.ac-hidden { display: none !important; }
.ac-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 通用 Tab 面板：由 common.js 的 bindTabs 切换 is-active */
[data-panel] { display: none; }
[data-panel].is-active { display: block; }

/* ------------------------------ 3. 顶栏 ------------------------------ */
.ac-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--ac-header-h);
  background: var(--ac-card);
  border-bottom: 1px solid var(--ac-line);
  backdrop-filter: saturate(180%) blur(8px);
}

.ac-header__in {
  max-width: var(--ac-max); margin: 0 auto; height: 100%;
  padding: 0 var(--ac-gap);
  display: flex; align-items: center; gap: 18px;
}

/* Logo */
.ac-logo {
  display: flex; align-items: center; gap: 6px;
  font-size: 22px; font-weight: 800; letter-spacing: .5px;
  color: var(--ac-primary); white-space: nowrap;
}
.ac-logo em { font-style: normal; color: var(--ac-text); }
.ac-logo__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ac-primary); margin-right: 2px;
}

/* 主导航 */
.ac-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.ac-nav a {
  position: relative; padding: 8px 10px; border-radius: 6px;
  font-size: 15px; color: var(--ac-text-2); white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.ac-nav a:hover { color: var(--ac-primary); background: var(--ac-primary-soft); }
.ac-nav a.is-active { color: var(--ac-text); font-weight: 600; }
.ac-nav a.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 3px; border-radius: 2px; background: var(--ac-primary);
}

/* 右侧操作区 */
.ac-header__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 按钮 */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 18px; border: 0; border-radius: 18px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: filter .15s, transform .15s, background-color .15s;
}
.ac-btn:active { transform: scale(.97); }
.ac-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--ac-primary-2), var(--ac-primary));
  box-shadow: 0 4px 12px rgba(255, 106, 0, .28);
}
.ac-btn--primary:hover { filter: brightness(1.06); }
.ac-btn--ghost {
  color: var(--ac-text-2); background: var(--ac-card-2);
  border: 1px solid var(--ac-line);
}
.ac-btn--ghost:hover { color: var(--ac-primary); border-color: var(--ac-primary); }
.ac-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }

/* 搜索框 */
.ac-search {
  display: flex; align-items: center;
  height: 36px; width: 220px; padding: 0 4px 0 12px;
  background: var(--ac-bg); border: 1px solid transparent; border-radius: 18px;
  transition: border-color .2s, background-color .2s, width .2s;
}
.ac-search:focus-within { width: 260px; border-color: var(--ac-primary); background: var(--ac-card); }
.ac-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0;
  background: transparent; color: var(--ac-text); font-size: 13px;
}
.ac-search input::placeholder { color: var(--ac-text-3); }
.ac-search button {
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ac-text-2); cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}
.ac-search button:hover { color: var(--ac-primary); background: var(--ac-primary-soft); }

/* 圆形图标按钮 */
.ac-icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ac-text-2); font-size: 19px;
  transition: background-color .15s, color .15s;
}
.ac-icon-btn:hover { background: var(--ac-bg); color: var(--ac-primary); }

/* 顶栏头像 */
.ac-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #ffb066, #ff6a00);
  color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center; flex: none;
}
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 汉堡按钮（移动端） */
.ac-burger { display: none; }

/* ------------------------------ 4. 首页 Hero 区 ------------------------------ */
.ac-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: var(--ac-gap); margin-top: var(--ac-gap);
}

/* 轮播 */
.ac-slider {
  position: relative; overflow: hidden; border-radius: var(--ac-r-lg);
  background: #0f1013; aspect-ratio: 16 / 6.6; min-height: 240px;
}
.ac-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .5s ease;
}
.ac-slide.is-active { opacity: 1; visibility: visible; }
/* JS 未就绪前先露出第一张，避免首屏黑块 */
.ac-slider:not(.is-ready) .ac-slide:first-child { opacity: 1; visibility: visible; }
.ac-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 6s linear;
}
.ac-slide.is-active img { transform: scale(1.08); }
/* 左侧压暗，保证文字可读 */
.ac-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 75%);
}
.ac-slide__body {
  position: absolute; left: 28px; bottom: 30px; right: 28px;
  z-index: 2; color: #fff; max-width: 62%;
}
.ac-slide__tag {
  display: inline-block; margin-bottom: 10px; padding: 2px 8px;
  font-size: 12px; border-radius: var(--ac-r-sm);
  background: var(--ac-primary); color: #fff;
}
.ac-slide__title {
  font-size: 26px; line-height: 1.3; font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-slide__desc {
  margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, .78);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-slide__play {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  height: 34px; padding: 0 16px; border-radius: 17px;
  background: var(--ac-primary); color: #fff; font-size: 13px;
}

/* 轮播左右箭头 */
.ac-slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .38); color: #fff; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .2s;
}
.ac-slider:hover .ac-slider__arrow { opacity: 1; }
.ac-slider__arrow:hover { background: var(--ac-primary); }
.ac-slider__arrow--prev { left: 12px; }
.ac-slider__arrow--next { right: 12px; }

/* 轮播圆点 */
.ac-dots {
  position: absolute; right: 18px; bottom: 18px; z-index: 3;
  display: flex; align-items: center; gap: 6px;
}
.ac-dots i {
  width: 6px; height: 6px; border-radius: 3px; cursor: pointer;
  background: rgba(255, 255, 255, .5); transition: width .25s, background-color .25s;
}
.ac-dots i.is-active { width: 18px; background: var(--ac-primary); }

/* ------------------------------ 5. 排行榜卡片 ------------------------------ */
.ac-rank {
  background: var(--ac-card); border-radius: var(--ac-r-lg);
  padding: 14px 16px; box-shadow: var(--ac-shadow);
  display: flex; flex-direction: column; min-height: 0;
}
.ac-rank__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ac-rank__title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ac-rank__title .ac-i { color: var(--ac-primary); }
.ac-tabs-mini { display: flex; gap: 2px; background: var(--ac-bg); padding: 2px; border-radius: 14px; }
.ac-tabs-mini button {
  height: 24px; padding: 0 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ac-text-2); font-size: 12px; cursor: pointer;
}
.ac-tabs-mini button.is-active { background: var(--ac-card); color: var(--ac-primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

.ac-rank__list { display: none; flex: 1; }
.ac-rank__list.is-active { display: block; }
.ac-rank__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--ac-line);
}
.ac-rank__item:last-child { border-bottom: 0; }
.ac-rank__no {
  width: 18px; flex: none; font-size: 13px; font-weight: 700;
  color: var(--ac-text-3); font-style: italic; text-align: center;
}
.ac-rank__item:nth-child(1) .ac-rank__no { color: #ff3b30; }
.ac-rank__item:nth-child(2) .ac-rank__no { color: #ff8a00; }
.ac-rank__item:nth-child(3) .ac-rank__no { color: #ffc400; }
.ac-rank__cover {
  width: 56px; height: 36px; flex: none; overflow: hidden;
  border-radius: var(--ac-r-sm); background: var(--ac-bg);
}
.ac-rank__cover img { width: 100%; height: 100%; object-fit: cover; }
.ac-rank__info { min-width: 0; flex: 1; }
.ac-rank__name {
  font-size: 13px; line-height: 1.4; color: var(--ac-text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-rank__name:hover { color: var(--ac-primary); }
.ac-rank__meta { font-size: 11px; color: var(--ac-text-3); margin-top: 2px; }

/* ------------------------------ 6. 分区 Tab ------------------------------ */
.ac-channels {
  display: flex; align-items: center; gap: 8px; margin-top: 18px;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.ac-channels::-webkit-scrollbar { display: none; }
.ac-channels a {
  flex: none; height: 32px; line-height: 32px; padding: 0 16px;
  border-radius: 16px; font-size: 14px; color: var(--ac-text-2);
  background: var(--ac-card); border: 1px solid var(--ac-line);
  transition: .15s;
}
.ac-channels a:hover { color: var(--ac-primary); border-color: var(--ac-primary); }
.ac-channels a.is-active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--ac-primary-2), var(--ac-primary));
  box-shadow: 0 4px 12px rgba(255, 106, 0, .25);
}

/* ------------------------------ 7. 主体两栏 ------------------------------ */
.ac-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--ac-gap); align-items: start; margin-top: 18px;
}
.ac-main { min-width: 0; }

/* ------------------------------ 8. 板块标题 ------------------------------ */
.ac-section { margin-bottom: 26px; }
.ac-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 12px;
}
.ac-sec-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ac-sec-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: var(--ac-primary);
}
.ac-sec-title small { font-size: 12px; font-weight: 400; color: var(--ac-text-3); margin-left: 2px; }
.ac-sec-more { font-size: 13px; color: var(--ac-text-3); display: inline-flex; align-items: center; gap: 2px; }
.ac-sec-more:hover { color: var(--ac-primary); }

/* 板块内的小 Tab（推荐/最新/排行） */
.ac-sec-tabs { display: flex; gap: 14px; }
.ac-sec-tabs button {
  border: 0; background: transparent; padding: 0; font-size: 14px;
  color: var(--ac-text-2); cursor: pointer;
}
.ac-sec-tabs button.is-active { color: var(--ac-primary); font-weight: 600; }

/* ------------------------------ 9. 视频卡片 ------------------------------ */
.ac-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: var(--ac-gap);
}
.ac-card {
  display: block; background: var(--ac-card); border-radius: var(--ac-r);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.ac-card:hover { transform: translateY(-3px); box-shadow: var(--ac-shadow-hover); }

.ac-card__cover {
  position: relative; display: block; aspect-ratio: 16 / 9;
  background: var(--ac-card-2); overflow: hidden;
}
.ac-card__cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.ac-card:hover .ac-card__cover img { transform: scale(1.06); }

/* 封面角标：时长 / 集数 */
.ac-card__dur {
  position: absolute; right: 6px; bottom: 6px; padding: 0 5px;
  height: 18px; line-height: 18px; border-radius: var(--ac-r-sm);
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px;
}
/* 封面角标：左上角标签 */
.ac-card__badge {
  position: absolute; left: 6px; top: 6px; padding: 0 6px;
  height: 18px; line-height: 18px; border-radius: var(--ac-r-sm);
  background: var(--ac-primary); color: #fff; font-size: 11px;
}
.ac-card__badge--blue { background: var(--ac-blue); }
.ac-card__badge--red { background: var(--ac-red); }

/* 悬浮播放按钮 */
.ac-card__hover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .28); opacity: 0; transition: opacity .2s;
  color: #fff; font-size: 34px;
}
.ac-card:hover .ac-card__hover { opacity: 1; }

/* 卡片正文 */
.ac-card__body { padding: 9px 10px 11px; }
.ac-card__title {
  font-size: 14px; line-height: 1.45; color: var(--ac-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
}
.ac-card:hover .ac-card__title { color: var(--ac-primary); }
.ac-card__meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; font-size: 12px; color: var(--ac-text-3);
}
.ac-card__meta span { display: inline-flex; align-items: center; gap: 3px; }
.ac-card__meta .ac-i { font-size: 13px; }
.ac-card__up {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 12px; color: var(--ac-text-2);
}
.ac-card__up .ac-avatar { width: 20px; height: 20px; font-size: 10px; }
/* 扩展字段 vod_up 为空时展示默认 UP 名（避免模板里写死） */
.ac-card__up .ac-ellipsis:empty::before { content: "YQfun UP"; color: var(--ac-text-3); }
/* 备注（集数/时长）为空时不显示空角标 */
.ac-card__dur:empty { display: none; }

/* ------------------------------ 10. 文章卡片 ------------------------------ */
.ac-art-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--ac-gap); }
.ac-art {
  display: flex; gap: 12px; padding: 12px; background: var(--ac-card);
  border-radius: var(--ac-r); transition: transform .2s, box-shadow .2s;
}
.ac-art:hover { transform: translateY(-2px); box-shadow: var(--ac-shadow-hover); }
.ac-art__cover { width: 108px; height: 72px; flex: none; border-radius: var(--ac-r-sm); overflow: hidden; background: var(--ac-card-2); }
.ac-art__cover img { width: 100%; height: 100%; object-fit: cover; }
.ac-art__info { min-width: 0; display: flex; flex-direction: column; }
.ac-art__title {
  font-size: 14px; line-height: 1.45; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-art:hover .ac-art__title { color: var(--ac-primary); }
.ac-art__desc {
  margin-top: 4px; font-size: 12px; color: var(--ac-text-3);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-art__meta { margin-top: auto; font-size: 12px; color: var(--ac-text-3); display: flex; gap: 10px; }

/* ------------------------------ 11. 侧栏组件 ------------------------------ */
.ac-aside { position: sticky; top: calc(var(--ac-header-h) + var(--ac-gap)); display: flex; flex-direction: column; gap: var(--ac-gap); }
.ac-widget { background: var(--ac-card); border-radius: var(--ac-r-lg); padding: 14px 16px; box-shadow: var(--ac-shadow); }
.ac-widget__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ac-widget__title { font-size: 15px; font-weight: 700; }
.ac-widget__title .ac-i { color: var(--ac-primary); margin-right: 4px; }
.ac-widget__more { font-size: 12px; color: var(--ac-text-3); }
.ac-widget__more:hover { color: var(--ac-primary); }

/* 更新时间表 */
.ac-week { display: flex; gap: 2px; margin-bottom: 8px; }
.ac-week button {
  flex: 1; height: 26px; border: 0; border-radius: var(--ac-r-sm);
  background: transparent; color: var(--ac-text-2); font-size: 12px; cursor: pointer;
}
.ac-week button:hover { color: var(--ac-primary); }
.ac-week button.is-active { background: var(--ac-primary-soft); color: var(--ac-primary); font-weight: 600; }
.ac-week__panel { display: none; }
.ac-week__panel.is-active { display: block; }
.ac-week__item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--ac-line);
}
.ac-week__item:last-child { border-bottom: 0; }
.ac-week__time {
  flex: none; width: 38px; text-align: center; font-size: 12px; font-weight: 600;
  color: var(--ac-primary);
}
.ac-week__name {
  flex: 1; min-width: 0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-week__ep {
  flex: none; font-size: 12px; color: var(--ac-text-3);
  max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-week__item.is-hide { display: none; }
.ac-week__empty { display: none; padding: 14px 0; text-align: center; font-size: 12px; color: var(--ac-text-3); }

/* 热门标签 */
.ac-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-tags a {
  padding: 3px 10px; border-radius: 12px; font-size: 12px;
  background: var(--ac-card-2); color: var(--ac-text-2); transition: .15s;
}
.ac-tags a:hover { background: var(--ac-primary-soft); color: var(--ac-primary); }

/* 公告 */
.ac-notice { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--ac-line); font-size: 13px; }
.ac-notice:last-child { border-bottom: 0; }
.ac-notice__tag {
  flex: none; height: 18px; line-height: 18px; margin-top: 2px; padding: 0 5px;
  border-radius: var(--ac-r-sm); font-size: 11px;
  background: var(--ac-primary-soft); color: var(--ac-primary);
}
.ac-notice__text { min-width: 0; color: var(--ac-text-2); line-height: 1.5; }
.ac-notice__text:hover { color: var(--ac-primary); }
.ac-notice__text span { display: block; font-size: 11px; color: var(--ac-text-3); }

/* ------------------------------ 12. 加载更多 / 瀑布流 ------------------------------ */
.ac-loadmore {
  display: flex; justify-content: center; padding: 8px 0 4px;
}
.ac-loadmore__btn {
  min-width: 160px; height: 40px; padding: 0 24px; border-radius: 20px;
  border: 1px solid var(--ac-line); background: var(--ac-card);
  color: var(--ac-text-2); font-size: 14px; cursor: pointer; transition: .15s;
}
.ac-loadmore__btn:hover { color: var(--ac-primary); border-color: var(--ac-primary); }
.ac-loadmore__btn[disabled] { opacity: .55; cursor: default; }
.ac-loadmore__end { font-size: 12px; color: var(--ac-text-3); }

/* ------------------------------ 13. 页脚 ------------------------------ */
.ac-footer {
  margin-top: 40px; padding: 28px 0 34px;
  background: var(--ac-card); border-top: 1px solid var(--ac-line);
  color: var(--ac-text-3); font-size: 12px;
}
.ac-footer__in { max-width: var(--ac-max); margin: 0 auto; padding: 0 var(--ac-gap); }
.ac-footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.ac-footer__links a:hover { color: var(--ac-primary); }
.ac-footer__copy { line-height: 1.9; }

/* ------------------------------ 14. 返回顶部 ------------------------------ */
.ac-backtop {
  position: fixed; right: 22px; bottom: 92px; z-index: 150;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--ac-card); color: var(--ac-text-2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .25s;
}
.ac-backtop.is-show { opacity: 1; visibility: visible; transform: none; }
.ac-backtop:hover { color: var(--ac-primary); }

/* ------------------------------ 15. 移动端抽屉 + 底部 TabBar ------------------------------ */
.ac-mask {
  position: fixed; inset: 0; z-index: 300; background: var(--ac-mask);
  opacity: 0; visibility: hidden; transition: .25s;
}
.ac-mask.is-show { opacity: 1; visibility: visible; }

.ac-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 301;
  width: 76%; max-width: 320px; background: var(--ac-card);
  transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; padding: 16px;
  overflow-y: auto;
}
.ac-drawer.is-show { transform: none; }
.ac-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ac-drawer__search { margin-bottom: 14px; }
.ac-drawer__search .ac-search { width: 100%; }
.ac-drawer__links { display: flex; flex-direction: column; }
.ac-drawer__links a {
  padding: 12px 6px; font-size: 15px; border-bottom: 1px solid var(--ac-line);
  color: var(--ac-text-2); display: flex; align-items: center; justify-content: space-between;
}
.ac-drawer__links a:hover { color: var(--ac-primary); }

.ac-tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 250;
  height: 52px; padding-bottom: env(safe-area-inset-bottom);
  background: var(--ac-card); border-top: 1px solid var(--ac-line);
}
.ac-tabbar__in { display: flex; height: 52px; }
.ac-tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: var(--ac-text-3);
}
.ac-tabbar a .ac-i { font-size: 20px; }
.ac-tabbar a.is-active { color: var(--ac-primary); }

/* ------------------------------ 16. 图片懒加载 ------------------------------ */
img[data-src] { opacity: 0; transition: opacity .35s ease; background: var(--ac-card-2); }
img.is-loaded { opacity: 1; }

/* ------------------------------ 17. 响应式 ------------------------------ */
@media (max-width: 1100px) {
  .ac-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .ac-search { width: 180px; }
  .ac-search:focus-within { width: 200px; }
}

@media (max-width: 960px) {
  :root { --ac-header-h: 52px; }
  .ac-nav { display: none; }
  .ac-burger { display: grid; }
  .ac-header__right .ac-btn--primary { display: none; }
  .ac-header__in { gap: 8px; }
  .ac-search { width: 160px; }
  .ac-hero { grid-template-columns: 1fr; }
  .ac-rank { margin-top: 0; }
  .ac-rank__list { display: none; }
  .ac-rank__list.is-active { display: block; }
  .ac-body { grid-template-columns: 1fr; }
  .ac-aside { position: static; }
  .ac-slide__title { font-size: 20px; }
  .ac-slide__body { max-width: 78%; left: 18px; bottom: 18px; }
  .ac-backtop { bottom: 70px; right: 14px; }
}

@media (max-width: 768px) {
  :root { --ac-gap: 12px; }
  body { padding-bottom: 52px; }
  .ac-search { display: none; }
  .ac-header__right .ac-icon-btn[data-desk-only] { display: none; }
  .ac-tabbar { display: block; }
  .ac-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ac-card__body { padding: 8px 8px 10px; }
  .ac-card__title { font-size: 13px; min-height: 38px; }
  .ac-card__up { display: none; }
  .ac-slider { aspect-ratio: 16 / 10; min-height: 200px; }
  .ac-slide__title { font-size: 17px; }
  .ac-slide__desc { display: none; }
  .ac-slide__play { margin-top: 10px; height: 30px; }
  .ac-slide__tag { margin-bottom: 6px; }
  .ac-dots { right: 12px; bottom: 12px; }
  .ac-art-list { grid-template-columns: 1fr; }
  .ac-footer { padding-bottom: 20px; }
}

@media (max-width: 400px) {
  .ac-grid { grid-template-columns: 1fr; }
  .ac-logo { font-size: 19px; }
}

/* ==========================================================================
   分区列表页 / 搜索结果页
   ========================================================================== */
#ac-rank { scroll-margin-top: calc(var(--ac-header-h) + 12px); }

.ac-page { padding-top: 16px; }

.ac-crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ac-text-3);
}
.ac-crumb a:hover { color: var(--ac-primary); }
.ac-crumb em { font-style: normal; color: var(--ac-text-2); }

.ac-pagehead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin: 14px 0 16px; padding: 20px 22px;
  border-radius: var(--ac-r-lg); background: var(--ac-card); box-shadow: var(--ac-shadow);
}
.ac-pagehead__title { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.ac-pagehead__meta { margin-top: 6px; font-size: 13px; color: var(--ac-text-3); }
.ac-pagehead__meta em { font-style: normal; color: var(--ac-primary); }

.ac-filter { display: flex; flex-wrap: wrap; gap: 14px; }
.ac-filter a { font-size: 14px; color: var(--ac-text-2); }
.ac-filter a:hover { color: var(--ac-primary); }
.ac-filter a.is-active { color: var(--ac-primary); font-weight: 600; }

.ac-search--big { max-width: 560px; margin: 0 0 6px; }

.ac-empty {
  padding: 46px 0; text-align: center;
  color: var(--ac-text-3); font-size: 14px;
}
.ac-empty[hidden] { display: none; }

/* 侧栏榜单 */
.ac-side { display: grid; gap: var(--ac-gap); }
.ac-side-rank {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13px; color: var(--ac-text-2);
}
.ac-side-rank:hover { color: var(--ac-primary); }
.ac-side-rank i {
  width: 18px; flex: none; text-align: center;
  font-style: normal; font-weight: 700; color: var(--ac-text-3);
}
.ac-side-rank:nth-child(-n+4) i { color: var(--ac-primary); }
.ac-side-rank img {
  width: 64px; height: 40px; flex: none; border-radius: 6px;
  object-fit: cover; background: var(--ac-line);
}
.ac-side-rank span {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* 分页：适配苹果CMS原生 {$pages} 输出 */
.ac-pager { margin-top: 22px; }
.mac_pages {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; font-size: 13px; color: var(--ac-text-3);
}
.mac_pages a, .mac_pages span {
  min-width: 32px; height: 32px; line-height: 30px; padding: 0 10px;
  text-align: center; border: 1px solid var(--ac-line); border-radius: 8px;
  background: var(--ac-card); color: var(--ac-text-2);
}
.mac_pages a:hover { color: var(--ac-primary); border-color: var(--ac-primary); }
.mac_pages .page_curr, .mac_pages .cur, .mac_pages .disabled {
  color: #fff; border-color: transparent; background: var(--ac-primary);
}
.mac_pages .page_tip { border: 0; background: transparent; color: var(--ac-text-3); }

@media (max-width: 760px) {
  .ac-pagehead { flex-direction: column; align-items: flex-start; padding: 16px; }
  .ac-pagehead__title { font-size: 20px; }
  .ac-search--big { max-width: none; }
  .ac-side-rank img { width: 56px; height: 36px; }
}

/* ==========================================================================
   文章详情页
   ========================================================================== */
.ac-article {
  background: var(--ac-card); border-radius: var(--ac-r-lg);
  padding: 30px 36px; box-shadow: var(--ac-shadow);
}
.ac-article__title { font-size: 28px; line-height: 1.4; font-weight: 800; letter-spacing: .3px; }

/* 标题下的作者 / 时间 / 阅读量 */
.ac-article__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 14px; padding-bottom: 16px;
  border-bottom: 1px solid var(--ac-line);
  font-size: 13px; color: var(--ac-text-3);
}
.ac-article__meta > span { display: inline-flex; align-items: center; gap: 5px; }

/* 封面 */
.ac-article__cover { margin: 20px 0 0; border-radius: var(--ac-r); overflow: hidden; background: var(--ac-card-2); }
.ac-article__cover img { width: 100%; max-height: 420px; object-fit: cover; }

/* 导语（取自 art_blurb） */
.ac-article__lead {
  margin-top: 20px; padding: 14px 18px;
  border-left: 3px solid var(--ac-primary); border-radius: 0 var(--ac-r-sm) var(--ac-r-sm) 0;
  background: var(--ac-primary-soft); color: var(--ac-text-2); font-size: 14px; line-height: 1.8;
}

/* ---------------- 正文排版（后台富文本输出） ---------------- */
.ac-article__content {
  margin-top: 22px; font-size: 15px; line-height: 1.9;
  color: var(--ac-text); word-break: break-word;
}
.ac-article__content > * + * { margin-top: 16px; }
.ac-article__content p { color: var(--ac-text-2); }
.ac-article__content h2 { font-size: 20px; font-weight: 700; margin-top: 30px; }
.ac-article__content h3 { font-size: 17px; font-weight: 700; margin-top: 24px; }
.ac-article__content img { margin: 10px auto; border-radius: var(--ac-r); }
.ac-article__content a { color: var(--ac-primary); text-decoration: underline; text-underline-offset: 3px; }
.ac-article__content blockquote {
  margin: 18px 0; padding: 12px 18px;
  border-left: 3px solid var(--ac-line); border-radius: 0 var(--ac-r-sm) var(--ac-r-sm) 0;
  background: var(--ac-card-2); color: var(--ac-text-2);
}
/* 站点重置了列表样式，正文里恢复 */
.ac-article__content ul, .ac-article__content ol { padding-left: 24px; color: var(--ac-text-2); }
.ac-article__content ul { list-style: disc; }
.ac-article__content ol { list-style: decimal; }
.ac-article__content li + li { margin-top: 6px; }
.ac-article__content code {
  padding: 2px 6px; border-radius: 4px;
  background: var(--ac-card-2); font-size: 13px;
}
.ac-article__content pre {
  padding: 14px 16px; overflow-x: auto; border-radius: var(--ac-r);
  background: #1d1e21; color: #e9ebef;
  font-size: 13px; line-height: 1.7;
}
.ac-article__content pre code { padding: 0; background: transparent; color: inherit; }
.ac-article__content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ac-article__content th, .ac-article__content td {
  padding: 8px 12px; border: 1px solid var(--ac-line); text-align: left;
}
.ac-article__content th { background: var(--ac-card-2); font-weight: 600; }
.ac-article__content hr { border: 0; border-top: 1px solid var(--ac-line); margin: 24px 0; }

/* 底部：分类与返回 */
.ac-article__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ac-line);
}
.ac-article__tags { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ac-text-3); }
.ac-article__tag-label { display: inline-flex; align-items: center; gap: 4px; }
.ac-article__tags a {
  padding: 3px 10px; border-radius: 12px;
  background: var(--ac-primary-soft); color: var(--ac-primary);
}

/* 相关文章 */
.ac-article__related { margin-top: var(--ac-gap); }

@media (max-width: 760px) {
  .ac-article { padding: 20px 18px; }
  .ac-article__title { font-size: 21px; }
  .ac-article__content { font-size: 14px; }
  .ac-article__foot { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   评论频道（全站评论列表 / 评论详情）
   ========================================================================== */
.ac-cmtfeed__list { display: flex; flex-direction: column; gap: 12px; }

.ac-cmtfeed__item {
  display: flex; gap: 12px;
  padding: 16px 18px;
  background: var(--ac-card); border-radius: var(--ac-r-lg);
  box-shadow: var(--ac-shadow);
  transition: box-shadow .2s;
}
.ac-cmtfeed__item:hover { box-shadow: var(--ac-shadow-hover); }

.ac-cmtfeed__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #ffb066, #ff6a00);
}

.ac-cmtfeed__main { flex: 1; min-width: 0; }
.ac-cmtfeed__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-cmtfeed__name { font-size: 14px; font-weight: 600; color: var(--ac-text); }
.ac-cmtfeed__time { font-size: 12px; color: var(--ac-text-3); }
.ac-cmtfeed__text {
  margin-top: 8px; font-size: 14px; line-height: 1.75;
  color: var(--ac-text); word-break: break-word;
}

/* 评论所属稿件卡片 */
.ac-cmtfeed__vod {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 8px 10px;
  border-radius: var(--ac-r); background: var(--ac-card-2);
  transition: background-color .15s;
}
.ac-cmtfeed__vod:hover { background: var(--ac-primary-soft); }
.ac-cmtfeed__vod img {
  width: 96px; height: 56px; flex: none;
  object-fit: cover; border-radius: var(--ac-r-sm); background: var(--ac-line);
}
.ac-cmtfeed__vod-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-cmtfeed__vod-name {
  font-size: 13px; font-weight: 600; color: var(--ac-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-cmtfeed__vod-sub {
  font-size: 12px; color: var(--ac-text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ac-cmtfeed__meta {
  display: flex; align-items: center; gap: 16px;
  margin-top: 12px; font-size: 12px; color: var(--ac-text-3);
}
.ac-cmtfeed__meta a { color: var(--ac-primary); }
.ac-cmtfeed__meta a:hover { text-decoration: underline; }

.ac-cmtfeed__more { margin-top: 6px; text-align: center; }

/* ---------------- 评论详情 ---------------- */
.ac-cmtdetail {
  padding: 24px 26px;
  background: var(--ac-card); border-radius: var(--ac-r-lg);
  box-shadow: var(--ac-shadow);
}
.ac-cmtdetail__head { display: flex; align-items: center; gap: 12px; }
.ac-cmtdetail__title { font-size: 18px; font-weight: 700; }
.ac-cmtdetail__meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 4px; font-size: 12px; color: var(--ac-text-3);
}
.ac-cmtdetail__text {
  margin-top: 18px; font-size: 16px; line-height: 1.9;
  color: var(--ac-text); word-break: break-word;
}

.ac-cmtdetail__vod {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 12px;
  border-radius: var(--ac-r); background: var(--ac-card-2);
  transition: background-color .15s;
}
.ac-cmtdetail__vod:hover { background: var(--ac-primary-soft); }
.ac-cmtdetail__vod img {
  width: 140px; height: 80px; flex: none;
  object-fit: cover; border-radius: var(--ac-r-sm); background: var(--ac-line);
}

.ac-cmtdetail__replies { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ac-line); }
.ac-cmtdetail__replies-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.ac-cmtdetail__reply {
  padding: 10px 0; font-size: 14px; line-height: 1.7;
  border-bottom: 1px dashed var(--ac-line); color: var(--ac-text-2);
}
.ac-cmtdetail__reply:last-child { border-bottom: 0; }
.ac-cmtdetail__reply b { margin-right: 8px; font-weight: 600; color: var(--ac-text); }
.ac-cmtdetail__reply time { margin-left: 8px; font-size: 12px; color: var(--ac-text-3); }
.ac-cmtdetail__noreply { padding: 10px 0; font-size: 13px; color: var(--ac-text-3); }
.ac-cmtdetail__cta { margin-top: 20px; }

@media (max-width: 760px) {
  .ac-cmtfeed__item { padding: 14px; }
  .ac-cmtfeed__vod img { width: 72px; height: 44px; }
  .ac-cmtdetail { padding: 18px 16px; }
  .ac-cmtdetail__text { font-size: 15px; }
  .ac-cmtdetail__vod { align-items: flex-start; }
  .ac-cmtdetail__vod img { width: 100px; height: 60px; }
}

/* 评论须知列表 / 详情返回 */
.ac-cmtfeed__rules { padding: 4px 0 2px; }
.ac-cmtfeed__rules li {
  position: relative; padding: 6px 0 6px 14px;
  font-size: 13px; line-height: 1.7; color: var(--ac-text-2);
}
.ac-cmtfeed__rules li::before {
  content: ""; position: absolute; left: 2px; top: 14px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--ac-primary);
}
.ac-cmtdetail__back { margin-top: var(--ac-gap); }
