/* ==========================================================
   龙城传世 · 特效层
   动画由 fx.js 配合驱动；系统开启"减少动态效果"时由 style.css 统一关闭
   ========================================================== */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes raySpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
/* 高光从左扫到右：第一层是 300% 宽的高光条 */
@keyframes sheen {
  0%       { background-position: 100% 0, 0 0; }
  45%, 100% { background-position: 0% 0, 0 0; }
}
@keyframes btnShine { 0% { left: -60%; } 55%, 100% { left: 140%; } }
@keyframes ring { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- 全局氛围 ---------- */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(216, 180, 106, .06) 1px, transparent 1.6px),
    radial-gradient(rgba(216, 180, 106, .035) 1px, transparent 1.6px);
  background-size: 26px 26px, 26px 26px;
  background-position: 0 0, 13px 13px;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(140, 70, 20, .22), transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(140, 25, 10, .2), transparent 70%);
}
.mainbox-top, .job, .videobox, .show, .jietu { background: transparent; }
.mainbox-top { background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(120, 80, 40, .25), transparent 70%); }

/* 滚动渐显（html.fx 由页面头部脚本添加，脚本失效时内容照常显示） */
.fx .reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .3, 1);
  transition-delay: var(--delay, 0s);
}
.fx .reveal.in { opacity: 1; transform: none; }

/* ---------- 进场加载 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #2c1a0f, #070402 70%);
  transition: opacity .8s ease, visibility .8s;
  animation: loaderFailsafe .6s 6s forwards;
}
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }
body.loaded .loader { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-magic {
  position: relative; width: 220px; height: 220px; margin: 0 auto 26px;
  color: #d8b46a; filter: drop-shadow(0 0 8px rgba(255, 170, 60, .7));
}
.mg-outer, .mg-inner { position: absolute; display: block; }
.mg-outer { inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.mg-inner { left: 15%; top: 15%; width: 70%; height: 70%; animation: spin 12s linear infinite reverse; }
.loader-logo {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 76px/1 var(--font-brush); color: #fff3cf;
  text-shadow: 0 0 20px #ff9b2e, 0 0 44px #c9332a;
  animation: logoPulse 1.6s ease-in-out infinite;
}
@keyframes logoPulse { 50% { transform: scale(1.08); text-shadow: 0 0 30px #ffb84a, 0 0 64px #e0453a; } }
.loader-bar { width: 260px; height: 3px; margin: 0 auto; background: rgba(216, 180, 106, .15); overflow: hidden; }
.loader-bar i {
  display: block; width: 0; height: 100%;
  background: linear-gradient(90deg, #8a120c, #ffb84a, #fff3cf);
  box-shadow: 0 0 12px #ffb84a;
}
.loader-tip { margin-top: 14px; font-size: 13px; letter-spacing: 3px; color: #a08c6c; }

/* ---------- 顶部导航 ---------- */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #d8b46a 30%, #ffe3a3 50%, #d8b46a 70%, transparent);
  opacity: .55;
}
.tb-cta {
  position: relative; overflow: hidden; margin-left: auto; flex-shrink: 0;
  height: 32px; padding: 0 22px; line-height: 30px; font-size: 14px; letter-spacing: 2px; color: #fff;
  background: linear-gradient(180deg, #ff7356, #c4251a 60%, #8a120c);
  border: 1px solid #ffb39a; border-radius: 3px;
  box-shadow: 0 0 14px rgba(255, 90, 50, .5);
}
.tb-cta::after, .fb-kefu::after, .btn-dl::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); pointer-events: none;
  animation: btnShine 3.2s ease-in-out infinite;
}
.tb-cta span { position: relative; z-index: 1; }

/* ---------- 首屏：景深视差 ---------- */
.px {
  position: absolute; inset: 0 -40px;
  translate: calc(var(--mx, 0) * var(--d, 0) * 1px) 0;
  transition: translate .5s cubic-bezier(.2, .6, .3, 1);
}
.godrays {
  position: absolute; left: 22%; top: 58%; width: 1500px; height: 1500px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 232, 190, .12) 0deg 3deg, transparent 3deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: raySpin 140s linear infinite;
  mix-blend-mode: screen;
}
.mist {
  position: absolute; left: 0; width: 200%; pointer-events: none;
  background:
    radial-gradient(ellipse 22% 50% at 20% 50%, rgba(255, 226, 205, .24), transparent 70%),
    radial-gradient(ellipse 28% 42% at 58% 62%, rgba(255, 220, 195, .2), transparent 70%),
    radial-gradient(ellipse 18% 40% at 88% 40%, rgba(255, 232, 212, .22), transparent 70%);
  background-size: 50% 100%; background-repeat: repeat-x;
  animation: mist 50s linear infinite;
}
.mist-back { bottom: 20%; height: 26%; }
.mist-front { bottom: -4%; height: 24%; opacity: .75; animation-duration: 32s; }
@keyframes mist { to { transform: translateX(-50%); } }

.embers { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }

.game-logo, .slogan-wrap {
  translate: calc(var(--mx, 0) * 12px) calc(var(--my, 0) * 8px);
  transition: translate .5s cubic-bezier(.2, .6, .3, 1);
}
.slogan-wrap { translate: calc(var(--mx, 0) * 18px) calc(var(--my, 0) * 10px); }

.logo-magic {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 340px; margin: -170px 0 0 -170px;
  color: rgba(255, 214, 140, .5); pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 160, 60, .9));
}
.logo-magic .mg-outer { animation-duration: 40s; }
.logo-magic .mg-inner { animation-duration: 26s; }
.gl-text { z-index: 1; }

.gl-main {
  background-image:
    linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%),
    linear-gradient(180deg, #fff6d0 0%, #f2c766 45%, #b9741e 80%, #f7d98a 100%);
  background-size: 300% 100%, 100% 100%;
  animation: sheen 5s 1.5s ease-in-out infinite;
}
.slogan {
  background-image:
    linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%),
    linear-gradient(180deg, #fff3c4 0%, #f0c35a 50%, #a8601a 100%);
  background-size: 300% 100%, 100% 100%;
  animation: sheen 5s 3s ease-in-out infinite;
}

/* 加载完成后的入场 */
body.loaded .logo-magic { animation: magicIn 1.4s .2s cubic-bezier(.2, .8, .3, 1) both; }
body.loaded .gl-main { animation: stampIn .9s .1s cubic-bezier(.2, 1.3, .4, 1) both, sheen 5s 1.5s ease-in-out infinite; }
body.loaded .gl-seal { animation: sealIn .45s .85s cubic-bezier(.3, 1.6, .5, 1) both; }
body.loaded .banner-inner { animation: shake .35s .95s both; }
body.loaded .slogan-wrap { animation: dropIn 1s .5s cubic-bezier(.2, .8, .3, 1) both; }
body.loaded .gamedown > * { animation: riseIn .7s cubic-bezier(.2, .8, .3, 1) both; }
body.loaded .gamedown > :nth-child(1) { animation-delay: .9s; }
body.loaded .gamedown > :nth-child(2) { animation-delay: 1.02s; }
body.loaded .gamedown > :nth-child(3) { animation-delay: 1.14s; }
@keyframes magicIn { from { opacity: 0; transform: scale(.2) rotate(-90deg); } }
@keyframes stampIn { from { opacity: 0; transform: scale(2.4); } 60% { opacity: 1; transform: scale(.94); } }
@keyframes sealIn { from { opacity: 0; transform: scale(3) rotate(-25deg); } }
@keyframes shake {
  20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); } 80% { transform: translate(1px, -1px); }
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-50px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } }

.btn-dl { position: relative; overflow: hidden; }
.btn-dl > * { position: relative; z-index: 1; }
.btn-dl-gold::after { animation-delay: 1.6s; }
.btn-dl-red { animation: redPulse 2.4s ease-in-out infinite; }
@keyframes redPulse {
  50% { box-shadow: inset 0 0 0 1px rgba(255, 190, 170, .7), 0 0 0 1px #6a0f08, 0 0 28px rgba(255, 90, 50, .9); }
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 3; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(243, 223, 166, .85);
}
.scroll-hint span { position: relative; width: 22px; height: 36px; border: 2px solid currentColor; border-radius: 12px; }
.scroll-hint span::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px;
  background: currentColor; border-radius: 2px; animation: wheel 1.6s infinite;
}
.scroll-hint em { font: normal 10px/1 Arial, sans-serif; letter-spacing: 3px; }
@keyframes wheel { to { transform: translateY(12px); opacity: 0; } }

/* ---------- 雕花描金边框 ---------- */
.left-code, .newsbox, .videokey { position: relative; }
.ornate::after {
  --c: #f0cf85; --s: 20px; --w: 2px;
  content: ""; position: absolute; inset: -4px; z-index: 5; pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--s) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--s),
    linear-gradient(var(--c), var(--c)) top right / var(--s) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--s),
    linear-gradient(var(--c), var(--c)) bottom left / var(--s) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--s),
    linear-gradient(var(--c), var(--c)) bottom right / var(--s) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--s);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(255, 180, 80, .8));
}
.mainbox > .ornate { box-shadow: 0 0 0 1px rgba(216, 180, 106, .22), 0 14px 34px rgba(0, 0, 0, .45); }

/* ---------- 栏目标题 ---------- */
.title span {
  background-image:
    linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .9) 50%, transparent 58%),
    linear-gradient(180deg, #fff1c8 0%, #e2bf72 55%, #a7782f 100%);
  background-size: 300% 100%, 100% 100%;
  animation: sheen 6s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 170, 60, .35));
}
.title span::before, .title span::after { animation: diamond 6s linear infinite; }
@keyframes diamond { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }
.title::before { transform-origin: right center; }
.title::after { transform-origin: left center; }
.fx .title.reveal { transform: none; }
.fx .title.reveal::before { transform: scaleX(0); transition: transform 1.1s .25s cubic-bezier(.2, .7, .3, 1); }
.fx .title.reveal::after { transform: scaleX(0); transition: transform 1.1s .25s cubic-bezier(.2, .7, .3, 1); }
.fx .title.reveal.in::before { transform: scaleX(1); }
.fx .title.reveal.in::after { transform: scaleX(-1); }

/* ---------- 轮播：推镜效果 ---------- */
.focus .slide img, .focus .slide .ph,
.jietu-slider .slide img, .jietu-slider .slide .ph {
  transform: scale(1); transition: transform 7s ease-out;
}
.focus .slide.active img, .focus .slide.active .ph,
.jietu-slider .slide.active img, .jietu-slider .slide.active .ph { transform: scale(1.1); }
.sl-arrow { transition: opacity .2s, transform .2s; }
.sl-arrow:hover { transform: scale(1.15); filter: drop-shadow(0 0 6px #ffb84a); }

/* ---------- 职业 ---------- */
.job-frame { border-color: transparent; box-shadow: none; background: radial-gradient(circle at 50% 50%, rgba(255, 220, 150, .35), transparent 62%); }
.job-frame.job-warrior { background: radial-gradient(circle at 50% 50%, rgba(220, 70, 30, .45), transparent 62%); }
.job-frame.job-mage    { background: radial-gradient(circle at 50% 50%, rgba(70, 120, 240, .45), transparent 62%); }
.job-frame.job-taoist  { background: radial-gradient(circle at 50% 50%, rgba(40, 160, 110, .45), transparent 62%); }
.job-frame::before { display: none; }
.job-frame .magic {
  position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none;
  color: rgba(255, 238, 196, .75); filter: drop-shadow(0 0 6px rgba(255, 190, 90, 1));
}
.job-frame .magic .mg-outer { animation-duration: 30s; }
.job-frame .magic .mg-inner { animation-duration: 20s; }
.job-emblem, .job-frame img { position: relative; z-index: 1; }
.jobbox.active .job-frame { animation: frameIn .9s .1s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes frameIn { from { opacity: 0; transform: scale(.9); } }

.motes { position: absolute; inset: 0; overflow: hidden; }
.motes i {
  position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%;
  background: #fff6d6; box-shadow: 0 0 8px 2px rgba(255, 220, 140, .9);
  opacity: 0; animation: mote 10s linear infinite;
}
.motes i:nth-child(1)  { left: 8%;  animation-delay: 0s; }
.motes i:nth-child(2)  { left: 17%; animation-delay: 3.2s; animation-duration: 12s; }
.motes i:nth-child(3)  { left: 26%; animation-delay: 6.1s; }
.motes i:nth-child(4)  { left: 34%; animation-delay: 1.4s; animation-duration: 9s; }
.motes i:nth-child(5)  { left: 43%; animation-delay: 4.8s; }
.motes i:nth-child(6)  { left: 52%; animation-delay: 7.5s; animation-duration: 11s; }
.motes i:nth-child(7)  { left: 60%; animation-delay: 2.3s; }
.motes i:nth-child(8)  { left: 68%; animation-delay: 5.6s; animation-duration: 13s; }
.motes i:nth-child(9)  { left: 76%; animation-delay: .8s; }
.motes i:nth-child(10) { left: 84%; animation-delay: 3.9s; animation-duration: 10.5s; }
.motes i:nth-child(11) { left: 91%; animation-delay: 6.8s; }
.motes i:nth-child(12) { left: 97%; animation-delay: 2.9s; animation-duration: 12.5s; }
@keyframes mote {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(24px, -280px) scale(1); }
  90% { opacity: .8; }
  100% { transform: translate(-10px, -560px) scale(.5); opacity: 0; }
}

/* 职业徽章切换 */
.sl-thumbs { position: static; display: flex; justify-content: center; }
.sl-dots.sl-thumbs button {
  width: auto; height: auto; border-radius: 0; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.sl-dots.sl-thumbs button.on { background: none; transform: none; }
.job-slider .sl-thumbs { position: static; margin-top: 30px; gap: 34px; }
.job-stage { padding-bottom: 40px; }
.medal {
  width: 64px; height: 64px; display: grid; place-items: center;
  font: normal 30px/1 var(--font-brush); color: #f3dfa6;
  border-radius: 50%; border: 2px solid #9c7536;
  background: radial-gradient(circle at 40% 30%, #5a3a22, #1e140c);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .6), 0 4px 10px rgba(60, 30, 0, .35);
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s;
}
.sl-thumbs button > span { font-size: 13px; color: #4e3a28; letter-spacing: 2px; font-weight: bold; }
.sl-thumbs button:hover .medal { border-color: #ffd889; }
.sl-thumbs button.on .medal {
  color: #fff; border-color: #ffd889;
  background: radial-gradient(circle at 40% 30%, #e0453a, #7a0f0a);
  box-shadow: 0 0 0 4px rgba(255, 216, 137, .25), 0 0 26px rgba(255, 120, 40, .85);
  transform: scale(1.12);
}
.sl-thumbs button.on > span { color: #7a2a0a; }

/* ---------- 视频 ---------- */
.play-video { transition: border-color .3s, box-shadow .3s; }
.play-video:hover { border-color: #d8b46a; box-shadow: 0 0 20px rgba(255, 180, 80, .45); }
.play-big::before {
  content: ""; position: absolute; inset: -12px; border: 2px solid rgba(255, 236, 190, .7); border-radius: 50%;
  animation: ring 2s ease-out infinite;
}
.videolist li { transition: transform .3s; }
.videolist li:hover { transform: translateY(-3px); }

/* ---------- 装备 ---------- */
.equip-icon { position: relative; overflow: hidden; }
.rays {
  position: absolute; left: 50%; top: 50%; width: 260%; height: 260%;
  background: repeating-conic-gradient(from 0deg, var(--qc, #d8b46a) 0deg 5deg, transparent 5deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 50%);
  mask-image: radial-gradient(circle, #000 8%, transparent 50%);
  opacity: .3; animation: raySpin 16s linear infinite;
}
.equip-art { position: relative; z-index: 1; width: 100%; height: 100%; animation: float 3.5s ease-in-out infinite; }
.equip.q-legend { animation: legendGlow 3s ease-in-out infinite; }
@keyframes legendGlow {
  50% { box-shadow: 0 0 0 1px #000, 0 0 36px rgba(255, 140, 30, .45), 0 20px 40px rgba(0, 0, 0, .5); }
}
.slide.active .equip-info tr { animation: rowIn .5s cubic-bezier(.2, .8, .3, 1) both; }
.slide.active .equip-info tr:nth-child(2) { animation-delay: .08s; }
.slide.active .equip-info tr:nth-child(3) { animation-delay: .16s; }
.slide.active .equip-info tr:nth-child(4) { animation-delay: .24s; }
.slide.active .equip-info tr:nth-child(5) { animation-delay: .32s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(20px); } }

/* 背包格子切换 */
.show-slider .sl-thumbs { margin-top: 18px; gap: 8px; flex-wrap: wrap; }
.slot {
  display: grid; place-items: center; width: 58px; height: 58px; padding: 8px;
  background: radial-gradient(circle, #2a1f15, #0d0906);
  border: 2px solid #4a3a26; box-shadow: inset 0 0 12px #000;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.slot svg, .slot img { width: 100%; height: 100%; object-fit: contain; }
.sl-thumbs button:hover .slot { border-color: var(--qc); }
.sl-thumbs button.on .slot {
  border-color: var(--qc); transform: translateY(-4px);
  box-shadow: inset 0 0 12px #000, 0 0 16px var(--qg, rgba(255, 216, 137, .5));
}

/* ---------- 3D 倾斜 ---------- */
[data-tilt] { transition: transform .25s ease-out; will-change: transform; }

/* ---------- 浮窗 / 手机栏 ---------- */
.fixedbox { box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 24px rgba(255, 170, 60, .18), 0 10px 30px rgba(0, 0, 0, .5); }
.fb-kefu { position: relative; overflow: hidden; }
.mobile-bar .mb-main i { animation: mbPulse 2s ease-in-out infinite; }
@keyframes mbPulse { 50% { box-shadow: 0 0 0 6px rgba(255, 120, 60, .18), 0 0 26px rgba(255, 80, 40, .9); } }

/* ---------- 鼠标光尘 ---------- */
.cursor-fx { position: fixed; inset: 0; z-index: 500; width: 100%; height: 100%; pointer-events: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .tb-cta { display: none; }
}
@media (max-width: 768px) {
  .logo-magic { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
  .scroll-hint { display: none; }
  .motes i:nth-child(n + 7) { display: none; }
  .job-slider .sl-thumbs { gap: 24px; margin-top: 22px; }
  .medal { width: 52px; height: 52px; font-size: 25px; }
  .slot { width: 48px; height: 48px; padding: 6px; }
  .loader-magic { width: 180px; height: 180px; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-fx { display: none; }
}
