/* 世界事件 / 节日 / 活动首领 / 运营广播（game/events.js · ui/panels/events.js） */

/* 后台关闭充值：隐藏所有充值入口 */
body.no-recharge .hud-cur .pill .plus,
body.no-recharge [data-recharge] { display: none !important; }

/* 旧的群系事件小条由节日横幅接管 */
#hud .hud-event { display: none !important; }

/* ---------- 顶部活动横幅 ---------- */
#fest-ribbon { position: fixed; left: 50%; top: calc(12px + var(--safe-t, 0px)); transform: translateX(-50%); z-index: 12; display: flex; gap: 8px; cursor: pointer; pointer-events: auto; max-width: min(720px, 60vw); transition: top .25s; }
#fest-ribbon.hidden { display: none; }
#fest-ribbon.low { top: calc(66px + var(--safe-t, 0px)); }
.fr-chip { --fc: #ffd84a; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 5px 12px 5px 10px; min-width: 0;
  background: linear-gradient(180deg, rgba(36,26,66,.94), rgba(14,10,30,.94)); box-shadow: 0 0 0 2px #0a0716, inset 0 0 0 2px var(--fc), 0 0 18px color-mix(in srgb, var(--fc) 45%, transparent);
  text-shadow: 0 1px 0 #000; animation: frGlow 2.4s ease-in-out infinite; white-space: nowrap; }
.fr-chip b { color: var(--fc); font-size: 14px; letter-spacing: .06em; }
.fr-chip b::before { content: '◆ '; font-size: 10px; }
.fr-chip small { grid-column: 1; grid-row: 2; color: #d8d0f0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.fr-chip em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--fc) 50%, transparent); }
.fr-chip.ev { animation-duration: 1.4s; }
@keyframes frGlow { 50% { box-shadow: 0 0 0 2px #0a0716, inset 0 0 0 2px var(--fc), 0 0 28px color-mix(in srgb, var(--fc) 70%, transparent); } }

/* ---------- 氛围层（节日粒子 / 血月色调） ---------- */
#fest-amb { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
#fest-amb i { position: absolute; top: -4%; width: 6px; height: 9px; opacity: .85; animation: ambFall linear infinite; image-rendering: pixelated; }
#fest-amb.amb-confetti i { width: 5px; height: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
#fest-amb.amb-leaves i { width: 7px; height: 7px; border-radius: 0 6px 0 6px; opacity: .8; animation-name: ambLeaf; }
#fest-amb.amb-stars i { width: 3px; height: 3px; background: currentColor !important; box-shadow: 0 0 6px currentColor, 0 0 12px currentColor; opacity: 0; animation-name: ambStar; }
@keyframes ambFall { 0% { transform: translate(0, -2vh) rotate(0); } 50% { transform: translate(3vw, 52vh) rotate(260deg); } 100% { transform: translate(-2vw, 106vh) rotate(540deg); } }
@keyframes ambLeaf { 0% { transform: translate(0, -2vh) rotate(0); } 25% { transform: translate(5vw, 26vh) rotate(90deg); } 50% { transform: translate(-3vw, 52vh) rotate(200deg); } 75% { transform: translate(4vw, 78vh) rotate(290deg); } 100% { transform: translate(0, 106vh) rotate(400deg); } }
@keyframes ambStar { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 1; } 22% { opacity: 0; transform: translate(-28vw, 30vh); } 100% { opacity: 0; transform: translate(-28vw, 30vh); } }
#ev-tint { position: fixed; inset: 0; pointer-events: none; z-index: 8; opacity: 0; transition: opacity 2s; }
#ev-tint.on { opacity: 1; }
#ev-tint.bloodmoon { background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(160,0,20,.38)), linear-gradient(rgba(120,0,20,.12), rgba(120,0,20,.12)); mix-blend-mode: multiply; animation: moonPulse 5s ease-in-out infinite; }
#ev-tint.aurora { background: linear-gradient(180deg, rgba(90,255,200,.16), transparent 45%); mix-blend-mode: screen; }
@keyframes moonPulse { 50% { filter: brightness(1.25); } }

/* ---------- 屏幕特效（广播 / 抽奖 / 节日开幕） ---------- */
.bc-fx { position: fixed; inset: 0; pointer-events: none; z-index: 93; overflow: hidden; transition: opacity .8s; }
.bc-fx.out { opacity: 0; }
.bc-fx i { position: absolute; width: 6px; height: 6px; animation: bcFall 3.2s linear infinite; }
.bc-fx.fx-fireworks i { width: 4px; height: 4px; border-radius: 50%; box-shadow: 0 0 8px currentColor; animation: bcPop 1.6s ease-out infinite; }
.bc-fx.fx-stars i { background: transparent !important; width: 0; height: 0; animation-duration: 2.6s; }
.bc-fx.fx-stars i::before { content: '✦'; position: absolute; font-size: 18px; color: currentColor; text-shadow: 0 0 10px currentColor; }
.bc-fx.fx-hearts i::before { content: '♥'; position: absolute; font-size: 18px; color: currentColor; text-shadow: 0 0 8px currentColor; }
.bc-fx.fx-hearts i { background: transparent !important; }
.bc-fx.fx-petals i { width: 8px; height: 6px; border-radius: 6px 0 6px 0; animation-duration: 4.4s; }
.bc-fx.fx-snow i { width: 5px; height: 5px; border-radius: 50%; animation-duration: 5s; }
.bc-fx.fx-gold i { width: 7px; height: 7px; transform: rotate(45deg); box-shadow: 0 0 10px currentColor; animation-duration: 2.4s; }
@keyframes bcFall { from { transform: translateY(0) rotate(0); } to { transform: translateY(112vh) rotate(720deg); } }
@keyframes bcPop { 0% { transform: scale(.2); opacity: 1; box-shadow: 0 0 0 0 currentColor; } 70% { opacity: 1; } 100% { transform: scale(1); opacity: 0; box-shadow: 0 -40px 0 -1px currentColor, 34px -20px 0 -1px currentColor, 34px 20px 0 -1px currentColor, 0 40px 0 -1px currentColor, -34px 20px 0 -1px currentColor, -34px -20px 0 -1px currentColor; } }

/* 跑马灯 */
.bc-marquee { --bcc: #ffd84a; position: fixed; left: 0; right: 0; top: calc(108px + var(--safe-t, 0px)); z-index: 26; display: flex; align-items: center; height: 34px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(12,8,26,.9) 12%, rgba(12,8,26,.9) 88%, transparent); box-shadow: inset 0 2px 0 color-mix(in srgb, var(--bcc) 60%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--bcc) 60%, transparent); animation: fade .3s; transition: opacity .5s; }
.bc-marquee.out { opacity: 0; }
.bc-tag { flex: none; margin-left: 8%; padding: 2px 10px; background: var(--bcc); color: #1a1000; font-size: 13px; letter-spacing: .2em; }
.bc-track { flex: 1; overflow: hidden; margin-right: 8%; }
.bc-track span { display: inline-block; padding-left: 100%; white-space: nowrap; color: var(--bcc); font-size: 17px; text-shadow: 0 2px 0 #000, 0 0 12px color-mix(in srgb, var(--bcc) 60%, transparent); animation: marq 14s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }
/* 横幅 */
.bc-banner { --bcc: #ffd84a; position: fixed; left: 50%; top: 26%; transform: translateX(-50%); z-index: 27; width: min(760px, 92vw); text-align: center; padding: 18px 24px 20px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(16,10,34,.95) 15%, rgba(16,10,34,.95) 85%, transparent); box-shadow: inset 0 3px 0 var(--bcc), inset 0 -3px 0 var(--bcc); animation: bcIn .5s cubic-bezier(.2,1.4,.4,1); transition: opacity .5s, transform .5s; }
.bc-banner.out { opacity: 0; transform: translate(-50%, -20px); }
.bc-banner h2 { margin: 0 0 6px; color: var(--bcc); font-size: 30px; letter-spacing: .12em; text-shadow: 0 3px 0 #000, 0 0 22px var(--bcc); }
.bc-banner p { margin: 0; color: #fff; font-size: 18px; line-height: 1.6; text-shadow: 0 2px 0 #000; white-space: pre-wrap; }
@keyframes bcIn { from { opacity: 0; transform: translate(-50%, 24px) scale(.9); } }
/* 全屏 */
.bc-full { --bcc: #ffd84a; position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at center, rgba(30,16,60,.82), rgba(2,0,8,.94)); animation: fade .4s; transition: opacity .5s; cursor: pointer; }
.bc-full.out { opacity: 0; }
.bc-card { text-align: center; max-width: 820px; animation: bcZoom .7s cubic-bezier(.2,1.3,.4,1); }
.bc-from { color: color-mix(in srgb, var(--bcc) 70%, #fff); letter-spacing: .4em; font-size: 13px; margin-bottom: 10px; }
.bc-card h1 { margin: 0 0 14px; font-size: clamp(32px, 6vw, 64px); color: var(--bcc); letter-spacing: .1em; text-shadow: 0 4px 0 #000, 0 0 40px var(--bcc); }
.bc-card p { margin: 0 0 18px; font-size: clamp(17px, 2.4vw, 24px); color: #fff; line-height: 1.7; text-shadow: 0 2px 0 #000; white-space: pre-wrap; }
.bc-card small { color: #8a80b0; }
@keyframes bcZoom { from { opacity: 0; transform: scale(.6); } }

/* ---------- 幸运抽奖 ---------- */
.lk-full { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(60,30,90,.85), rgba(4,2,10,.95)); animation: fade .4s; transition: opacity .5s; }
.lk-full.out { opacity: 0; }
.lk-card { width: min(560px, 94vw); text-align: center; padding: 24px 20px 20px; background: linear-gradient(180deg, #2a1c4e, #140c28); box-shadow: 0 0 0 3px #0a0716, inset 0 0 0 2px #ffd84a, 0 0 60px rgba(255,216,74,.35); animation: bcZoom .6s cubic-bezier(.2,1.3,.4,1); }
.lk-t { font-size: 30px; color: #ffd84a; letter-spacing: .12em; text-shadow: 0 3px 0 #000, 0 0 24px #ffb84a; }
.lk-sub { color: #b8b0d8; margin: 6px 0 14px; font-size: 13px; }
.lk-roll { font-size: 34px; color: #fff; margin: 8px 0 14px; min-height: 46px; text-shadow: 0 3px 0 #000, 0 0 18px #ff7ab6; font-variant-numeric: tabular-nums; }
.lk-full.me .lk-roll { color: #ffd84a; animation: lkMe .6s ease-in-out infinite alternate; }
@keyframes lkMe { to { transform: scale(1.08); text-shadow: 0 3px 0 #000, 0 0 34px #ffd84a; } }
.lk-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; max-height: 40vh; overflow: auto; }
.lk-name { padding: 4px 10px; background: rgba(255,216,74,.12); box-shadow: inset 0 0 0 1px rgba(255,216,74,.5); color: #ffe9a0; animation: bcIn .4s backwards; }
.lk-name.me { background: #ffd84a; color: #2a1800; }

/* ---------- 维护 ---------- */
.mt-bar { position: fixed; left: 50%; bottom: calc(10px + var(--safe-b, 0px)); transform: translateX(-50%); z-index: 94; display: flex; gap: 10px; align-items: center; padding: 8px 14px; max-width: 94vw;
  background: linear-gradient(180deg, rgba(70,20,10,.95), rgba(40,10,6,.95)); box-shadow: 0 0 0 2px #0a0716, inset 0 0 0 2px #ff9a4a; color: #ffe0c0; font-size: 14px; pointer-events: none; }
.mt-bar b { color: #ff9a4a; flex: none; }
.mt-gate { position: fixed; inset: 0; z-index: 101; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at center, #1c1236, #05030c); }
.mt-card { text-align: center; max-width: 520px; padding: 28px 24px; background: linear-gradient(180deg, #241a44, #120c24); box-shadow: 0 0 0 3px #0a0716, inset 0 0 0 2px #ff9a4a; }
.mt-card h1 { margin: 0 0 12px; color: #ff9a4a; letter-spacing: .2em; text-shadow: 0 3px 0 #000; }
.mt-card p { color: #e8e0ff; line-height: 1.7; }
.mt-card .mt-eta { color: #ffd84a; }
.mt-card small { color: #8a80b0; }

/* ---------- 活动中心面板 ---------- */
.ev-row { --ec: #b48cff; margin-bottom: 10px; box-shadow: inset 3px 0 0 var(--ec); }
.ev-row.hl { background: linear-gradient(90deg, color-mix(in srgb, var(--ec) 18%, transparent), transparent 70%); }
.ev-nm { color: var(--ec); font-size: 16px; margin-right: 8px; }
.ev-time { font-variant-numeric: tabular-nums; color: #fff; }
.ev-desc { margin: 4px 0 6px; font-size: 12px; }
.evb-card { --bc: #ff5a6a; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 14%, transparent), transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc) 60%, transparent); }
.evb-nm { color: var(--bc); font-size: 15px; }
.evb-hp { height: 14px; }
.evb-hp > i { background: linear-gradient(180deg, #ff8a9a, #ff2a3a 60%, #a0101e) !important; }
.evb-drops { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.evb-top { font-size: 12px; display: grid; gap: 2px; }
.ev-task { margin-bottom: 8px; display: grid; gap: 6px; }
.mail-batch .btn { flex: 1; }

@media (max-width: 860px), (orientation: portrait) {
  #fest-ribbon, #fest-ribbon.low { left: auto; right: 8px; transform: none; top: calc(148px + var(--safe-t, 0px)); max-width: 62vw; gap: 4px; }
  /* 手机只显示一枚：优先显示本群系事件，其次第一个节日（点开活动中心看全部） */
  #fest-ribbon:has(.ev) .fest, #fest-ribbon .fest ~ .fest { display: none; }
  .fr-chip { padding: 3px 8px; column-gap: 6px; }
  .fr-chip b { font-size: 12px; }
  .fr-chip small { display: none; }
  .fr-chip em { font-size: 12px; padding-left: 6px; }
  .bc-marquee { top: calc(150px + var(--safe-t, 0px)); }
  .bc-banner h2 { font-size: 22px; } .bc-banner p { font-size: 15px; }
  .mt-bar { font-size: 12px; bottom: calc(150px + var(--safe-b, 0px)); }
}

/* ---------- 弹窗公告（ui/notices.js） ---------- */
.nt-modal { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center; padding: 12px; background: radial-gradient(ellipse at center, rgba(24,12,48,.6), rgba(3,1,8,.84)); animation: fade .25s; transition: opacity .2s; }
.nt-modal.out { opacity: 0; }
.nt-card { position: relative; width: min(560px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: linear-gradient(180deg, #261c4c, #140e2a 70%); box-shadow: 0 0 0 3px #0a0716, inset 0 0 0 2px #7d64c9, 0 0 0 5px #3a2d63, 0 20px 60px rgba(0,0,0,.6); animation: ntIn .35s cubic-bezier(.2,1.3,.4,1); }
.nt-card.multi { width: min(760px, 100%); }
@keyframes ntIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.nt-head { display: flex; align-items: center; justify-content: center; position: relative; height: 44px; flex: none; background: linear-gradient(180deg, #3a2a6a, #22184a); box-shadow: inset 0 -2px 0 #0a0716; }
.nt-head span { color: #ffd84a; font-size: 18px; letter-spacing: .5em; padding-left: .5em; text-shadow: 0 2px 0 #000, 0 0 14px rgba(255,216,74,.5); }
.nt-head .x { position: absolute; right: 8px; top: 6px; width: 32px; height: 32px; padding: 0; }
.nt-mid { display: flex; min-height: 0; flex: 1; }
.nt-side { flex: none; width: 170px; padding: 10px 0 10px 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.nt-tab { padding: 9px 10px; cursor: pointer; color: #b8b0d8; font-size: 13px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(125,100,201,.35); }
.nt-tab b { font-weight: normal; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-tab.on { color: #fff; background: linear-gradient(90deg, rgba(255,216,74,.18), transparent); box-shadow: inset 3px 0 0 #ffd84a, inset 0 0 0 1px rgba(255,216,74,.4); }
.nt-main { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.nt-dots { display: none; justify-content: center; gap: 6px; padding: 4px 0 0; }
.nt-dots i { width: 8px; height: 8px; background: #4a3d7a; cursor: pointer; }
.nt-dots i.on { background: #ffd84a; }
.nt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px 12px; box-shadow: inset 0 2px 0 rgba(125,100,201,.25); }
.nt-mute { display: flex; align-items: center; gap: 6px; color: #b8b0d8; font-size: 13px; cursor: pointer; user-select: none; }
.nt-mute input { width: 16px; height: 16px; accent-color: #ffd84a; }
.nt-btns { display: flex; gap: 8px; margin-left: auto; }
.nt-panel { max-width: 640px; margin: 0 auto; }
@media (max-width: 760px) {
  .nt-side { display: none; }
  .nt-dots { display: flex; }
  .nt-banner { height: 104px !important; }
  .nt-main { padding: 12px; }
  .nt-btns .btn { padding: 0 12px; }
}

/* ---------- 活动横幅：收起 / 展开 ---------- */
#fest-ribbon { align-items: stretch; }
.fr-fold { flex: none; width: 26px; padding: 0; font: inherit; font-size: 13px; line-height: 1; color: #e8e0ff; cursor: pointer; border: 0;
  background: linear-gradient(180deg, rgba(36, 26, 66, .94), rgba(14, 10, 30, .94)); box-shadow: 0 0 0 2px #0a0716, inset 0 0 0 1px #5a4a8a; opacity: .8; transition: opacity .15s, background .15s; }
.fr-fold:hover { opacity: 1; background: rgba(70, 50, 120, .95); }
.fr-mini { --fc: #ffd84a; display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 10px; white-space: nowrap; font-size: 12px; text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, rgba(36, 26, 66, .9), rgba(14, 10, 30, .9)); box-shadow: 0 0 0 2px #0a0716, inset 0 0 0 1px var(--fc); opacity: .85; transition: opacity .15s; }
.fr-mini:hover { opacity: 1; }
.fr-mini b { color: var(--fc); font-weight: normal; }
.fr-mini em { font-style: normal; color: #fff; font-variant-numeric: tabular-nums; }
.fr-chev { font-style: normal; color: #c9b8e8; }
@media (max-width: 860px), (orientation: portrait) {
  .fr-fold { width: 22px; font-size: 11px; }
  .fr-mini { font-size: 11px; gap: 6px; padding: 2px 6px 2px 8px; }
}
/* 显示帧率时（画面设置 → 显示帧率）让出顶部中间的位置 */
@media (min-width: 861px) and (orientation: landscape) { body.show-fps #fest-ribbon, body.show-fps .hud-boss { margin-top: 26px; } }
