/* ============================================================
   首页 v4 · 动态增强（静谧高级感）
   ============================================================ */

/* ---------- 首屏：缓慢扫光 ---------- */
.w-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -60%;
  width: 55%;
  height: 140%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255, 246, 226, 0.028) 46%,
    rgba(255, 246, 226, 0.07) 50%,
    rgba(255, 246, 226, 0.028) 54%,
    transparent 100%);
  transform: rotate(10deg);
  animation: wSweep 17s linear infinite;
  mix-blend-mode: screen;
}

@keyframes wSweep {
  0%   { transform: translateX(0) rotate(10deg); opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(320%) rotate(10deg); opacity: 0; }
}

/* ---------- 首屏：金色尘埃 ---------- */
.w-hero-grain::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(1.2px 1.2px at 14% 68%, rgba(243, 223, 174, 0.75), transparent 100%),
    radial-gradient(1px 1px at 28% 32%, rgba(243, 223, 174, 0.5), transparent 100%),
    radial-gradient(1.6px 1.6px at 42% 80%, rgba(255, 240, 210, 0.65), transparent 100%),
    radial-gradient(1px 1px at 58% 24%, rgba(255, 240, 210, 0.45), transparent 100%),
    radial-gradient(1.2px 1.2px at 71% 62%, rgba(243, 223, 174, 0.6), transparent 100%),
    radial-gradient(1px 1px at 84% 38%, rgba(255, 240, 210, 0.4), transparent 100%),
    radial-gradient(1.4px 1.4px at 92% 76%, rgba(243, 223, 174, 0.5), transparent 100%);
  animation: wDust 26s ease-in-out infinite alternate;
  opacity: 0.75;
}

@keyframes wDust {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.45; }
  100% { transform: translate3d(-14px, -26px, 0) scale(1.04); opacity: 0.9; }
}

/* ---------- 首屏：鼠标视差 ---------- */
.w-hero-media img {
  transform: translate3d(calc(var(--mx, 0) * 10px), calc(var(--my, 0) * 8px), 0) scale(1.05);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.w-hero-copy {
  transform: translate3d(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -4px), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- 榜首卡：3D 倾斜 + 流光 ---------- */
.w-throne {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s;
  overflow: hidden;
}

.w-throne::after { z-index: 3; }

.w-throne-sheen {
  position: absolute;
  inset: -40%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    340px 340px at var(--sx, 50%) var(--sy, 50%),
    rgba(255, 238, 200, 0.11),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s;
}

.w-throne:hover .w-throne-sheen { opacity: 1; }

/* ---------- 数字滚动 ---------- */
.w-num-pop { animation: wNumPop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes wNumPop {
  from { opacity: 0.2; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 区块标题金线 ---------- */
.w-kicker::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(216, 178, 106, 0.9), transparent);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.w-reveal.in .w-kicker::after,
.w-sec-head.in .w-kicker::after { width: 42px; }

/* ---------- 滚动显现 ---------- */
.w-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.w-reveal.in { opacity: 1; transform: none; }

.w-pod.w-reveal:nth-child(2) { transition-delay: 0.08s; }
.w-pod.w-reveal:nth-child(3) { transition-delay: 0.16s; }

.w-trow.w-reveal { transition-duration: 0.45s; }

/* ---------- 最新动态条 ---------- */
.w-ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.012);
  height: 46px;
  display: flex;
  align-items: center;
}

.w-ticker::before,
.w-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}

.w-ticker::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.w-ticker::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }

.w-ticker-track {
  display: flex;
  align-items: center;
  gap: 34px;
  white-space: nowrap;
  padding-left: 24px;
  animation: wMarquee 46s linear infinite;
  will-change: transform;
}

.w-ticker:hover .w-ticker-track { animation-play-state: paused; }

@keyframes wMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.w-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.w-ticker-item b { color: var(--text); font-weight: 500; }
.w-ticker-item em { font-style: normal; color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; }
.w-ticker-label {
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.28em;
  color: rgba(216, 178, 106, 0.8);
  padding-right: 8px;
}

/* ---------- 表格行扫光 ---------- */
.w-trow { position: relative; overflow: hidden; }

.w-trow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 240, 210, 0.045) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.w-trow:hover::after { transform: translateX(100%); }

/* ---------- 等级阶梯：条数呼吸 ---------- */
.w-tier i { transition: color 0.3s; }

.w-tier:hover i { color: #f3dfae; }

/* ---------- 移动端收敛 ---------- */
@media (max-width: 860px) {
  .w-hero::after { animation-duration: 24s; }
  .w-hero-grain::after { animation-duration: 34s; }
  .w-ticker { height: 42px; }
  .w-ticker-track { gap: 24px; animation-duration: 60s; }
  .w-hero-copy { transform: none; }
  .w-hero-media img { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .w-hero::after,
  .w-hero-grain::after,
  .w-ticker-track,
  .w-num-pop { animation: none !important; }
  .w-reveal { opacity: 1 !important; transform: none !important; }
  .w-hero-media img, .w-hero-copy { transform: none !important; }
}


/* ===== 榜首卡：外圈旋转金线光环 ===== */
@property --w-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.w-throne-wrap {
  position: relative;
  isolation: isolate;
}

.w-throne-halo {
  position: absolute;
  inset: -1px;
  z-index: 5;
  border-radius: 4px;
  padding: 1px;
  pointer-events: none;
  --w-angle: 0deg;
  background: conic-gradient(
    from var(--w-angle),
    rgba(243, 223, 174, 0) 0deg,
    rgba(243, 223, 174, 0) 200deg,
    rgba(243, 223, 174, 0.45) 246deg,
    rgba(255, 246, 226, 0.95) 282deg,
    rgba(243, 223, 174, 0.4) 312deg,
    rgba(243, 223, 174, 0) 348deg,
    rgba(243, 223, 174, 0) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: wHaloSpin 9s linear infinite;
}

@keyframes wHaloSpin {
  to { --w-angle: 360deg; }
}

/* ===== 冠军卡：金色粒子 ===== */
.w-pod-1 {
  overflow: hidden;
}

.w-spark {
  position: absolute;
  bottom: -6px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 240, 208, 0.95);
  box-shadow: 0 0 8px rgba(243, 223, 174, 0.85);
  opacity: 0;
  animation: wSparkUp var(--dur, 6s) linear var(--delay, 0s) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes wSparkUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  12%  { opacity: 0.9; }
  70%  { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(calc(var(--rise, 180px) * -1)) scale(1.1); }
}

/* ===== 表格行逐行点亮 ===== */
.w-trow {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.3s;
  transition-delay: calc(var(--i, 0) * 55ms);
}

body.js-anim .w-trow {
  opacity: 0;
  transform: translateY(10px);
}

body.js-anim .w-trow.lit {
  opacity: 1;
  transform: none;
}

.w-trow.lit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(243, 223, 174, 0.16), rgba(243, 223, 174, 0) 62%);
  animation: wRowFlash 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
  pointer-events: none;
}

@keyframes wRowFlash {
  0%   { opacity: 0.9; transform: translateX(-12%); }
  60%  { opacity: 0.45; }
  100% { opacity: 0; transform: translateX(10%); }
}

/* 行内容压在上面 */
.w-trow > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .w-throne-halo, .w-spark { animation: none !important; }
  .w-trow { opacity: 1 !important; transform: none !important; }
  .w-trow.lit::before { display: none; }
}
