:root {
  --theme: #f5b301;      /* 主强调色（金） */
  --accent: #2f6fed;     /* 次强调色（蓝） */
  --bg: #0b0f17;         /* 页面背景 */
  --bg2: #111726;        /* 卡片背景 */
  --bg3: #0f1420;        /* 深块 */
  --line: #1e2739;
  --text: #e8edf6;
  --muted: #8a95a8;
  --radius: 14px;
}

/* ============ 配色方案（data-theme 切换）============ */
body[data-theme="night"] {
  --bg: #0a1424; --bg2: #0f2036; --bg3: #0c1a2e; --line: #1c3350; --text: #e6f0fb; --muted: #8aa0bd;
}
body[data-theme="purple"] {
  --bg: #120a1f; --bg2: #1d1030; --bg3: #170c28; --line: #33234d; --text: #f0e9fb; --muted: #a794c2;
}
body[data-theme="green"] {
  --bg: #08140f; --bg2: #0f2018; --bg3: #0c1a13; --line: #1d3a2b; --text: #e7f5ec; --muted: #8fb3a0;
}
body[data-theme="rose"] {
  --bg: #1a0f14; --bg2: #2a1620; --bg3: #221019; --line: #4a2636; --text: #fbe9f0; --muted: #c294a8;
}
body[data-theme="ocean"] {
  --bg: #05171c; --bg2: #0a2830; --bg3: #082026; --line: #144a55; --text: #e4f7fb; --muted: #86b6c0;
}
body[data-theme="light"] {
  --bg: #eef1f7; --bg2: #ffffff; --bg3: #f4f6fb; --line: #dde3ec; --text: #1a2233; --muted: #667085;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #16233d 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--theme); text-decoration: none; }

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  max-width: 1080px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.brand-text h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.brand-text h1 span.hl { color: var(--theme); }
.brand-text p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topnav { display: flex; gap: 10px; flex-wrap: wrap; }
.topnav a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  transition: .2s;
}
.topnav a:hover { border-color: var(--theme); color: var(--theme); }

/* 轮播 */
.banner {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 0 22px;
  position: relative;
}
.banner-track {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.banner-track .slide {
  min-width: 100%;
  transition: transform .5s ease;
}
.banner-track img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}
.banner-dots {
  display: flex; gap: 8px; justify-content: center;
  position: absolute; bottom: 12px; left: 0; right: 0;
}
.banner-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer; transition: .2s;
}
.banner-dots span.active { background: var(--theme); width: 22px; border-radius: 6px; }

/* 公告 */
.marquee {
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 10px 22px;
  color: var(--theme);
  overflow: hidden;
  white-space: nowrap;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 18s linear infinite;
}
@keyframes scroll { to { transform: translateX(-100%); } }

/* 容器 */
.container { max-width: 1080px; margin: 8px auto 0; padding: 20px 22px 70px; }

/* 内容块 */
.block { margin: 20px 0; }
.block.align-center { text-align: center; }
.block.align-right { text-align: right; }

/* 区块标题 */
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; margin: 30px 0 14px;
}
.section-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--theme);
}

/* 文本块 */
.card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.text-block .content { white-space: pre-wrap; }
.text-block.size-large .content { font-size: 21px; font-weight: 600; }
.text-block.size-small .content { font-size: 14px; color: var(--muted); }
.text-block .note { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* 媒体块 */
.media-block .media-frame { display: block; cursor: zoom-in; position: relative; }
.media-block .media-frame::after {
  content: '⤢'; position: absolute; right: 10px; bottom: 10px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1;
  padding: 6px 8px; border-radius: 6px; opacity: 0; transition: opacity .2s;
}
.media-block .media-frame:hover::after { opacity: 1; }
.media-block img, .media-block video {
  max-width: 100%; border-radius: var(--radius); display: block; margin: 0 auto;
}
.media-block .caption { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: center; }

/* 链接块 */
.link-block a.button {
  display: inline-block;
  background: linear-gradient(135deg, var(--theme), #ffcf4d);
  color: #1a1200; padding: 12px 30px; border-radius: 999px; font-weight: 700;
}
.link-block a.button:hover { filter: brightness(1.05); }
.link-block a.text-link { font-weight: 600; }

/* 卡片列表（担保导航风格） */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.item-card {
  background: linear-gradient(180deg, var(--bg2), var(--bg3));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
  transition: .2s;
}
.item-card:hover { transform: translateY(-3px); border-color: var(--theme); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.item-card .rank {
  position: absolute; top: 0; right: 0;
  background: var(--theme); color: #1a1200; font-weight: 800;
  padding: 4px 12px; border-bottom-left-radius: 12px; font-size: 13px;
}
.item-card .ic-head { display: flex; align-items: center; gap: 12px; }
.item-card .ic-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #223; }
.item-card .ic-title { font-size: 17px; font-weight: 700; }
.item-card .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.item-card .badge {
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: rgba(47,111,237,.15); color: #7aa7ff; border: 1px solid rgba(47,111,237,.3);
}
.item-card .badge.gold { background: rgba(245,179,1,.14); color: var(--theme); border-color: rgba(245,179,1,.35); }
.item-card .ic-desc { color: var(--muted); font-size: 14px; flex: 1; }
.item-card .ic-btn {
  align-self: flex-start;
  background: rgba(245,179,1,.12);
  border: 1px solid var(--theme);
  color: var(--theme);
  padding: 8px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.item-card .ic-btn:hover { background: var(--theme); color: #1a1200; }

/* 底部 */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 26px 22px 40px;
  white-space: pre-wrap;
}
.site-footer .copyright { margin-top: 10px; opacity: .7; }

/* 富文本内容块 */
.html-block .rich-content { font-size: 15px; line-height: 1.8; word-break: break-word; }
.html-block .rich-content h1,
.html-block .rich-content h2,
.html-block .rich-content h3 { color: var(--text); margin: 12px 0 8px; }
.html-block .rich-content a { color: var(--theme); text-decoration: underline; }
.html-block .rich-content img { max-width: 100%; border-radius: 8px; }
.html-block .rich-content blockquote {
  border-left: 3px solid var(--theme); margin: 10px 0; padding: 4px 14px; color: var(--muted);
}
.html-block .rich-content pre {
  background: #0b1120; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; overflow: auto;
}
.html-block .rich-content code { background: #0b1120; padding: 2px 6px; border-radius: 4px; }
.html-block .rich-content ul,
.html-block .rich-content ol { padding-left: 22px; }
.html-block .rich-content table { border-collapse: collapse; width: 100%; }
.html-block .rich-content td,
.html-block .rich-content th { border: 1px solid var(--line); padding: 6px 10px; }

/* 轮播箭头 */
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  font-size: 26px; line-height: 1; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.banner-arrow:hover { background: var(--theme); color: #1a1200; }
.banner-arrow.prev { left: 30px; }
.banner-arrow.next { right: 30px; }

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line); color: var(--text);
  font-size: 20px; width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}

/* ============ 响应式 ============ */
/* 平板 */
@media (max-width: 900px) {
  .banner-arrow.prev { left: 30px; }
  .banner-arrow.next { right: 30px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* 手机 */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; position: relative; }
  .nav-toggle { display: block; }
  .topnav {
    display: none; flex-direction: column; width: 100%;
    margin-top: 12px; gap: 8px;
  }
  .topnav.open { display: flex; }
  .topnav a { text-align: center; }
  .brand-text h1 { font-size: 19px; }
  .brand-text p { font-size: 12px; }
  .logo { width: 40px; height: 40px; }

  .banner, .marquee, .container { padding-left: 14px; padding-right: 14px; }
  .banner-track img { aspect-ratio: 16 / 9; }
  .banner-arrow { width: 34px; height: 34px; font-size: 22px; }
  .banner-arrow.prev { left: 18px; }
  .banner-arrow.next { right: 18px; }

  .card-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 16px; margin: 22px 0 12px; }
  .text-block.size-large .content { font-size: 18px; }
  .card { padding: 15px 16px; }
  .link-block a.button { width: 100%; text-align: center; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .brand-text h1 { font-size: 17px; }
  .item-card { padding: 15px; }
}

/* 链接列表（联系方式公示风格） */
.linklist-block { padding: 6px 4px; }
.linklist-block .link-row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 11px 16px; border-bottom: 1px dashed var(--line);
}
.linklist-block .link-row:last-child { border-bottom: none; }
.linklist-block .lr-label {
  color: var(--muted); min-width: 120px; font-size: 14px;
}
.linklist-block .lr-value {
  color: var(--theme); font-weight: 600; word-break: break-all;
  position: relative; transition: color .2s;
}
.linklist-block a.lr-value::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--theme); transition: width .3s;
}
.linklist-block a.lr-value:hover { color: #ffd873; }
.linklist-block a.lr-value:hover::after { width: 100%; }
.linklist-block .lr-value.plain { color: var(--text); font-weight: 400; }
@media (max-width: 640px) {
  .linklist-block .lr-label { min-width: 0; }
}

/* 大屏优化 */
@media (min-width: 1200px) {
  .topbar, .banner, .marquee, .container { max-width: 1120px; }
}

/* ============================================================
   动态效果 + 3D 立体层
   ============================================================ */

/* 关键帧 */
@keyframes bgMove {
  0%   { background-position: 0% 0%, 0% 0%; }
  50%  { background-position: 40% 30%, 100% 60%; }
  100% { background-position: 0% 0%, 0% 0%; }
}
@keyframes float3d {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-6px) rotate(-2deg); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 rgba(245,179,1,0); }
  50%     { box-shadow: 0 0 22px rgba(245,179,1,.45); }
}
@keyframes shine {
  0%   { transform: translateX(-120%) skewX(-20deg); }
  60%,100% { transform: translateX(220%) skewX(-20deg); }
}
@keyframes borderFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badgeBlink {
  0%,100% { opacity: 1; }
  50%     { opacity: .55; }
}
@keyframes rankShine {
  0%   { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}
@keyframes dotBounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-4px); }
}

/* 静态多层渐变背景（不再持续动画，性能友好） */
body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(47,111,237,.16), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(245,179,1,.12), transparent 60%),
    radial-gradient(1200px 600px at 50% -10%, #16233d 0%, var(--bg) 60%);
  background-attachment: scroll;
}

/* 顶栏品牌：Logo 3D 漂浮 */
.logo { animation: float3d 5s ease-in-out infinite; transform-style: preserve-3d; }
.brand-text h1 { transition: text-shadow .3s; }
.brand:hover .brand-text h1 { text-shadow: 0 0 18px rgba(245,179,1,.5); }

/* 顶部导航：下划线滑入 + 悬浮 */
.topnav a { position: relative; overflow: hidden; }
.topnav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 2px;
  background: var(--theme); transition: left .25s, right .25s;
}
.topnav a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(245,179,1,.18); }
.topnav a:hover::after { left: 14px; right: 14px; }

/* 区块标题：渐变竖条（静态） */
.section-title::before {
  background: linear-gradient(180deg, var(--theme), var(--accent));
}

/* 卡片通用：悬停过渡（去掉全局 will-change 避免占内存） */
.card, .item-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.45); border-color: rgba(245,179,1,.35); }

/* 卡片列表：流光边框（仅 hover 时才运行动画）+ 扫光 + 3D 悬浮 */
.item-card { isolation: isolate; transform-style: preserve-3d; }
.item-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  padding: 1px; opacity: 0; transition: opacity .3s;
  background: linear-gradient(120deg, var(--theme), var(--accent), var(--theme));
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.item-card::after {
  content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  transform: translateX(-120%) skewX(-20deg); pointer-events: none;
}
.item-card:hover::before { opacity: 1; animation: borderFlow 3s linear infinite; }
.item-card:hover::after { animation: shine 1s ease; }
/* 卡片内部元素做 3D 分层，配合 vanilla-tilt */
.item-card .ic-head, .item-card .ic-title { transform: translateZ(28px); }
.item-card .badges { transform: translateZ(20px); }
.item-card .ic-btn { transform: translateZ(36px); }
.item-card .rank { transform: translateZ(40px); }

/* 排名徒标：静态金色 */
.item-card .rank {
  background: var(--theme);
}

/* 徒章 */
.item-card .badge.gold { }

/* 进入按钮 & 链接按钮：扫光 + 3D 抬起 + 光晕 */
.link-block a.button, .item-card .ic-btn {
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .25s, background .2s, color .2s;
}
.link-block a.button::before, .item-card .ic-btn::before {
  content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-140%) skewX(-20deg);
}
.link-block a.button:hover, .item-card .ic-btn:hover {
  transform: translateY(-3px); box-shadow: 0 10px 24px rgba(245,179,1,.35);
}
.link-block a.button:hover::before, .item-card .ic-btn:hover::before { animation: shine .9s ease; }

/* 文本链接：滑动下划线 */
.link-block a.text-link, .html-block .rich-content a {
  position: relative; text-decoration: none; background-image: linear-gradient(var(--theme), var(--theme));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s;
}
.link-block a.text-link:hover, .html-block .rich-content a:hover { background-size: 100% 2px; }

/* 媒体块：3D 反光边框 */
.media-block .media-frame { transform-style: preserve-3d; transition: box-shadow .3s; }
.media-block .media-frame:hover { box-shadow: 0 18px 40px rgba(0,0,0,.5); }

/* 轮播圆点：跳动 */
.banner-dots span.active { animation: dotBounce 1.4s ease-in-out infinite; }

/* 箭头：悬停放大回弹 */
.banner-arrow { transition: transform .2s, background .2s, color .2s; }
.banner-arrow:hover { transform: translateY(-50%) scale(1.15); }

/* 公告条：小图标脉冲（用左侧竖条模拟） */
.marquee { border-left: 3px solid var(--theme); border-radius: 4px; }

/* vanilla-tilt 反光层圆角 */
.item-card .js-tilt-glare, .media-frame .js-tilt-glare, .button .js-tilt-glare { border-radius: inherit; }

/* 内容块整体入场（无 JS 时的兜底动画） */
.no-aos .block { animation: fadeUp .6s ease both; }

/* 尊重"减少动效"系统偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body { background-attachment: scroll; }
}

/* ============================================================
   玻璃液体效果（Glassmorphism + Liquid）
   在后台勾选"玻璃液体效果"后，body 加 .glass 类启用
   ============================================================ */
@keyframes blobFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(8vw, 6vh) scale(1.15); }
  66%     { transform: translate(-6vw, 10vh) scale(.9); }
}
@keyframes blobFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(-10vw, 8vh) scale(1.2); }
  66%     { transform: translate(7vw, -6vh) scale(.95); }
}
@keyframes blobFloat3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(6vw, -8vh) scale(1.25); }
}

/* 流动的彩色液体光斑背景 */
body.glass { position: relative; overflow-x: hidden; }
body.glass::before,
body.glass::after {
  content: ""; position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(80px); opacity: .55; pointer-events: none; will-change: transform;
}
body.glass::before {
  width: 46vw; height: 46vw; left: -8vw; top: -6vw;
  background: radial-gradient(circle at 30% 30%, var(--theme), transparent 70%);
  animation: blobFloat1 22s ease-in-out infinite;
}
body.glass::after {
  width: 42vw; height: 42vw; right: -10vw; top: 20vh;
  background: radial-gradient(circle at 60% 40%, var(--accent), transparent 70%);
  animation: blobFloat2 26s ease-in-out infinite;
}
/* 第三个光斑（挂在容器上） */
body.glass .container::before {
  content: ""; position: fixed; z-index: -2; border-radius: 50%;
  width: 38vw; height: 38vw; left: 30vw; bottom: -12vw;
  background: radial-gradient(circle at 50% 50%, #a855f7, transparent 70%);
  filter: blur(90px); opacity: .35; pointer-events: none;
  animation: blobFloat3 30s ease-in-out infinite;
}

/* 玻璃卡片：半透明 + 毛玻璃模糊 + 高光边 */
body.glass .card,
body.glass .item-card,
body.glass .topbar,
body.glass .marquee,
body.glass .login-card {
  background: color-mix(in srgb, var(--bg2) 55%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
body.glass .item-card {
  background: color-mix(in srgb, var(--bg2) 45%, transparent);
}
/* 顶栏玻璃：固定悬浮质感 */
body.glass .topbar {
  border-radius: 0; border: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
/* 导航胶囊玻璃化 */
body.glass .topnav a {
  background: color-mix(in srgb, var(--bg2) 40%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255,255,255,.15);
}
/* 玻璃高光扫过 */
body.glass .card::after,
body.glass .item-card::after { mix-blend-mode: screen; }
/* 液体反光顶边 */
body.glass .card, body.glass .item-card { position: relative; }
body.glass .card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 40%);
}

/* 亮色主题下玻璃描边调深，保证可读 */
body[data-theme="light"].glass .card,
body[data-theme="light"].glass .item-card,
body[data-theme="light"].glass .topbar,
body[data-theme="light"].glass .marquee {
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 8px 32px rgba(31,45,80,.12), inset 0 1px 0 rgba(255,255,255,.6);
}

/* 不支持 backdrop-filter 时的降级：加深半透明背景 */
@supports not (backdrop-filter: blur(2px)) {
  body.glass .card, body.glass .item-card, body.glass .topbar,
  body.glass .marquee, body.glass .login-card {
    background: color-mix(in srgb, var(--bg2) 92%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.glass::before, body.glass::after, body.glass .container::before { animation: none; }
}
