/* ============================================================
   AI 学院模块样式
   全部限定在 .ac- 命名空间内，不会影响主题其它页面
   注意：CSS 变量定义在 .ac-entry / .ac-hub / .ac-player 三个作用域上，
        因为「站内阅读器」是 .ac-hub 的兄弟节点，变量不能只挂在 .ac-hub 上。
   ============================================================ */
.ac-entry,
.ac-hub,
.ac-player {
  --ac-c1: #ff7eb6;
  --ac-c2: #9d7bff;
  --ac-c3: #56ccf2;
  --ac-ink: #241d2e;
  --ac-dim: #6d6480;
  --ac-line: rgba(120, 100, 140, .16);
  --ac-card: #ffffff;
}
.ac-hub {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ac-ink);
}

/* ---------- 顶部主视觉 ---------- */
.ac-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 30px 28px;
  margin-bottom: 20px;
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(255, 126, 182, .22), transparent 60%),
    radial-gradient(120% 130% at 92% 10%, rgba(157, 123, 255, .22), transparent 62%),
    linear-gradient(160deg, #fff7fb, #f4f1ff);
  border: 1px solid var(--ac-line);
}
.ac-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 204, 242, .22), transparent 68%);
  pointer-events: none;
}
.ac-kicker {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  letter-spacing: 3px;
  color: #b3538a;
  background: rgba(255, 126, 182, .14);
  border-radius: 99px;
}
.ac-hero h2 {
  margin: 14px 0 8px;
  font-size: clamp(26px, 4.6vw, 38px);
  line-height: 1.2;
  letter-spacing: 4px;
  border: none;
  padding: 0;
  background: linear-gradient(100deg, #3a2c46, var(--ac-c1) 55%, var(--ac-c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ac-hero p {
  margin: 0 0 16px;
  max-width: 640px;
  color: var(--ac-dim);
  font-size: 14px;
}
.ac-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  font-size: 12px;
  color: var(--ac-dim);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--ac-line);
  border-radius: 99px;
}
.ac-chip b { color: var(--ac-ink); }

/* ---------- 两个模块卡 ---------- */
.ac-mods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.ac-mod {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 16px;
  background: var(--ac-card);
  border: 1px solid var(--ac-line);
  box-shadow: 0 4px 18px rgba(70, 55, 90, .06);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1), box-shadow .28s ease, border-color .28s ease;
}
.ac-mod::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--ac-c1), var(--ac-c2));
}
.ac-mod[data-mod="adv"]::before { background: linear-gradient(var(--ac-c2), var(--ac-c3)); }
.ac-mod:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(70, 55, 90, .16);
  border-color: rgba(255, 126, 182, .38);
}
.ac-mod-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ac-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(255, 126, 182, .22), rgba(157, 123, 255, .22));
}
.ac-mod-top h3 {
  margin: 0 0 3px;
  font-size: 17px;
  letter-spacing: 1px;
  border: none;
  padding: 0;
}
.ac-en { font-size: 10.5px; letter-spacing: 2px; color: #9b93ab; text-transform: uppercase; }
.ac-mod p { margin: 0 0 14px; font-size: 13.5px; color: var(--ac-dim); }

.ac-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(120, 100, 140, .12);
  overflow: hidden;
}
.ac-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ac-c1), var(--ac-c2));
  transition: width .8s cubic-bezier(.22, .61, .36, 1);
}
.ac-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 16px;
  font-size: 12px;
  color: var(--ac-dim);
}
.ac-tip { color: #a79fb8; }
.ac-act { display: flex; gap: 8px; flex-wrap: wrap; }

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: .5px;
  color: var(--ac-dim);
  background: #faf9fd;
  border: 1px solid var(--ac-line);
  border-radius: 99px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}
.ac-btn:hover { color: var(--ac-ink); border-color: rgba(255, 126, 182, .5); transform: translateY(-1px); }
.ac-btn-main {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(100deg, var(--ac-c1), var(--ac-c2));
  box-shadow: 0 8px 20px rgba(255, 126, 182, .28);
}
.ac-btn-main:hover { color: #fff; filter: brightness(1.06); }

.ac-note {
  margin: 0;
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--ac-dim);
  background: rgba(255, 126, 182, .06);
  border: 1px dashed rgba(255, 126, 182, .3);
  border-radius: 12px;
}
.ac-note b { color: var(--ac-ink); }

/* ---------- 站内阅读器 ---------- */
.ac-player {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  background: #f4f2f8;
}
.ac-player[hidden] { display: none; }
.ac-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ac-line);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
.ac-player-title { font-size: 13.5px; font-weight: 600; }
.ac-player-prog { font-size: 12px; color: var(--ac-dim); }
.ac-spacer { flex: 1; }
.ac-player iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}
body.ac-locked { overflow: hidden; }

/* ---------- 深色主题下的适配（主题若开了夜间模式） ---------- */
.dark .ac-hero,
body.dark-theme .ac-hero,
.night .ac-hero {
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(255, 126, 182, .16), transparent 60%),
    linear-gradient(160deg, #23202e, #1b1926);
  border-color: rgba(255, 255, 255, .1);
}
.dark .ac-mod,
body.dark-theme .ac-mod,
.night .ac-mod { background: #23202e; border-color: rgba(255, 255, 255, .1); }
.dark .ac-hub,
body.dark-theme .ac-hub { color: #eceafa; --ac-ink: #eceafa; --ac-dim: #a9a2c0; }
.dark .ac-player,
body.dark-theme .ac-player { background: #1b1926; }
.dark .ac-player-bar,
body.dark-theme .ac-player-bar { background: rgba(35, 32, 46, .96); border-color: rgba(255, 255, 255, .1); }

/* ---------- 手机端 ---------- */
@media (max-width: 640px) {
  .ac-hero { padding: 22px 18px; }
  .ac-mod { padding: 18px; }
  .ac-act .ac-btn { flex: 1; }
  .ac-player-bar { gap: 6px; padding: 6px 8px; }
  .ac-player-title { width: 100%; }
}
