/* ============================================================
   Apple-style liquid glass + Huawei-style immersive light
   在奶油证书风上叠加：半透明玻璃、液体高光、跟随指针的环境光
   ============================================================ */

:root {
  --glass-bg: rgba(255, 253, 248, .50);
  --glass-bg-strong: rgba(255, 253, 248, .72);
  --glass-line: rgba(255, 255, 255, .72);
  --glass-rim: rgba(255, 255, 255, .92);
  --glass-shadow: rgba(92, 8, 18, .10);
  --px: 50%;
  --py: 18%;
}

/* 跟随指针的环境光，放在背景层 */
.light-field {
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--px) var(--py), rgba(255, 233, 166, .55), transparent 34%),
    radial-gradient(circle at calc(100% - var(--px)) calc(100% - var(--py)), rgba(255, 255, 255, .58), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(255, 214, 162, .22), transparent 55%);
  filter: blur(22px) saturate(1.15);
  transition: background .45s ease-out;
}
@media (hover: none) {
  .light-field { animation: light-drift 14s ease-in-out infinite alternate; }
}
@keyframes light-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

/* 顶部导航：液态玻璃 + 高光扫过 */
.site-head {
  background: linear-gradient(115deg, rgba(255, 253, 248, .66), rgba(255, 249, 238, .38)) !important;
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  backdrop-filter: blur(24px) saturate(185%);
  border-bottom-color: rgba(255, 255, 255, .68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(143, 18, 32, .05),
    0 10px 32px rgba(92, 8, 18, .06);
}
.site-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--px) var(--py), rgba(255, 240, 190, .34), transparent 70%);
}
.site-head::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -35%; width: 25%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .58), transparent);
  transform: skewX(-14deg);
  animation: glass-sheen 11s ease-in-out infinite;
}
@keyframes glass-sheen {
  0%, 58% { left: -35%; opacity: 0; }
  66% { opacity: .55; }
  90%, 100% { left: 115%; opacity: 0; }
}

/* 三横 / 关闭按钮：玻璃胶囊 */
.menu-toggle, .menu-close {
  background: rgba(255, 253, 248, .46) !important;
  border-color: rgba(255, 255, 255, .78) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 8px 24px rgba(92, 8, 18, .08);
}
.menu-toggle:hover, .menu-toggle:focus-visible,
.menu-close:hover, .menu-close:focus-visible {
  background: rgba(255, 253, 248, .78) !important;
  border-color: rgba(143, 18, 32, .35) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 30px rgba(92, 8, 18, .12);
}

/* 抽屉：更厚一层的液态玻璃 */
.menu-panel {
  background:
    radial-gradient(420px circle at var(--px) var(--py), rgba(255, 240, 190, .18), transparent 70%),
    linear-gradient(155deg, rgba(255, 253, 248, .82), rgba(250, 241, 226, .60)) !important;
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  backdrop-filter: blur(32px) saturate(190%);
  border-left: 1px solid rgba(255, 255, 255, .74);
  box-shadow:
    -32px 0 90px rgba(92, 8, 18, .16),
    inset 1px 0 0 rgba(255, 255, 255, .95);
}
.menu-links a:hover, .menu-links a:focus-visible,
.menu-links button:hover, .menu-links button:focus-visible {
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  border-radius: 12px;
}
.menu-links a, .menu-links button { border-radius: 2px; }

/* Hero 校徽：玻璃光环 */
.disc {
  background: rgba(255, 255, 255, .30);
  border: 1px solid rgba(255, 255, 255, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -12px 30px rgba(143, 18, 32, .06),
    0 24px 70px rgba(92, 8, 18, .14),
    0 0 90px rgba(255, 226, 150, .42);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}
.hero-title { text-shadow: 0 0 46px rgba(255, 226, 150, .28); }

/* 标签 / 访问计数：玻璃胶囊 */
.chips li, .live-stat {
  background: rgba(255, 253, 248, .46);
  border-color: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 8px 22px rgba(92, 8, 18, .06);
}
.live-stat { position: relative; overflow: hidden; }
.live-stat::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: pill-sheen 8s ease-in-out infinite;
}
@keyframes pill-sheen {
  0%, 60% { transform: translateX(-110%); opacity: 0; }
  70% { opacity: .45; }
  90%, 100% { transform: translateX(110%); opacity: 0; }
}

/* 主按钮：液体玻璃胶囊 */
.go, .club-btn, .btn-line {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 239, 198, .60)) !important;
  color: var(--red-deep) !important;
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -1px 0 rgba(143, 18, 32, .08),
    0 14px 32px rgba(92, 8, 18, .12);
}
.go::before, .club-btn::before, .btn-line::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .72) 48%, transparent 68%);
  transform: translateX(-130%);
  animation: btn-sheen 7s ease-in-out infinite;
}
@keyframes btn-sheen {
  0%, 55% { transform: translateX(-130%); opacity: 0; }
  66% { opacity: .6; }
  88%, 100% { transform: translateX(130%); opacity: 0; }
}
.go:hover, .go:focus-visible, .club-btn:hover, .club-btn:focus-visible, .btn-line:hover, .btn-line:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(143, 18, 32, .08),
    0 18px 40px rgba(92, 8, 18, .16);
}
.go .arr { color: var(--red-deep) !important; }

/* 内容卡片：玻璃 + 指针环境光 */
.club {
  background:
    radial-gradient(280px circle at var(--mx, 50%) var(--my, 20%), rgba(255, 245, 205, .46), transparent 68%),
    linear-gradient(145deg, rgba(255, 255, 255, .66), rgba(255, 251, 242, .38)) !important;
  border-color: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  backdrop-filter: blur(20px) saturate(155%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(143, 18, 32, .05),
    0 18px 44px rgba(92, 8, 18, .08);
}
.club.club-join {
  background:
    radial-gradient(340px circle at var(--mx, 50%) var(--my, 20%), rgba(255, 208, 150, .20), transparent 68%),
    linear-gradient(155deg, #a3182a, var(--red-deep)) !important;
  border-color: rgba(255, 255, 255, .22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 18px 44px rgba(92, 8, 18, .18);
}
.club.club-join .club-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 231, 170, .66)) !important;
  color: var(--red-deep) !important;
}

/* 内容页标题 / 页脚 */
h1 { text-shadow: 0 0 46px rgba(255, 226, 150, .24); }
.eyebrow { text-shadow: 0 0 24px rgba(255, 226, 150, .35); }
.foot { border-top-color: rgba(255, 255, 255, .55); }

/* 滚动条 */
* { scrollbar-color: rgba(143, 18, 32, .20) transparent; }

@media (prefers-reduced-motion: reduce) {
  .site-head::after,
  .live-stat::after,
  .go::before, .club-btn::before, .btn-line::before,
  .light-field { animation: none !important; }
  .light-field { transform: none !important; }
}

/* QQ 登录按钮：站内玻璃胶囊（企鹅图标 + 文字，不再用官方 76×24 图片） */
.head-actions { display: flex; align-items: center; gap: 10px; }
.qq-login {
  position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 30px; padding: 0 12px 0 5px; border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .86);
  background: linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(255, 246, 226, .68));
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), 0 6px 18px rgba(92, 8, 18, .10);
  color: #321618; text-decoration: none; line-height: 1; letter-spacing: .04em; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* 悬停时扫过一道光，和站内其它玻璃元素一致 */
.qq-login::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 66%);
  transform: translateX(-120%);
}
.qq-login:hover::after, .qq-login:focus-visible::after { animation: qq-login-sheen .65s ease; }
@keyframes qq-login-sheen { to { transform: translateX(120%); } }
.qq-login:hover, .qq-login:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 18, 32, .30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 24px rgba(92, 8, 18, .16);
}
.qq-login:focus-visible { outline: 2px solid rgba(143, 18, 32, .5); outline-offset: 2px; }
.qq-login-icon {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: #fff; object-fit: contain; padding: 1px;
  box-shadow: 0 1px 4px rgba(92, 8, 18, .16);
}
.qq-login-text { font-family: var(--sans, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif); font-size: 12px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .qq-login {
    border-color: rgba(255, 255, 255, .16);
    background: linear-gradient(150deg, rgba(46, 24, 26, .92), rgba(28, 14, 16, .84));
    color: #f6e8df;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 18px rgba(0, 0, 0, .42);
  }
  .qq-login:hover, .qq-login:focus-visible { border-color: rgba(233, 168, 162, .42); }
}
@media (prefers-reduced-motion: reduce) { .qq-login::after { display: none; } }
@media (max-width: 380px) {
  .head-actions { gap: 8px; }
  .qq-login { height: 28px; padding: 0 10px 0 4px; gap: 6px; }
  .qq-login-icon { width: 20px; height: 20px; }
  .qq-login-text { font-size: 11px; }
}

/* QQ 登录后的头像胶囊 */
.qq-profile { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; display: inline-flex; align-items: center; gap: 7px; max-width: 150px; padding: 3px 10px 3px 4px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(255,253,248,.55); color: var(--ink); text-decoration: none; font-size: 12px; line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.qq-profile img { width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: cover; }
.qq-profile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qq-profile:hover { border-color: rgba(143,18,32,.35); }
@media (max-width: 380px) { .qq-profile { gap: 5px; padding-right: 8px; } .qq-profile span { max-width: 58px; } }

html.skip-loader .loader { display: none !important; }

/* 修复环境光层的接缝：铺满视口、去掉可能产生硬边的 blur/transform */
html, body { background-color: var(--bg); }
/* 用 clip 不用 hidden：hidden 会让根元素/body 变成滚动容器，position: sticky 的吸顶导航会失效 */
html, body { overflow-x: clip; }
.light-field {
  inset: 0 !important;
  width: 100%;
  height: 100%;
  filter: none !important;
  background:
    radial-gradient(55% 45% at var(--px) var(--py), rgba(255, 233, 166, .42), transparent 70%),
    radial-gradient(50% 45% at calc(100% - var(--px)) calc(100% - var(--py)), rgba(255, 255, 255, .24), transparent 72%),
    radial-gradient(70% 50% at 50% 100%, rgba(255, 214, 162, .16), transparent 75%) !important;
}
@media (hover: none) {
  .light-field { animation: none !important; transform: none !important; }
}

/* 让全屏环境光层显示在 html 底色之上、内容之下 */
html { background-color: var(--bg); }
body { background-color: transparent !important; }

/* ---------- 页面切换过渡（nav.js 控制）----------
   离场：html.nav-leaving → body 淡出，然后才跳转；
   到达：页面头部内联脚本先加 html.nav-in → body 从透明淡入。
   只动 opacity，不给 body 加 transform，避免影响 fixed 层（环境光、吸顶导航、跑马灯）。
   入场动画不加 fill，跳转时才能正常过渡出淡出效果。 */
html.nav-in body { animation: nav-fade-in .22s cubic-bezier(.4, 0, .2, 1); }
@keyframes nav-fade-in { from { opacity: 0; } }
html.nav-leaving body {
  animation: none !important;
  opacity: 0 !important;
  transition: opacity .18s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.nav-in body, html.nav-leaving body { animation: none; opacity: 1 !important; transition: none; }
}
