:root {
  --bg: #05050a;
  --panel: rgba(13, 14, 26, 0.9);
  --panel-border: rgba(0, 240, 255, 0.22);
  --cyan: #00f0ff;
  --crimson: #ff2a5f;
  --violet: #b5179e;
  --gold: #ffc83d;
  --green: #22f59e;
  --text: #f4f7ff;
  --muted: #93a1be;
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #120d26 0%, #05050a 72%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  touch-action: none;
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile-first portrait viewport, centered frame on desktop */
#game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 460px;
  max-height: 920px;
  background: #07070e;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
  #game-shell {
    max-width: 100%;
    max-height: 100%;
    box-shadow: none;
  }
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hidden {
  display: none !important;
}

/* ==================== HUD ==================== */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: calc(10px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
}

.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}

.hud-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-pill {
  position: relative;
  height: 20px;
  border-radius: 7px;
  background: rgba(8, 10, 20, 0.85);
  border: 1px solid rgba(255, 42, 95, 0.45);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bar-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
}

.bar-fill {
  height: 100%;
  width: 100%;
  transition: width 0.14s ease-out;
}

.hp-fill {
  background: linear-gradient(90deg, #d90429 0%, #ff2a5f 65%, #ff6b8b 100%);
  box-shadow: 0 0 12px rgba(255, 42, 95, 0.7);
}

#hp-text {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.xp-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lvl-badge {
  font-size: 10px;
  font-weight: 900;
  color: #05050a;
  background: var(--cyan);
  padding: 2px 6px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

.xp-track {
  position: relative;
  flex: 1;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.xp-fill {
  width: 0%;
  background: linear-gradient(90deg, #00b4d8, #00f0ff, #a2f9ff);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.75);
}

.hud-center {
  text-align: center;
  background: rgba(8, 10, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px 12px;
  backdrop-filter: blur(6px);
}

.timer {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.phase-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--cyan);
}

.hud-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mini-counters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
}

.counter {
  background: rgba(8, 10, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
}

.icon-btn {
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 17, 32, 0.85);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.1s, border-color 0.15s;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.muted {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Boss bar */
.boss-hud {
  margin-top: 8px;
  background: rgba(20, 4, 14, 0.88);
  border: 1px solid rgba(255, 23, 68, 0.65);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 0 24px rgba(255, 23, 68, 0.35);
}

.boss-title-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #ff6b8b;
  margin-bottom: 4px;
}

.boss-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.boss-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff1744, #ff6b8b, #ffc83d);
  box-shadow: 0 0 14px #ff1744;
  transition: width 0.08s linear;
}

/* Combo badge */
.hud-mid-row {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.combo-wrap {
  margin-left: auto;
  text-align: right;
  pointer-events: none;
  animation: comboPop 0.16s ease-out;
}

.combo-num {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ffc83d 55%, #ff2a5f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 200, 61, 0.6));
}

.combo-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.6px;
  color: var(--gold);
}

.combo-timer-track {
  margin-top: 3px;
  margin-left: auto;
  width: 68px;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}

#combo-timer-fill {
  height: 100%;
  width: 100%;
  background: var(--gold);
}

@keyframes comboPop {
  from { transform: scale(1.25); }
  to { transform: scale(1); }
}

/* Dramatic center banner */
.event-banner {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  text-align: center;
  padding: 12px 16px;
  background: linear-gradient(90deg, transparent, rgba(255, 23, 68, 0.28) 20%, rgba(255, 23, 68, 0.35) 50%, rgba(255, 23, 68, 0.28) 80%, transparent);
  border-top: 1px solid rgba(255, 42, 95, 0.8);
  border-bottom: 1px solid rgba(255, 42, 95, 0.8);
  animation: bannerIn 0.28s ease-out;
}

.event-banner-sub {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold);
}

.event-banner-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 42, 95, 0.9);
}

@keyframes bannerIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Active Skills Strip */
.skills-strip {
  display: flex;
  flex-wrap: wrap;
  max-width: 68%;
  gap: 5px;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 12, 24, 0.78);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 800;
}

/* Bottom Controls */
.hud-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.hud-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.control-hint {
  font-size: 11px;
  color: rgba(244, 247, 255, 0.78);
  background: rgba(8, 10, 20, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 6px 10px;
  border-radius: 9px;
  line-height: 1.3;
  transition: opacity 0.6s ease;
}

.control-hint.faded {
  opacity: 0.28;
}

.ult-btn {
  pointer-events: auto;
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 200, 61, 0.35);
  background:
    radial-gradient(circle at center, rgba(10, 10, 22, 0.92) 58%, transparent 60%),
    conic-gradient(var(--gold) var(--fury-deg, 0deg), rgba(255, 255, 255, 0.12) 0deg);
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  opacity: 0.78;
  transition: transform 0.1s, opacity 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.ult-btn.ready {
  opacity: 1;
  color: #fff;
  border-color: var(--gold);
  background: radial-gradient(circle at 35% 35%, rgba(255, 200, 61, 0.45), rgba(255, 42, 95, 0.6) 60%, rgba(16, 8, 22, 0.96));
  box-shadow: 0 0 20px rgba(255, 200, 61, 0.75), 0 0 34px rgba(255, 42, 95, 0.55);
  animation: ultPulse 0.85s ease-in-out infinite alternate;
}

.ult-btn:active {
  transform: scale(0.9);
}

.ult-btn-icon {
  font-size: 19px;
  line-height: 1;
}

.ult-btn-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

@keyframes ultPulse {
  from {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(255, 200, 61, 0.7), 0 0 30px rgba(255, 42, 95, 0.45);
  }
  to {
    transform: scale(1.07);
    box-shadow: 0 0 28px rgba(255, 200, 61, 0.95), 0 0 46px rgba(255, 42, 95, 0.8);
  }
}

.dash-btn {
  pointer-events: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: radial-gradient(circle at 35% 35%, rgba(0, 240, 255, 0.3), rgba(8, 10, 24, 0.92));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  transition: transform 0.1s, opacity 0.15s, border-color 0.15s;
}

.dash-btn.cooldown {
  opacity: 0.45;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.dash-btn:active {
  transform: scale(0.9);
}

.dash-btn-icon {
  font-size: 20px;
  line-height: 1;
}

.dash-btn-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

/* Multiplayer HUD Bar */
.mp-hud-bar {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: rgba(8, 11, 24, 0.86);
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 10px;
  padding: 5px 10px;
  backdrop-filter: blur(8px);
}

.mp-hud-bar.coop-mode {
  border-color: rgba(34, 245, 158, 0.45);
}

.mp-hud-bar.duel-mode {
  border-color: rgba(199, 125, 255, 0.5);
}

.mp-hud-side {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mp-hud-side.peer {
  text-align: right;
}

.mp-hud-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

.mp-hud-side.me b {
  font-size: 14px;
  font-weight: 900;
  color: var(--cyan);
}

.mp-hud-side.peer b {
  font-size: 14px;
  font-weight: 900;
  color: #ff6b8b;
}

.mp-hud-bar.coop-mode .mp-hud-side.peer b {
  color: var(--green);
}

.mp-hud-center {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

.mp-hud-center.urgent {
  color: #fff;
  background: rgba(255, 42, 95, 0.85);
  animation: comboPop 0.5s ease-in-out infinite alternate;
}

/* Interactive Dojo Tutorial HUD Banner */
.tutorial-banner {
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(8, 22, 36, 0.92), rgba(14, 14, 34, 0.94));
  border: 1px solid rgba(0, 240, 255, 0.65);
  border-radius: 12px;
  padding: 9px 11px;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.24);
}

.tut-banner-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}

.tut-step-badge {
  font-size: 10px;
  font-weight: 900;
  color: #05050a;
  background: var(--cyan);
  padding: 2px 7px;
  border-radius: 99px;
}

.tut-title {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  flex: 1;
}

.tut-progress {
  font-size: 11px;
  font-weight: 900;
  color: var(--gold);
}

.tut-desc {
  font-size: 12px;
  color: #d6e4ff;
  line-height: 1.35;
}

/* Quick Emote Bar (Multiplayer In-Game) */
.mp-emote-bar {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
}

.emote-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(10, 14, 28, 0.82);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.1s, border-color 0.15s;
}

.emote-btn:active {
  transform: scale(0.86);
  border-color: var(--gold);
}

/* ==================== OVERLAYS & LOBBY 3.0 ==================== */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: calc(10px + var(--safe-top)) 14px calc(12px + var(--safe-bottom));
}

.screen-lobby {
  padding: calc(10px + var(--safe-top)) 0 0;
  justify-content: space-between;
  gap: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 12, 0.24) 0%,
    rgba(5, 5, 12, 0.08) 28%,
    rgba(7, 7, 16, 0.88) 57%,
    rgba(5, 5, 10, 0.98) 100%
  );
  transition: background 0.25s ease;
}

.screen-lobby.tab-hero-active {
  background: linear-gradient(
    180deg,
    rgba(5, 5, 12, 0.14) 0%,
    rgba(5, 5, 12, 0.06) 34%,
    rgba(7, 7, 16, 0.92) 48%,
    rgba(5, 5, 10, 0.98) 100%
  );
}

.screen-lobby.tab-solid-active {
  background: linear-gradient(
    180deg,
    rgba(7, 8, 18, 0.93) 0%,
    rgba(8, 9, 20, 0.96) 50%,
    rgba(5, 5, 12, 0.99) 100%
  );
}

.lobby-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 12px 8px;
  flex-shrink: 0;
}

.currency-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.currency-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 18, 34, 0.9);
  border: 1px solid rgba(255, 200, 61, 0.34);
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}

.stars-chip {
  border-color: rgba(0, 240, 255, 0.36);
  color: var(--cyan);
}

.trophies-chip {
  border-color: rgba(199, 125, 255, 0.42);
  color: #e0aaff;
}

.topbar-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.icon-btn.icon-sm {
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 9px;
}

/* Tab Views Container */
.lobby-views {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: 0 14px 10px;
  gap: 8px;
}

.tab-panel.active {
  display: flex;
}

.scroll-panel {
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
  gap: 10px;
}

.scroll-list {
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 2px;
}

/* Play Tab Showcase & Deck */
.hero-showcase.compact {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brand-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.28);
  padding: 3px 9px;
  border-radius: 99px;
}

.brand-title {
  font-size: 38px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -1px;
  line-height: 0.95;
  text-shadow: 0 0 26px rgba(0, 240, 255, 0.45);
}

.brand-title span {
  color: var(--crimson);
  text-shadow: 0 0 26px rgba(255, 42, 95, 0.7);
}

.record-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.record-row b {
  color: var(--text);
}

.league-mini-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.lobby-showcase-window {
  flex: 1 1 auto;
  min-height: 70px;
  pointer-events: none;
}

.lobby-showcase-window.hero-window {
  flex: 0 0 34%;
  min-height: 155px;
}

/* Non-blocking Tutorial Offer Banner */
.tutorial-offer-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(34, 245, 158, 0.14));
  border: 1px solid rgba(0, 240, 255, 0.48);
  border-radius: 12px;
  padding: 4px 6px 4px 10px;
}

.tutorial-offer-cta {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 2px;
  text-align: left;
}

.tutorial-offer-cta b {
  color: var(--gold);
}

.offer-arrow {
  font-size: 16px;
  color: var(--cyan);
}

.tutorial-offer-dismiss {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.lobby-bottom-deck {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Mode Selector Pills */
.mode-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.mode-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 19, 36, 0.88);
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s, border-color 0.15s, background 0.15s, color 0.15s;
}

.mode-pill:active {
  transform: scale(0.95);
}

.mode-pill.active {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.16);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.22);
}

.mode-pill.active[data-mode="daily"] {
  border-color: var(--gold);
  background: rgba(255, 200, 61, 0.18);
  color: var(--gold);
}

.mode-pill.active[data-mode="duel"] {
  border-color: #c77dff;
  background: rgba(181, 23, 158, 0.25);
  color: #f0c4ff;
}

.mode-pill.active[data-mode="coop"] {
  border-color: var(--green);
  background: rgba(34, 245, 158, 0.16);
  color: var(--green);
}

.mode-info-strip {
  background: rgba(14, 17, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 7px 11px;
}

.mode-info-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  color: var(--cyan);
}

.mode-info-desc {
  font-size: 11px;
  color: #cdd6eb;
  margin-top: 2px;
  line-height: 1.3;
}

/* Compact Daily Quests Strip */
.quests-strip-card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(22, 24, 46, 0.92), rgba(14, 15, 30, 0.94));
  border: 1px solid rgba(255, 200, 61, 0.28);
  border-radius: 12px;
  padding: 8px 11px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}

.quests-strip-card:active {
  transform: scale(0.98);
}

.quests-strip-card.has-claim {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 200, 61, 0.22);
}

.quests-strip-left {
  flex: 1;
  min-width: 0;
}

.quests-strip-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold);
}

.notif-pill {
  font-size: 8px;
  font-weight: 900;
  background: var(--crimson);
  color: #fff;
  padding: 1px 6px;
  border-radius: 99px;
  animation: comboPop 0.7s ease-in-out infinite alternate;
}

.quest-preview-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-mini-track {
  margin-top: 4px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.quest-mini-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 0.25s ease;
}

.quests-strip-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.quest-preview-progress {
  font-size: 11px;
  font-weight: 900;
  color: var(--cyan);
}

.quest-open-cta {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

/* Quick Action Pills */
.quick-actions-row {
  display: flex;
  gap: 6px;
}

.quick-pill {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(18, 21, 38, 0.9);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s;
}

.quick-pill:active {
  transform: scale(0.95);
}

.hero-equip-pill {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: rgba(0, 240, 255, 0.28);
  color: var(--cyan);
}

/* Buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #ff2a5f 0%, #c9184a 45%, #7b2cbf 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 26px rgba(255, 42, 95, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: transform 0.12s, filter 0.15s;
}

.btn-primary.mode-daily {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 52%, #b91c1c 100%);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary.mode-duel,
.btn-primary.mp-btn-duel {
  background: linear-gradient(135deg, #b5179e 0%, #7209b7 52%, #4361ee 100%);
  box-shadow: 0 8px 26px rgba(181, 23, 158, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary.mode-coop,
.btn-primary.mp-btn-coop {
  background: linear-gradient(135deg, #10b981 0%, #059669 52%, #0284c7 100%);
  box-shadow: 0 8px 26px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.btn-primary small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 10px 10px;
  background: rgba(18, 21, 38, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.1s, border-color 0.15s;
}

.btn-secondary:active {
  transform: scale(0.96);
}

.btn-secondary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.full-w {
  width: 100%;
}

/* ==================== HERO TAB (SHEET OVER LIVE SHOWCASE) ==================== */
.hero-preview-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 13, 28, 0.86);
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 11px;
  color: #d6e4ff;
  backdrop-filter: blur(6px);
}

.dot-sep {
  color: var(--muted);
}

.hero-sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(11, 13, 25, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 18px;
  padding: 10px;
  backdrop-filter: blur(12px);
}

.sub-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  flex-shrink: 0;
}

.sub-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sub-tab.active {
  background: rgba(0, 240, 255, 0.16);
  border-color: rgba(0, 240, 255, 0.45);
  color: #fff;
}

.skin-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

/* ==================== ONLINE TAB ==================== */
.panel-header-card {
  background: linear-gradient(135deg, rgba(22, 24, 48, 0.92), rgba(14, 16, 32, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 15px;
  padding: 11px 13px;
}

.panel-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: var(--cyan);
}

.panel-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.online-league-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.online-league-icon {
  font-size: 28px;
}

.online-stats-col {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
}

.online-stats-col b {
  font-size: 15px;
  color: var(--gold);
}

.online-stats-col small {
  font-size: 11px;
  color: var(--muted);
}

.mp-mode-card {
  background: rgba(16, 18, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-mode-card.duel-card {
  border-color: rgba(181, 23, 158, 0.5);
  background: linear-gradient(155deg, rgba(46, 12, 48, 0.8), rgba(14, 15, 30, 0.95));
}

.mp-mode-card.coop-card {
  border-color: rgba(34, 245, 158, 0.42);
  background: linear-gradient(155deg, rgba(10, 38, 34, 0.8), rgba(14, 15, 30, 0.95));
}

.mp-mode-card.room-card {
  border-color: rgba(0, 240, 255, 0.34);
}

.mp-card-badge {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.3px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(199, 125, 255, 0.22);
  color: #e0aaff;
}

.mp-card-badge.coop-badge {
  background: rgba(34, 245, 158, 0.2);
  color: var(--green);
}

.mp-card-badge.room-badge {
  background: rgba(0, 240, 255, 0.16);
  color: var(--cyan);
}

.mp-card-title {
  font-size: 16px;
  font-weight: 900;
}

.mp-card-desc {
  font-size: 12px;
  color: #cbd5ec;
  line-height: 1.4;
}

.mp-card-desc code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.room-input-row {
  display: flex;
  gap: 7px;
}

.room-input {
  flex: 1;
  min-width: 0;
  background: rgba(6, 8, 18, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 10px;
  padding: 9px 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.room-input:focus {
  border-color: var(--cyan);
}

.room-copy-btn {
  flex-shrink: 0;
  padding: 8px 11px;
}

.room-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* ==================== TOP / LEADERBOARDS TAB ==================== */
.league-banner {
  background: linear-gradient(135deg, rgba(28, 22, 52, 0.92), rgba(14, 16, 32, 0.95));
  border: 1px solid rgba(255, 200, 61, 0.35);
  border-radius: 15px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.league-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.league-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-big-icon {
  font-size: 28px;
}

.league-trophy-box {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.league-trophy-box b {
  font-size: 16px;
  color: var(--gold);
}

.league-trophy-box small {
  font-size: 10px;
  color: var(--muted);
}

.league-progress-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.league-progress-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 0.3s ease;
}

.lb-seed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--gold);
  background: rgba(255, 200, 61, 0.08);
  border: 1px solid rgba(255, 200, 61, 0.26);
  border-radius: 10px;
  padding: 6px 10px;
}

.lb-seed-mod {
  color: #e4ecff;
  font-weight: 700;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.lb-row.me {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
}

.lb-rank {
  width: 26px;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

.lb-main {
  flex: 1;
  min-width: 0;
}

.lb-name {
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.lb-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.lb-score {
  font-weight: 900;
  color: var(--cyan);
  font-size: 13px;
}

.lb-challenge-btn {
  border: 1px solid rgba(199, 125, 255, 0.55);
  background: rgba(181, 23, 158, 0.28);
  color: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.lb-challenge-btn:active {
  transform: scale(0.93);
}

/* ==================== SHOP TAB (NON-INTRUSIVE STORE & BP) ==================== */
.shop-card {
  background: rgba(16, 19, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.free-chest-card {
  border-color: rgba(34, 245, 158, 0.45);
  background: linear-gradient(145deg, rgba(10, 38, 32, 0.85), rgba(14, 17, 32, 0.96));
}

.bp-card {
  border-color: rgba(255, 200, 61, 0.38);
  background: linear-gradient(155deg, rgba(36, 22, 48, 0.88), rgba(14, 16, 30, 0.96));
}

.starter-card {
  border-color: rgba(0, 240, 255, 0.42);
  background: linear-gradient(145deg, rgba(12, 32, 48, 0.85), rgba(24, 14, 38, 0.95));
}

.shop-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.shop-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.1px;
  padding: 2px 7px;
  border-radius: 99px;
  margin-bottom: 3px;
}

.free-tag { background: rgba(34, 245, 158, 0.2); color: var(--green); }
.bp-tag { background: rgba(255, 200, 61, 0.2); color: var(--gold); }
.hit-tag { background: rgba(0, 240, 255, 0.2); color: var(--cyan); }
.token-tag { background: rgba(199, 125, 255, 0.2); color: #e0aaff; }

.shop-card-title {
  font-size: 15px;
  font-weight: 900;
}

.shop-card-desc {
  font-size: 12px;
  color: #cbd5ec;
  line-height: 1.4;
}

.shop-status-pill,
.bp-xp-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  white-space: nowrap;
}

.shop-free-btn {
  padding: 10px 14px;
  font-size: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.32);
}

.shop-stars-btn {
  padding: 11px 14px;
  font-size: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #160c00;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.bp-progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bp-progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #b5179e, #ffc83d);
  transition: width 0.3s ease;
}

.bp-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  flex: 1;
}

.bp-tier-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.bp-tier-row {
  display: grid;
  grid-template-columns: 44px 1fr 1fr;
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px;
}

.bp-tier-row.unlocked {
  border-color: rgba(255, 200, 61, 0.34);
}

.bp-tier-num {
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.bp-tier-num b {
  font-size: 13px;
  color: var(--gold);
}

.bp-tier-num small {
  font-size: 9px;
  color: var(--muted);
}

.bp-reward-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 18, 34, 0.9);
  border-radius: 8px;
  padding: 6px 7px;
  color: #e4ecff;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp-reward-btn .bp-track-tag {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: var(--cyan);
}

.bp-reward-btn.prem .bp-track-tag {
  color: var(--gold);
}

.bp-reward-btn.claimable {
  border-color: var(--green);
  background: rgba(34, 245, 158, 0.16);
  color: #fff;
}

.bp-reward-btn.prem.claimable {
  border-color: var(--gold);
  background: rgba(255, 200, 61, 0.2);
}

.bp-reward-btn.claimed {
  opacity: 0.55;
  border-color: rgba(34, 245, 158, 0.3);
}

.bp-reward-btn:disabled {
  cursor: default;
}

.shop-fair-footer {
  text-align: center;
  padding: 6px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.shop-fair-footer p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.test-stars-btn {
  font-size: 11px;
  padding: 6px 12px;
  border-style: dashed;
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--cyan);
}

/* ==================== BOTTOM FROSTED NAVIGATION BAR ==================== */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 8px calc(8px + var(--safe-bottom));
  background: rgba(10, 12, 24, 0.92);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.nav-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 5px 2px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, transform 0.1s;
}

.nav-tab:active {
  transform: scale(0.92);
}

.nav-tab.active {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 800;
}

.nav-dot {
  position: absolute;
  top: 4px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 8px var(--crimson);
}

/* ==================== MODALS ==================== */
.modal {
  background: rgba(4, 5, 11, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.modal-card {
  width: 100%;
  max-height: 90%;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, rgba(19, 21, 38, 0.98), rgba(10, 11, 22, 0.98));
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 20px;
  padding: 16px 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.compact-card {
  max-width: 340px;
  text-align: center;
}

.modal-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--cyan);
}

.modal-kicker.danger {
  color: var(--crimson);
}

.modal-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.modal-desc {
  font-size: 13px;
  color: #cbd4ea;
  line-height: 1.45;
}

/* Illustrated Guide Modal */
.guide-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  padding: 10px 11px;
}

.guide-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.28);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.guide-item-title {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.guide-item-desc {
  font-size: 11.5px;
  color: #c8d4ec;
  line-height: 1.38;
}

.guide-tut-btn {
  background: linear-gradient(135deg, #00b4d8, #0077b6 50%, #7209b7);
  box-shadow: 0 8px 24px rgba(0, 180, 216, 0.38);
}

/* Matchmaking Radar Animation */
.radar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 4px auto;
  display: grid;
  place-items: center;
}

.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.35);
}

.radar-ring.ring-2 {
  inset: 18px;
  border-color: rgba(199, 125, 255, 0.45);
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 240, 255, 0.55) 0deg, transparent 85deg, transparent 360deg);
  animation: radarSpin 1.15s linear infinite;
}

.radar-core {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(12, 16, 34, 0.95);
  border: 2px solid var(--cyan);
  display: grid;
  place-items: center;
  font-size: 17px;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-rival-pill {
  background: rgba(34, 245, 158, 0.14);
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
}

/* Level up cards */
.upgrade-choices {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.upgrade-option {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  padding: 12px;
  background: rgba(24, 28, 50, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}

.upgrade-option:active {
  transform: scale(0.97);
}

.upgrade-option.rarity-common { border-color: rgba(147, 161, 190, 0.4); }
.upgrade-option.rarity-rare { border-color: rgba(0, 240, 255, 0.6); box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.1); }
.upgrade-option.rarity-epic { border-color: rgba(181, 23, 158, 0.78); box-shadow: inset 0 0 20px rgba(181, 23, 158, 0.18); }
.upgrade-option.rarity-legendary { border-color: rgba(255, 200, 61, 0.9); box-shadow: inset 0 0 24px rgba(255, 200, 61, 0.22); }

.upg-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.upg-body {
  flex: 1;
}

.upg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.upg-name {
  font-size: 15px;
  font-weight: 800;
}

.upg-lvl {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cyan);
}

.upg-desc {
  font-size: 12px;
  color: #c7d1e8;
  margin-top: 3px;
  line-height: 1.35;
}

.levelup-monetize-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-micro {
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  color: #fff;
  white-space: nowrap;
  transition: transform 0.1s, opacity 0.15s;
}

.btn-micro:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-micro:active {
  transform: scale(0.96);
}

.ad-btn {
  background: linear-gradient(135deg, #0096c7, #00b4d8);
  border-color: rgba(0, 240, 255, 0.5);
}

.stars-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(255, 200, 61, 0.65);
  color: #140c00;
}

/* Revive modal */
.revive-card {
  text-align: center;
  border-color: rgba(255, 42, 95, 0.55);
}

.revive-countdown-ring {
  width: 64px;
  height: 64px;
  margin: 2px auto;
  border-radius: 50%;
  border: 3px solid var(--crimson);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  color: var(--crimson);
  box-shadow: 0 0 22px rgba(255, 42, 95, 0.4);
}

.token-revive-btn {
  background: linear-gradient(135deg, #10b981, #059669 55%, #0284c7);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
  font-size: 14px;
  padding: 12px 14px;
}

/* Summary */
.record-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 900;
  color: #140c00;
  background: var(--gold);
  padding: 4px 10px;
  border-radius: 99px;
}

.summary-duel-box {
  background: linear-gradient(135deg, rgba(46, 14, 52, 0.85), rgba(16, 18, 36, 0.94));
  border: 1px solid rgba(199, 125, 255, 0.5);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.duel-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.duel-res-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 99px;
}

.duel-res-badge.win {
  background: rgba(34, 245, 158, 0.2);
  color: var(--green);
}

.duel-res-badge.loss {
  background: rgba(255, 42, 95, 0.22);
  color: #ff6b8b;
}

.duel-trophy-delta {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
}

.duel-vs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.duel-col small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.duel-col b {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.duel-vs-sep {
  font-size: 12px;
  font-weight: 900;
  color: var(--crimson);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sum-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sum-label {
  font-size: 11px;
  color: var(--muted);
}

.sum-box b {
  font-size: 19px;
  font-weight: 900;
}

.loot-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 200, 61, 0.14), rgba(255, 200, 61, 0.04));
  border: 1px solid rgba(255, 200, 61, 0.4);
  border-radius: 14px;
  padding: 9px 12px;
}

.loot-label {
  font-size: 11px;
  color: var(--muted);
}

.loot-value {
  font-size: 19px;
  font-weight: 900;
  color: var(--gold);
}

.summary-bp-row {
  font-size: 11.5px;
  font-weight: 800;
  color: #f0c4ff;
  background: rgba(181, 23, 158, 0.18);
  border: 1px solid rgba(199, 125, 255, 0.35);
  border-radius: 10px;
  padding: 7px 10px;
  text-align: center;
}

.telemetry-preview {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  color: #7d8cab;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  padding: 6px 9px;
  line-height: 1.35;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Sheets & Lists */
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  padding: 10px 11px;
}

.sheet-item.equipped {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.09);
}

.sheet-item.clickable {
  cursor: pointer;
}

.sheet-item-info {
  flex: 1;
  min-width: 0;
}

.sheet-item-title {
  font-size: 13.5px;
  font-weight: 800;
}

.sheet-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

.sheet-action-btn {
  border: none;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--cyan);
  color: #05050a;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.sheet-action-btn.gold {
  background: var(--gold);
  color: #140c00;
}

.sheet-action-btn.stars {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #140c00;
}

.sheet-action-btn.green {
  background: var(--green);
  color: #041a10;
}

.sheet-action-btn:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: var(--muted);
  cursor: not-allowed;
}

/* Pause Audio Row */
.pause-audio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pause-toggle-btn {
  padding: 10px 8px;
  font-size: 12px;
}

/* Mock Ad Progress */
.mock-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#mock-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 0.08s linear;
}

/* Toast */
.toast {
  position: absolute;
  bottom: calc(74px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  background: rgba(12, 16, 30, 0.96);
  border: 1px solid var(--cyan);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}
