/* ⚡ Wrath of the Gods event: hub button and event panel (js/wrathui.js). Gold, marble and Aegean blue. */

.btn-gold { --face: #e8a91c; color: #2b1a05; }
.wr-token { width: 1.15em; height: 1.15em; margin-right: 4px; vertical-align: -.22em; object-fit: contain; }

/* hub button: an animated lightning bolt beside the Town Square card in the top bar */
.wrath-btn {
  order: 3; /* same slot as .hub-zone (css/mailbox.css); it sits right after it in the bar */
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: -4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: var(--cursor-pointer, pointer);
  transition: transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.wrath-btn[hidden] { display: none; }
.wr-boltbox {
  transition: transform .12s ease;
  position: relative;
  width: 58px;
  height: 54px;
  filter: drop-shadow(0 0 8px rgba(255, 210, 63, .65)) drop-shadow(0 3px 0 rgba(0, 0, 0, .35));
  animation: wrBoltPulse 2.4s ease-in-out infinite;
}
.wrath-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
/* frame 1 is the bolt; frames 2 and 3 (with sparks) take turns over it */
.wrath-btn .wr-f2 { animation: wrSparkA 1.8s steps(1, end) infinite; }
.wrath-btn .wr-f3 { animation: wrSparkB 1.8s steps(1, end) infinite; }
.wrath-btn:hover .wr-boltbox { transform: scale(1.1) rotate(-4deg); }
.wrath-btn:active { transform: scale(.94); }
.wrath-btn:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; border-radius: 12px; }
@keyframes wrSparkA { 0%, 100% { opacity: 0; } 33% { opacity: 1; } 66% { opacity: 0; } }
@keyframes wrSparkB { 0%, 100% { opacity: 0; } 66% { opacity: 1; } }
@keyframes wrBoltPulse { 50% { filter: drop-shadow(0 0 16px rgba(255, 210, 63, .95)) drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); } }
@keyframes wrGlow { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 34px rgba(255, 210, 63, .75); } }
@media (max-width: 760px) {
  .wr-boltbox { width: 46px; height: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  .wr-boltbox, .wrath-btn .wr-f2, .wrath-btn .wr-f3 { animation: none; }
}
/* panel banner before the start */
.wr-soon { display: grid; justify-items: center; gap: 2px; margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; border: 3px solid #ffd23f; background: radial-gradient(circle at 50% 0%, rgba(255, 210, 63, .28), rgba(255, 210, 63, .06) 70%), #1b3570; text-align: center; box-shadow: 0 0 22px rgba(255, 210, 63, .3); }
.wr-soon span { color: #dbe5ff; font-weight: 800; }
.wr-soon b { color: #ffe27a; font: 400 2rem var(--font-display); font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 var(--ink); }
.wr-soon small { color: #b9c8ee; font-weight: 700; }

/* panel */
.wr-overlay .wr-panel {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 24px;
  background: radial-gradient(120% 60% at 50% 0, #2f5fae 0, #1a2f63 55%, #101b3d 100%);
  box-shadow: 0 8px 0 var(--ink), 0 0 0 3px #e8a91c inset, 0 26px 70px rgba(0, 0, 0, .55);
  color: #f6f1e3;
  font-family: var(--font-body);
  animation: popIn .35s cubic-bezier(.2, 1.3, .4, 1);
}
.wr-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 8px; }
.wr-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.wr-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.7rem; background: radial-gradient(circle, #fff3b0, #e8a91c); border: 3px solid var(--ink); box-shadow: 0 0 18px rgba(255, 210, 63, .7); }
.wr-title h2 { margin: 0; font: 400 1.9rem var(--font-display); color: #ffe27a; text-shadow: 0 3px 0 var(--ink); letter-spacing: .03em; }
.wr-title small { display: block; color: #c8d6ff; font-weight: 800; font-size: .85rem; }
.wr-wallet { display: inline-flex; align-items: center; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff3cf; color: #3a2405; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 900 1.15rem var(--font-body); }
.wr-wallet .wr-token { width: 30px; height: 30px; }
.wr-x { width: 42px; height: 42px; border-radius: 12px; border: 3px solid var(--ink); background: #233f80; color: #fff; font: 900 1.1rem var(--font-body); box-shadow: 0 3px 0 var(--ink); cursor: var(--cursor-pointer, pointer); }
.wr-tabs { display: flex; gap: 8px; padding: 4px 18px 12px; flex-wrap: wrap; }
.wr-tabs button { padding: 8px 16px; border-radius: 12px; border: 3px solid var(--ink); background: #233f80; color: #dbe5ff; font: 400 1rem var(--font-display); box-shadow: 0 3px 0 var(--ink); cursor: var(--cursor-pointer, pointer); }
.wr-tabs button.on { background: linear-gradient(180deg, #ffe27a, #e8a91c); color: #2b1a05; }
.wr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 18px 22px; scrollbar-width: thin; }
.wr-empty { margin: 40px auto; text-align: center; color: #c8d6ff; font-weight: 800; }
.wr-intro { margin: 0 0 14px; color: #dbe5ff; font-weight: 700; line-height: 1.45; }
.wr-intro b, .wr-note b { color: #ffe27a; }
.wr-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 210, 63, .12); border: 2px solid rgba(255, 210, 63, .45); color: #ffe9a8; font-weight: 800; }

/* shrine */
.wr-gods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wr-god { display: grid; justify-items: center; gap: 4px; padding: 12px 10px; border-radius: 18px; border: 3px solid var(--ink); background: linear-gradient(180deg, #f6efe0, #d9cbb0); color: #2b1a05; box-shadow: 0 4px 0 var(--ink); }
.wr-god canvas { width: 110px; height: 110px; }
.wr-god b { font: 400 1.25rem var(--font-display); }
.wr-god small { font-weight: 800; font-size: .78rem; color: #6b5427; }
.wr-god.owned { background: linear-gradient(180deg, #fff6d0, #f0d27a); }
.wr-god.zeus { background: linear-gradient(180deg, #eef4ff, #c4d4f5); }
.wr-buy { width: 100%; padding: 8px 10px; font-size: .95rem; }

/* challenges */
.wr-h { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 8px; font: 400 1.2rem var(--font-display); color: #ffe27a; text-shadow: 0 2px 0 var(--ink); }
.wr-h small { font: 800 .78rem var(--font-body); color: #c8d6ff; text-shadow: none; }
.wr-h em { padding: 1px 8px; border-radius: 999px; background: #3ddc72; color: var(--ink); font: 900 .7rem var(--font-body); font-style: normal; text-shadow: none; }
.wr-list { display: grid; gap: 8px; }
.wr-ch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 3px solid var(--ink); background: #22397a; box-shadow: 0 3px 0 var(--ink); }
.wr-ch.done { background: #2c5a3e; }
.wr-ch.locked { opacity: .55; }
.wr-ch-text { flex: 1; min-width: 0; }
.wr-ch-text b { display: block; font: 400 1.05rem var(--font-display); color: #fff; }
.wr-ch-text small { display: block; color: #c8d6ff; font-weight: 800; font-size: .8rem; }
.wr-ch-side { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.wr-ch-side small { color: #c8d6ff; font-weight: 800; font-size: .78rem; }
.wr-reward { display: inline-flex; align-items: center; font: 900 1rem var(--font-body); color: #ffe27a; }
.wr-bar { height: 8px; margin-top: 6px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; width: 100%; }
.wr-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffe27a, #e8a91c); }
.wr-ch.done .wr-bar i { background: linear-gradient(90deg, #7df0a5, #3ddc72); }

/* mode */
.wr-mode { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; }
.wr-mode h3 { margin: 0 0 6px; font: 400 1.6rem var(--font-display); color: #ffe27a; text-shadow: 0 3px 0 var(--ink); }
.wr-mode p { margin: 0; color: #dbe5ff; font-weight: 700; line-height: 1.45; }
.wr-mode p b { color: #ffe27a; }
.wr-mode-art { display: grid; place-items: center; }
.wr-crate { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 18px; border: 4px solid #ffd23f; background: linear-gradient(180deg, #a86a2c, #7a4718); box-shadow: 0 0 26px rgba(255, 210, 63, .8), 0 5px 0 var(--ink); animation: wrGlow 2.6s ease-in-out infinite; }
.wr-crate img { width: 70%; height: 70%; object-fit: contain; }
.wr-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 18px 0 14px; }
.wr-pay div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: #22397a; border: 2px solid #3a5aa8; font-weight: 800; }
.wr-pay b { display: inline-flex; align-items: center; color: #ffe27a; font-weight: 900; white-space: nowrap; }
.wr-earn { grid-template-columns: 1fr; }
.wr-earn span { display: grid; gap: 2px; }
.wr-earn em { font-style: normal; }
.wr-earn span b { display: inline; color: #ffe27a; }
.wr-earn small { font-weight: 700; font-size: .8rem; color: #b9c8ee; }
.wr-earn > div > b { font-size: 1.05rem; }
.wr-go { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.wr-play { min-width: 230px; padding: 12px 18px; font-size: 1.1rem; }
.wr-play small { display: block; font-size: .72rem; opacity: .85; }

@media (max-width: 620px) {
  .wr-mode { grid-template-columns: 1fr; text-align: center; }
  .wr-head { flex-wrap: wrap; }
  .wr-play { min-width: 0; width: 100%; }
}
