/* trophies.css — Real Brawl Stars-style Trophy Road + Brawl Pass UI
   ============================================================================ */

/* ══════════════════════════════════════════════════════════════════════════
   1. TROPHY BADGE (main menu)
   ══════════════════════════════════════════════════════════════════════════ */
.trophy-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--lbg, #1a1200), rgba(0,0,0,0.4));
  border: 1.5px solid var(--lc, #ffd700);
  border-radius: 16px;
  padding: 10px 16px 10px 10px;
  margin: 0 0 14px;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 0 14px var(--lglow, rgba(255,215,0,0.25)) inset, 0 2px 8px rgba(0,0,0,0.3);
}
.trophy-badge:hover {
  box-shadow: 0 0 22px var(--lglow, rgba(255,215,0,0.45)) inset, 0 4px 14px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.trophy-badge:active { transform: scale(0.97); }

.tb-rank-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--lglow, rgba(255,215,0,0.5)));
}
.tb-rank-icon svg { width: 100%; height: 100%; }

.tb-info { flex: 1; min-width: 0; }
.tb-league-name {
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: var(--lc, #ffd700);
  text-transform: uppercase;
  margin-bottom: 1px;
}
.tb-trophy-count {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}
.tb-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  margin-bottom: 3px;
}
.tb-progress-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  background: linear-gradient(90deg, var(--lc, #ffd700), #fffbe0);
  box-shadow: 0 0 6px var(--lglow, rgba(255,215,0,0.6));
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.tb-to-next {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════════════
   2. HUD (top-left during gameplay)
   ══════════════════════════════════════════════════════════════════════════ */
.trophy-hud {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 998;
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid var(--lc, rgba(255,215,0,0.5));
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: #fff;
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 12px var(--lglow, rgba(255,215,0,0.3));
}
.trophy-hud.show { display: flex; }
.th-icon { width: 26px; height: 26px; }
.th-icon svg { width: 100%; height: 100%; }

/* ══════════════════════════════════════════════════════════════════════════
   3. GAME-OVER MATCH RESULT (Brawl Stars post-match screen)
   ══════════════════════════════════════════════════════════════════════════ */
.mr-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 8px auto 16px;
  font-family: monospace;
}

/* Trophy row */
.mr-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px 14px;
}
.mr-trophies {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mr-rank-icon { width: 46px; height: 46px; flex-shrink: 0; }
.mr-rank-icon svg { width: 100%; height: 100%; }
.mr-rank-info { flex: 1; min-width: 0; }
.mr-rank-name {
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #ffd700;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.mr-trophy-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
}
.mr-trophy-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd700, #fff3c4);
  box-shadow: 0 0 8px rgba(255,215,0,0.6);
}
.mr-trophy-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}
.mr-delta {
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
  min-width: 48px;
}
.mr-delta-icon { font-size: 0.85rem; }
.mr-delta.gain    { color: #a6e02c; text-shadow: 0 0 10px rgba(166,224,44,0.6); }
.mr-delta.loss    { color: #fa2473; text-shadow: 0 0 10px rgba(250,36,115,0.6); }
.mr-delta.neutral { color: rgba(255,255,255,0.5); }

/* Total trophy counter under the row */
.mr-total-trophies {
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mr-rank-change {
  font-size: 0.65rem;
  font-weight: bold;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  animation: rankChangePulse 1.1s ease-in-out infinite;
}
.mr-rank-change.up { background: rgba(166,224,44,0.18); color: #a6e02c; border: 1px solid rgba(166,224,44,0.5); }
.mr-rank-change.dn { background: rgba(250,36,115,0.15); color: #fa2473; border: 1px solid rgba(250,36,115,0.4); }
@keyframes rankChangePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* XP / Pass row */
.mr-xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}
.mr-xp-label span:first-child { color: #67d7f0; font-weight: bold; }
.mr-xp-gained { color: #a6e02c; font-weight: bold; }
.mr-xp-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
}
.mr-xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #67d7f0, #a0f0ff);
  box-shadow: 0 0 8px rgba(103,215,240,0.6);
}
.mr-xp-tier {
  text-align: right;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* Tier unlock banner */
.mr-tier-unlock {
  text-align: center;
  background: linear-gradient(135deg, rgba(255,215,0,0.14), rgba(255,140,0,0.08));
  border: 1.5px solid rgba(255,215,0,0.5);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #fff;
  opacity: 0;
  transform: scale(0.85) translateY(8px);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.mr-tier-unlock.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: tierUnlockGlow 1.6s ease-in-out infinite;
}
@keyframes tierUnlockGlow {
  0%,100% { box-shadow: 0 0 8px rgba(255,215,0,0.2); }
  50%      { box-shadow: 0 0 24px rgba(255,215,0,0.5); }
}
.mr-open-pass-btn {
  display: block;
  margin: 10px auto 0;
  background: linear-gradient(135deg, #ffd700, #ff9900);
  border: none;
  border-radius: 10px;
  padding: 9px 22px;
  font-family: monospace;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #1a0a00;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,180,0,0.5);
  transition: transform 0.15s;
}
.mr-open-pass-btn:hover { transform: scale(1.05); }
.mr-open-pass-btn:active { transform: scale(0.95); }

/* ══════════════════════════════════════════════════════════════════════════
   4. BRAWL PASS MODAL — header
   ══════════════════════════════════════════════════════════════════════════ */
#passOverlay .shop-content { padding-top: 12px; }

.pass-xp-header {
  background: linear-gradient(135deg, rgba(103,215,240,0.1), rgba(255,215,0,0.06));
  border: 1.5px solid rgba(103,215,240,0.3);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.pass-xp-header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-family: monospace;
}
.pass-xp-header-top .pxh-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #67d7f0;
  letter-spacing: 0.06em;
}
.pass-xp-header-top .pxh-tier {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  font-weight: bold;
}
.pass-xp-track-wrap { height: 12px; border-radius: 999px; background: rgba(0,0,0,0.4); overflow: hidden; }
.pass-xp-track-wrap .pxh-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #67d7f0, #a0f0ff);
  box-shadow: 0 0 10px rgba(103,215,240,0.6);
  transition: width 0.4s ease;
}
.pxh-label {
  text-align: center;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  font-family: monospace;
}

/* Premium CTA */
.pass-premium-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255,215,0,0.12), rgba(255,140,0,0.07));
  border: 1.5px solid rgba(255,215,0,0.4);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pass-premium-cta .ppc-text { font-family: monospace; font-size: 0.75rem; color: rgba(255,255,255,0.8); flex: 1; }
.pass-premium-cta .ppc-text b { color: #ffd700; }
.pass-premium-cta .buy-btn { width: auto; padding: 10px 16px; white-space: nowrap; font-size: 0.7rem; }
.pass-premium-cta__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pass-premium-cta .pass-pay-paypal,
.pass-premium-cta .pass-pay-metamask { display: flex; align-items: center; gap: 6px; }
.pass-premium-cta.owned {
  background: linear-gradient(135deg, rgba(166,224,44,0.12), rgba(100,200,0,0.06));
  border-color: rgba(166,224,44,0.5);
}
.pass-premium-cta.owned .ppc-text b { color: #a6e02c; }

/* ══════════════════════════════════════════════════════════════════════════
   5. BRAWL PASS TRACK — horizontal scroll (real Brawl Stars layout)
   ══════════════════════════════════════════════════════════════════════════ */
.pass-track-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 12px;
  scroll-snap-type: x proximity;
}
.pass-track-scroll::-webkit-scrollbar { height: 6px; }
.pass-track-scroll::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.3); border-radius: 99px; }
.pass-track-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); }

#passTrack {
  display: flex;
  gap: 4px;
  min-width: max-content;
}

.pt-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  flex-shrink: 0;
  scroll-snap-align: center;
}
.pt-num {
  font-family: monospace;
  font-size: 0.65rem;
  font-weight: bold;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}
.pt-tier.unlocked .pt-num,
.pt-tier.current  .pt-num { color: #ffd700; }

.pt-connector {
  width: 3px;
  height: 14px;
  background: rgba(255,255,255,0.08);
  margin: 2px 0;
}
.pt-connector.done { background: linear-gradient(180deg, #ffd700, #67d7f0); }

.pt-reward {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.pt-reward.prem { border-color: rgba(255,215,0,0.25); }
.pt-reward.free { border-color: rgba(166,224,44,0.2); }
.pt-reward.special { background: linear-gradient(160deg, rgba(255,215,0,0.12), rgba(255,140,0,0.06)); }
.pt-reward.locked { opacity: 0.4; }
.pt-reward.locked .pt-reward-icon { filter: grayscale(1) brightness(0.6); }
.pt-reward.claimed { opacity: 0.55; }

.pt-tier.unlocked .pt-reward.prem { border-color: rgba(255,215,0,0.55); box-shadow: 0 0 10px rgba(255,215,0,0.18); }
.pt-tier.unlocked .pt-reward.free { border-color: rgba(166,224,44,0.5); box-shadow: 0 0 10px rgba(166,224,44,0.16); }
.pt-tier.current .pt-reward {
  animation: ptCurrentPulse 1.6s ease-in-out infinite;
}
@keyframes ptCurrentPulse {
  0%,100% { box-shadow: 0 0 6px rgba(103,215,240,0.2); }
  50%      { box-shadow: 0 0 18px rgba(103,215,240,0.5); }
}

.pt-reward-icon { font-size: 1.3rem; line-height: 1; }
.pt-reward-name {
  font-family: monospace;
  font-size: 0.46rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  line-height: 1.1;
  padding: 0 2px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-claim-btn {
  position: absolute;
  bottom: -9px;
  background: linear-gradient(135deg, #ffd700, #ff9900);
  border: none;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: monospace;
  font-size: 0.42rem;
  font-weight: 900;
  color: #1a0a00;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255,180,0,0.6);
  animation: ptClaimGlow 1.3s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes ptClaimGlow {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}
.pt-claimed {
  position: absolute;
  bottom: -8px;
  background: #a6e02c;
  color: #0a1a00;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  font-weight: bold;
}
.pt-locked-icon {
  position: absolute;
  bottom: -8px;
  font-size: 0.6rem;
}

.pt-tier.milestone .pt-num { color: #ff9900 !important; font-size: 0.75rem; }

/* ── Tier claim pop (full-screen brief celebration) ─────────────────────── */
.tier-claim-pop {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.6);
  z-index: 10001;
  background: linear-gradient(160deg, #1a1a2e, #16213e);
  border: 2px solid rgba(255,215,0,0.5);
  border-radius: 20px;
  padding: 24px 32px;
  text-align: center;
  font-family: monospace;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 40px rgba(255,215,0,0.25);
  pointer-events: none;
}
.tier-claim-pop.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.tcp-icon { font-size: 3rem; margin-bottom: 8px; filter: drop-shadow(0 0 14px rgba(255,215,0,0.6)); }
.tcp-name { font-size: 1.1rem; font-weight: 900; color: #ffd700; margin-bottom: 4px; }
.tcp-tier { font-size: 0.7rem; color: rgba(255,255,255,0.5); }
