/* 纪念开屏层：首页 #splashScreen 与总数据页 #memorialSplash 共用 */
:root {
  --gold-bright: #e8c94a;
}
body.splash-active {
  overflow: hidden;
}
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05060f;
  isolation: isolate;
}
.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 120%, rgba(34, 197, 94, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(200, 169, 81, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #0a0c18 0%, #05060f 40%, #070a14 100%);
  z-index: 0;
}
.splash-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}
.splash-rays {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 200vmax;
  height: 200vmax;
  margin-left: -100vmax;
  margin-top: -100vmax;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg 9deg,
    rgba(200, 169, 81, 0.045) 9deg 10deg
  );
  animation: splashRayDrift 32s linear infinite;
  z-index: 2;
  opacity: 0.85;
}
@keyframes splashRayDrift {
  to {
    transform: rotate(360deg);
  }
}
.splash-arc {
  position: absolute;
  bottom: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(140vw, 900px);
  height: min(70vw, 420px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border-bottom: none;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.08);
}
.splash-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 90vw;
  transition: transform 0.95s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.85s ease, filter 0.85s ease;
}
.splash-frame {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(2rem, 6vw, 4rem);
  border: 2px solid rgba(200, 169, 81, 0.35);
  box-shadow:
    0 0 0 1px rgba(200, 169, 81, 0.12),
    0 0 80px rgba(200, 169, 81, 0.12),
    inset 0 0 60px rgba(200, 169, 81, 0.04);
  animation: splashFrameIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.splash-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(200, 169, 81, 0.1);
  pointer-events: none;
}
.splash-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--gold-bright);
  opacity: 0;
  animation: splashCorner 0.6s ease forwards;
}
.splash-corner--tl {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  animation-delay: 0.5s;
}
.splash-corner--tr {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
  animation-delay: 0.62s;
}
.splash-corner--bl {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
  animation-delay: 0.74s;
}
.splash-corner--br {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  animation-delay: 0.86s;
}
@keyframes splashCorner {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 0.95;
    transform: scale(1);
  }
}
@keyframes splashFrameIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes splashFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.splash-sparkles {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}
.splash-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
  opacity: 0;
  animation: splashSpark 2.2s ease-in-out infinite;
}
@keyframes splashSpark {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  20% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
  }
}
.splash-screen--out {
  pointer-events: none;
}
.splash-screen--out .splash-inner {
  opacity: 0;
  transform: scale(1.12);
  filter: blur(14px);
}
.splash-screen--out {
  animation: splashCurtain 0.95s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes splashCurtain {
  to {
    opacity: 0;
    visibility: hidden;
    clip-path: circle(0% at 50% 45%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-rays,
  .splash-arc {
    animation: none !important;
  }
  .splash-memorial-candle-flame,
  .splash-memorial-candle-glow {
    animation: none !important;
  }
  .splash-memorial-candle-flame {
    opacity: 0.72;
  }
  .splash-memorial-candle-glow {
    opacity: 0.38;
  }
  .splash-screen--memorial .splash-spark {
    animation: none !important;
    opacity: 0;
  }
  .splash-memorial-photo-item {
    animation: none !important;
  }
  .splash-memorial-photo-item:nth-child(1) {
    opacity: 1 !important;
  }
  .splash-memorial-photo-item:nth-child(2) {
    opacity: 0 !important;
    pointer-events: none;
  }
}

.splash-screen--memorial::before {
  background:
    radial-gradient(ellipse 85% 65% at 50% 15%, rgba(99, 102, 241, 0.1) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 50% 95%, rgba(15, 18, 32, 0.9) 0%, transparent 50%),
    linear-gradient(180deg, #070810 0%, #05060f 100%) !important;
}
.splash-screen--memorial .splash-rays {
  opacity: 0.22;
  animation-duration: 56s;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg 12deg,
    rgba(165, 180, 252, 0.04) 12deg 13deg
  );
}
.splash-screen--memorial .splash-arc {
  opacity: 0.18;
  border-color: rgba(165, 180, 252, 0.1);
  box-shadow: none;
}
.splash-frame--memorial {
  border-color: rgba(165, 180, 252, 0.38) !important;
  box-shadow:
    0 0 0 1px rgba(165, 180, 252, 0.1),
    0 0 48px rgba(99, 102, 241, 0.12),
    inset 0 0 40px rgba(99, 102, 241, 0.05) !important;
  animation: splashFrameIn 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  max-width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 4vw, 1.75rem) clamp(1.5rem, 4vw, 2rem) !important;
  pointer-events: none;
}
.splash-memorial-content {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.splash-frame--memorial::before {
  border-color: rgba(165, 180, 252, 0.12) !important;
}
.splash-screen--memorial .splash-corner {
  border-color: rgba(196, 201, 245, 0.55) !important;
  pointer-events: none;
}
.splash-memorial-backdrop {
  position: absolute;
  inset: 0;
  z-index: 9;
  cursor: pointer;
}
.splash-inner--memorial {
  max-height: 100vh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(0.75rem, 3vw, 1.5rem) clamp(0.75rem, 4vw, 1.5rem) 1rem;
  align-items: stretch !important;
  pointer-events: none;
  position: relative;
  z-index: 10;
}
.splash-memorial-candle {
  position: relative;
  display: inline-block;
  font-size: clamp(1.65rem, 6.5vw, 2.35rem);
  line-height: 1;
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: splashFadeUp 0.85s ease 0.35s forwards;
  filter: drop-shadow(0 0 12px rgba(165, 180, 252, 0.15));
}
.splash-memorial-candle-emoji {
  position: relative;
  z-index: 1;
  display: inline-block;
}
.splash-memorial-candle-flame {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 0.15em);
  width: 0.62em;
  height: 0.78em;
  margin-left: -0.31em;
  border-radius: 50% 50% 45% 45%;
  background:
    radial-gradient(ellipse 80% 90% at 50% 100%, #ffe8a8 0%, #ffb347 35%, rgba(255, 120, 55, 0.38) 65%, transparent 100%),
    radial-gradient(ellipse 50% 60% at 30% 70%, rgba(255, 255, 255, 0.45) 0%, transparent 55%);
  filter: blur(1.5px);
  mix-blend-mode: screen;
  opacity: 0.82;
  pointer-events: none;
  z-index: 2;
  animation: memorialFlameFlicker 2.65s ease-in-out infinite;
}
.splash-memorial-candle-glow {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 0.38em);
  width: 1.45em;
  height: 1.45em;
  margin-left: -0.725em;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 120, 0.28) 0%, rgba(255, 140, 80, 0.1) 45%, transparent 70%);
  filter: blur(5px);
  pointer-events: none;
  z-index: 0;
  animation: memorialGlowFlicker 3.4s ease-in-out infinite;
}
@keyframes memorialFlameFlicker {
  0%,
  100% {
    opacity: 0.5;
    transform: translateY(0) scale(1, 0.94) rotate(-0.6deg);
    filter: blur(1.8px);
  }
  14% {
    opacity: 0.82;
    transform: translateY(-1px) scale(1.04, 1.06) rotate(0.5deg);
    filter: blur(1.35px);
  }
  30% {
    opacity: 0.58;
    transform: translateY(1px) scale(0.97, 0.93) rotate(0deg);
    filter: blur(1.9px);
  }
  46% {
    opacity: 0.9;
    transform: translateY(-2px) scale(1.03, 1.05) rotate(-0.8deg);
    filter: blur(1.45px);
  }
  62% {
    opacity: 0.62;
    transform: translateY(0) scale(0.98, 0.95) rotate(0.3deg);
    filter: blur(1.75px);
  }
  78% {
    opacity: 0.78;
    transform: translateY(-1px) scale(1.02, 1.03) rotate(-0.35deg);
    filter: blur(1.55px);
  }
  90% {
    opacity: 0.55;
    transform: translateY(1px) scale(0.96, 0.94) rotate(0.45deg);
    filter: blur(1.85px);
  }
}
@keyframes memorialGlowFlicker {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.94);
  }
  22% {
    opacity: 0.48;
    transform: scale(1.04);
  }
  41% {
    opacity: 0.22;
    transform: scale(0.9);
  }
  58% {
    opacity: 0.42;
    transform: scale(1.02);
  }
  76% {
    opacity: 0.26;
    transform: scale(0.96);
  }
}
.splash-memorial-ribbon {
  font-family: "Cinzel", serif;
  font-size: clamp(0.65rem, 1.8vw, 0.78rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.75);
  margin-bottom: 0.65rem;
  opacity: 0;
  animation: splashFadeUp 0.8s ease 0.45s forwards;
}
.splash-memorial-name {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 8vw, 2.75rem);
  letter-spacing: 0.2em;
  line-height: 1.25;
  margin-bottom: 0.45rem;
  background: linear-gradient(135deg, #e8e6e1 0%, var(--gold) 48%, #e8e6e1 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: splashFadeUp 0.9s ease 0.55s forwards;
}
.splash-memorial-date {
  font-family: "Noto Sans SC", sans-serif;
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  letter-spacing: 0.28em;
  color: rgba(139, 143, 168, 0.95);
  margin-bottom: 0.65rem;
  opacity: 0;
  animation: splashFadeUp 0.75s ease 0.62s forwards;
}
.splash-memorial-date time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}
.splash-memorial-role {
  font-family: "Noto Sans SC", sans-serif;
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: splashFadeUp 0.8s ease 0.65s forwards;
}
.splash-memorial-role .splash-memorial-nb {
  color: rgba(200, 169, 81, 0.95);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.splash-memorial-card {
  text-align: justify;
  background: rgba(18, 20, 38, 0.78);
  border: 1px solid rgba(200, 169, 81, 0.22);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.35rem);
  margin-bottom: 1.25rem;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  animation: splashFadeUp 0.85s ease 0.78s forwards;
}
.splash-memorial-card p {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(0.88rem, 2.4vw, 1.02rem);
  line-height: 1.85;
  color: #e8e6e1;
  margin-bottom: 1rem;
}
.splash-memorial-card p:last-of-type {
  margin-bottom: 0;
}
.splash-memorial-sign {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(200, 169, 81, 0.15);
  text-align: right;
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  color: var(--text-dim);
  letter-spacing: 0.12em;
}
.splash-memorial-sign strong {
  display: block;
  margin-top: 0.45rem;
  color: rgba(200, 169, 81, 0.95);
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  letter-spacing: 0.18em;
}

/* 汪程杰纪念：双图轮播（首页开屏 / 永念弹层共用） */
.splash-memorial-photos {
  position: relative;
  margin-bottom: 1.35rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(165, 180, 252, 0.18);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  animation: splashFadeUp 0.9s ease 0.88s forwards;
}
.splash-memorial-photo-item {
  position: relative;
  width: 100%;
}
.splash-memorial-photo-item:not(:first-child) {
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* 叠层第二张在上；delay 前若未套用首帧会默认 opacity:1 先露第二张，故首帧 + fill-mode backwards */
.splash-memorial-photo-item:nth-child(1) {
  opacity: 1;
  z-index: 0;
  animation: memPhotoA 8s ease-in-out 1.78s infinite backwards;
}
.splash-memorial-photo-item:nth-child(2) {
  opacity: 0;
  z-index: 1;
  animation: memPhotoB 8s ease-in-out 1.78s infinite backwards;
}
.splash-memorial-photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 8s 一循环：各约 3s 定格 + 约 1s 交叉淡化 */
@keyframes memPhotoA {
  0%,
  37.5% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  87.5% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes memPhotoB {
  0%,
  37.5% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  87.5% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.splash-memorial-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.6rem, 2.5vw, 0.9rem);
  background: linear-gradient(
    to top,
    rgba(7, 8, 16, 0.88) 0%,
    rgba(7, 8, 16, 0.5) 60%,
    transparent 100%
  );
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(0.72rem, 1.9vw, 0.84rem);
  color: rgba(232, 230, 225, 0.88);
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-align: center;
}
.splash-memorial-photo-caption em {
  font-style: normal;
  color: rgba(200, 169, 81, 0.9);
}
.splash-memorial-quote {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(0.78rem, 2.1vw, 0.9rem);
  font-style: italic;
  color: rgba(139, 143, 168, 0.95);
  line-height: 1.75;
  margin-bottom: 0;
  padding-bottom: 0.25rem;
  opacity: 0;
  animation: splashFadeUp 0.8s ease 1.05s forwards;
}
.splash-screen--memorial .splash-spark {
  background: rgba(165, 180, 252, 0.7);
  box-shadow: 0 0 10px rgba(165, 180, 252, 0.35);
  width: 2px;
  height: 2px;
}

/* 总数据页 / 首页赛季内「永念」：默认隐藏，由 JS 显示 */
#memorialSplash.memorial-splash--hidden {
  display: none !important;
}
/* 首页：赛季弹层叠在开屏之上（极少同时出现） */
#memorialSplash.splash-screen {
  z-index: 10001;
}
