/* --- TACTICAL ARENA, SHOP & BENCH DESIGN SYSTEM --- */

/* --- MAIN STAGE BOX --- */
.arena-stage-box {
  width: 100%;
  max-width: 1560px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

/* --- ARENA ROW: PLAYER SIDEBAR + 60-70% BATTLEFIELD + ENEMY SIDEBAR --- */
.arena-main-row {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 10px;
  align-items: stretch;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebars (Player Info & Enemy Info) */
.player-sidebar-panel,
.enemy-sidebar-panel {
  width: 175px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.player-panel-card,
.enemy-panel-card {
  height: 100%;
  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--panel-shadow);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  box-sizing: border-box;
}

.player-champ-portrait {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--panel-border);
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  background: #2d3748;
}

.side-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-champ-name {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--panel-border);
  letter-spacing: 0.5px;
}

.player-stats-mini {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 8px 6px;
}

.mini-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 0 4px;
}

.mini-label {
  color: #718096;
}

.mini-val {
  color: var(--panel-border);
  font-weight: 900;
}

.mini-xp-bar-wrap {
  width: 100%;
  height: 8px;
  background: #cbd5e0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}

.mini-xp-fill {
  height: 100%;
  background: #3182ce;
  transition: width 0.3s ease;
}

.mini-xp-text {
  font-size: 11px;
  font-weight: 800;
  color: #4a5568;
}

/* Enemy Sidebar Card */
.enemy-card-badge {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fed7d7;
  color: #9b2c2c;
  border: 1.5px solid #feb2b2;
}

.enemy-card-name {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: #742a2a;
}

.enemy-card-desc {
  font-size: 11.5px;
  color: #4a5568;
  line-height: 1.35;
  font-weight: 600;
  padding: 0 4px;
}

/* --- CENTER BATTLEFIELD ARENA (60-70% OF SCREEN) --- */
.arena-container {
  flex: 1;
  min-width: 0;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.85) 0%, rgba(2, 6, 23, 0.95) 100%);
  border: 3.5px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--panel-shadow), inset 0 0 25px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

#battle-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Arena Territory Overlay */
.arena-labels-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 16px;
  z-index: 2;
}

.arena-side-label {
  align-self: center;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 6px;
  opacity: 0.55;
  text-transform: uppercase;
}

.arena-side-label.enemy-label {
  background: rgba(229, 62, 62, 0.25);
  color: #fed7d7;
  border: 1px solid rgba(229, 62, 62, 0.4);
}

.arena-side-label.player-label {
  margin-top: auto;
  background: rgba(72, 187, 120, 0.25);
  color: #c6f6d5;
  border: 1px solid rgba(72, 187, 120, 0.4);
}

/* --- ON-BOARD CAPACITY / SPACE TRACKER (DESKTOP & MOBILE) --- */
.board-capacity-tracker {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: rgba(10, 18, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  font-family: var(--font-title);
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.board-capacity-tracker:hover {
  transform: translateX(-50%) scale(1.05);
}

.board-capacity-icon {
  font-size: 13px;
  line-height: 1;
}

.board-capacity-text {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.3px;
}

.board-capacity-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Free space available (e.g. 2/3 Space, 1 Free) */
.board-capacity-tracker.has-free-space {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35), 0 4px 14px rgba(0, 0, 0, 0.65);
}
.board-capacity-tracker.has-free-space .board-capacity-text {
  color: #86efac;
}
.board-capacity-tracker.has-free-space .board-capacity-badge {
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  animation: pulseFreeSlot 1.8s ease-in-out infinite alternate;
}

/* Full board (e.g. 3/3 Space) */
.board-capacity-tracker.is-full {
  border-color: rgba(234, 179, 8, 0.5);
}
.board-capacity-tracker.is-full .board-capacity-text {
  color: #fde047;
}
.board-capacity-tracker.is-full .board-capacity-badge {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

/* Over capacity (e.g. 4/3 Space) */
.board-capacity-tracker.is-over-capacity {
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
  animation: pulseOverCapacity 0.8s ease-in-out infinite alternate;
}
.board-capacity-tracker.is-over-capacity .board-capacity-text {
  color: #fca5a5;
}
.board-capacity-tracker.is-over-capacity .board-capacity-badge {
  background: #dc2626;
  color: #ffffff;
}

@keyframes pulseFreeSlot {
  0% { box-shadow: 0 0 4px rgba(34, 197, 94, 0.4); }
  100% { box-shadow: 0 0 10px rgba(74, 222, 128, 0.9); }
}

@keyframes pulseOverCapacity {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.06); }
}

.arena-floating-hud {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 5;
}

.battle-timer-pill {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.9);
  color: #f6e05e;
  border: 2px solid #f6e05e;
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: pulseTimer 1s infinite alternate;
}

.battle-timer-pill.overtime {
  background: #e53e3e;
  color: #fff;
  border-color: #fef08a;
  animation: pulseTimer 0.6s infinite alternate;
}

.battle-timer-pill.mega-overtime {
  background: linear-gradient(135deg, #ef4444, #dc2626, #991b1b);
  color: #fff;
  border-color: #fef08a;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.8), inset 0 0 8px rgba(254, 240, 138, 0.6);
  animation: pulseMegaTimer 0.35s infinite alternate;
}

@keyframes pulseTimer {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

@keyframes pulseMegaTimer {
  from { transform: scale(1.02); }
  to { transform: scale(1.10); }
}

/* --- MIDDLE: ITEM TRAY (EQUIPMENT) + BENCH ROW --- */
.bench-and-items-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}

/* Item Tray (Equipment Inventory) */
/* --- IN-BOARD ITEM BAG / INVENTORY DOCK (BOTTOM-LEFT OF ARENA BOARD) --- */
.board-item-bag-dock {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 25;
  pointer-events: auto;
  background: rgba(13, 27, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid #785a28;
  box-shadow: inset 0 0 0 1px rgba(200, 170, 110, 0.3), 0 6px 20px rgba(0, 0, 0, 0.5);
  border-radius: 14px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  max-width: 280px;
  min-height: 52px;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.board-item-bag-dock.has-items {
  border-color: #c8aa6e;
  box-shadow: inset 0 0 0 1px #c8aa6e, 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(200, 170, 110, 0.35);
}

.board-item-bag-dock.hidden {
  display: none !important;
}

.item-bag-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-bag-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.65));
}

.item-bag-title {
  font-family: var(--font-title);
  font-size: 11.5px;
  font-weight: 900;
  color: #c8aa6e;
  letter-spacing: 0.8px;
}

.item-bag-count {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
}

.item-tray-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 32px;
}

.item-tray-empty-hint {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  padding: 2px 0;
  white-space: nowrap;
}

.item-tray-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #475569;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.item-tray-badge * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.item-tray-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 10px rgba(200, 170, 110, 0.4);
  filter: brightness(1.15);
}

.item-tray-badge.selected-for-equip {
  border-color: #f6e05e !important;
  border-width: 2px !important;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  box-shadow: 0 0 14px rgba(246, 224, 94, 0.8), 0 0 4px #fff !important;
  animation: pulseEquip 1.2s infinite alternate;
}

@keyframes pulseEquip {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.item-badge-name {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
}

.item-badge-icon {
  font-size: 15px;
  line-height: 1;
}

.item-art-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

/* Bench Row Container */
.bench-row-container {
  flex: 1;
  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--panel-shadow);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ====================================================
   🗑️  SELL ZONE
   ==================================================== */
.bench-and-items-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.sell-zone {
  width: 64px;
  flex-shrink: 0;
  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--panel-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.sell-zone-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.sell-zone-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #718096;
  text-transform: uppercase;
}

/* When the player is dragging a monster, highlight the sell zone */
.sell-zone.drag-active {
  border-color: #e53e3e;
  background: #fff5f5;
  box-shadow: 0 0 18px rgba(229, 62, 62, 0.35), 0 4px 0 #feb2b2;
  animation: sellZonePulse 1s infinite alternate ease-in-out;
}

.sell-zone.drag-active .sell-zone-icon {
  animation: trashShake 0.45s infinite ease-in-out;
}

.sell-zone.drag-active .sell-zone-label {
  color: #e53e3e;
  font-weight: 900;
}

/* Hovering over sell zone while dragging */
.sell-zone.drag-over {
  border-color: #c53030;
  background: #fed7d7;
  box-shadow: 0 0 28px rgba(197, 48, 48, 0.65), 0 4px 0 #fc8181;
  transform: scale(1.06);
  animation: none;
}

.sell-zone.drag-over .sell-zone-icon {
  transform: scale(1.2) rotate(-8deg);
  animation: none;
}

@keyframes sellZonePulse {
  0%   { box-shadow: 0 0 10px rgba(229, 62, 62, 0.25), 0 4px 0 #feb2b2; }
  100% { box-shadow: 0 0 22px rgba(229, 62, 62, 0.55), 0 4px 0 #feb2b2; }
}

@keyframes trashShake {
  0%   { transform: rotate(-4deg); }
  50%  { transform: rotate(4deg); }
  100% { transform: rotate(-4deg); }
}

/* --- IN-BOARD BENCH (8 SEMI-TRANSPARENT SQUARES INSIDE THE ARENA) --- */
.board-bench-overlay {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
  padding: 0 12px;
}

.bench-slots-wrap {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 6px 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.bench-slot {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.8px solid rgba(255, 255, 255, 0.48);
  border-radius: 12px;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.bench-slot * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* --- FLOATING DRAG GHOST AVATAR --- */
#drag-ghost-avatar {
  position: fixed;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%) scale(1.15);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(250, 204, 21, 0.6);
  border: 3px solid #facc15;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.95) 30%, rgba(15, 23, 42, 0.98) 100%);
  animation: ghostFloat 1.2s infinite alternate ease-in-out;
  user-select: none;
  -webkit-user-drag: none;
}

#drag-ghost-avatar img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
  pointer-events: none;
  -webkit-user-drag: none;
}

#drag-ghost-avatar .ghost-stars {
  position: absolute;
  top: -8px;
  font-size: 11px;
  color: #ffd700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

@keyframes ghostFloat {
  0% { transform: translate(-50%, -50%) scale(1.12); }
  100% { transform: translate(-50%, -50%) scale(1.22); }
}

.bench-slot.empty {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.bench-slot.empty:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px) scale(1.03);
}

/* --- RARITY THEMED BENCH SLOTS --- */

/* Tier 1 (Common - Slate / Charcoal) */
.bench-slot.occupied.tier-1 {
  background: linear-gradient(150deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: #64748b;
  box-shadow: inset 0 0 10px rgba(148, 163, 184, 0.15), 0 3px 8px rgba(0, 0, 0, 0.4);
}
.bench-slot.occupied.tier-1:hover {
  border-color: #94a3b8;
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* Tier 2 (Uncommon - Emerald Green) */
.bench-slot.occupied.tier-2 {
  background: linear-gradient(150deg, rgba(6, 78, 59, 0.9) 0%, rgba(2, 44, 34, 0.95) 100%);
  border-color: #22c55e;
  box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.25), 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 8px rgba(34, 197, 94, 0.3);
}
.bench-slot.occupied.tier-2:hover {
  border-color: #4ade80;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* Tier 3 (Rare - Sapphire Blue) */
.bench-slot.occupied.tier-3 {
  background: linear-gradient(150deg, rgba(30, 58, 138, 0.9) 0%, rgba(10, 17, 40, 0.95) 100%);
  border-color: #3b82f6;
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.25), 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 8px rgba(59, 130, 246, 0.35);
}
.bench-slot.occupied.tier-3:hover {
  border-color: #60a5fa;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* Tier 4 (Epic - Mystic Purple) */
.bench-slot.occupied.tier-4 {
  background: linear-gradient(150deg, rgba(88, 28, 135, 0.9) 0%, rgba(30, 5, 58, 0.95) 100%);
  border-color: #a855f7;
  box-shadow: inset 0 0 14px rgba(168, 85, 247, 0.3), 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(168, 85, 247, 0.4);
}
.bench-slot.occupied.tier-4:hover {
  border-color: #c084fc;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.75), 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* Tier 5 (Legendary - Sunfire Amber / Gold) */
.bench-slot.occupied.tier-5 {
  background: linear-gradient(150deg, rgba(120, 53, 15, 0.9) 0%, rgba(40, 13, 0, 0.95) 100%);
  border-color: #f59e0b;
  box-shadow: inset 0 0 16px rgba(245, 158, 11, 0.35), 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.5);
}
.bench-slot.occupied.tier-5:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.bench-slot.selected {
  border-color: #f6e05e !important;
  border-width: 2.5px !important;
  box-shadow: 0 0 18px rgba(246, 224, 94, 0.9), inset 0 0 10px rgba(246, 224, 94, 0.3) !important;
  transform: scale(1.08) !important;
}

.slot-placeholder {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 900;
  font-family: var(--font-title);
}

.bench-unit-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.bench-monster-art {
  width: 52px;
  height: 52px;
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.bench-stars {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

/* 1-Star: Clean subtle badge */
.bench-stars.star-level-1 {
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

/* 2-Star: Sparkling Silver-Cyan Pill with Silver Stars & Glow */
.bench-stars.star-level-2 {
  background: rgba(15, 23, 42, 0.95);
  color: #38bdf8;
  border: 1.5px solid #38bdf8;
  font-size: 11px;
  padding: 1.5px 6px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.75), 0 2px 6px rgba(0, 0, 0, 0.8);
  text-shadow: 0 0 4px #38bdf8;
}

/* 3-Star: Radiant Golden Pill with Sparkling Gold Stars & Animation */
.bench-stars.star-level-3 {
  background: rgba(15, 23, 42, 0.95);
  color: #facc15;
  border: 2px solid #fbbf24;
  font-size: 12px;
  padding: 2px 7px;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.95), 0 2px 6px rgba(0, 0, 0, 0.9);
  text-shadow: 0 0 6px #f59e0b;
  animation: starPulse3 2.2s ease-in-out infinite alternate;
}

@keyframes starPulse3 {
  0% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.75); }
  100% { box-shadow: 0 0 18px rgba(251, 191, 36, 1), 0 0 26px rgba(245, 158, 11, 0.6); }
}

/* Bench Slot Accents for 2★ and 3★ */
.bench-slot.star-tier-2 {
  border-color: #38bdf8 !important;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.35), 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

.bench-slot.star-tier-3 {
  border-color: #fbbf24 !important;
  box-shadow: inset 0 0 12px rgba(251, 191, 36, 0.45), 0 0 14px rgba(251, 191, 36, 0.4) !important;
}

.bench-unit-name {
  font-size: 9px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: absolute;
  bottom: 2px;
}

.bench-item-dots {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 9px;
  display: flex;
  gap: 1px;
}

.sell-zone.in-board-sell {
  pointer-events: auto;
  width: 58px;
  height: 58px;
  background: rgba(239, 68, 68, 0.25);
  border: 1.8px dashed rgba(254, 202, 202, 0.6);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.sell-zone.in-board-sell:hover {
  background: rgba(239, 68, 68, 0.5);
  border-color: #f87171;
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.65);
}

.sell-zone.drag-over {
  background: rgba(239, 68, 68, 0.8) !important;
  border-color: #ffffff !important;
  transform: scale(1.1) !important;
}

/* --- BATTLE BUTTON: ANCHORED AT BOTTOM-RIGHT OF ARENA BOARD (DESKTOP DEFAULT) --- */
.board-battle-btn {
  position: absolute !important;
  bottom: 12px !important;
  right: 14px !important;
  z-index: 25;
  pointer-events: auto;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 10px 24px;
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.14s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.14s, filter 0.14s;
  animation: battleBtnPulse 2.2s infinite ease-in-out;
}

@keyframes battleBtnPulse {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 26px rgba(34, 197, 94, 0.8), 0 0 16px rgba(134, 239, 172, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: scale(1.04);
  }
}

.board-battle-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 26px rgba(34, 197, 94, 0.75), 0 0 18px rgba(134, 239, 172, 0.75);
  filter: brightness(1.12);
}

.board-battle-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.5);
}

.board-battle-btn .battle-btn-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease;
}

.board-battle-btn:hover .battle-btn-icon {
  transform: rotate(-12deg) scale(1.15);
}

.board-battle-btn .battle-btn-text,
.board-battle-btn .battle-btn-title {
  font-family: var(--font-title);
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.draft-battle-subtext {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 800;
  color: #86efac;
  text-shadow: 0 1px 4px rgba(34, 197, 94, 0.6);
}

.board-battle-btn.hidden {
  display: none !important;
}

/* --- BOTTOM: CREATURE SHOP SYSTEM (DRAFTING PANEL) --- */
.drafting-panel.draft-shop-wrapper {
  background: radial-gradient(circle at 50% -20%, #1a2c42 0%, #0d1a29 50%, #060e18 100%);
  border: 2px solid #9a7838;
  box-shadow: 
    inset 0 1px 0 rgba(255, 220, 140, 0.4),
    inset 0 0 0 1px #5a421b,
    inset 0 0 35px rgba(0, 0, 0, 0.7),
    0 10px 32px rgba(0, 0, 0, 0.75);
  border-radius: 14px;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Specular Light Reflection across shop modal top rim */
.drafting-panel.draft-shop-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   SHOP SELL OVERLAY (Subtle cards-only sell drop zone)
   ========================================================================== */
.draft-cards-container {
  position: relative;
}

.shop-sell-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 18, 30, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px dashed rgba(248, 113, 113, 0.65);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.85);
  transition: opacity 0.18s ease, border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.drafting-panel.shop-sell-mode .shop-sell-overlay {
  opacity: 1;
  pointer-events: auto;
}

.drafting-panel.shop-sell-hover .shop-sell-overlay {
  background: rgba(26, 18, 24, 0.99);
  border-color: #fbbf24;
  border-style: dashed;
  box-shadow: 
    inset 0 0 28px rgba(251, 191, 36, 0.22),
    0 0 20px rgba(239, 68, 68, 0.4);
}

/* Completely suppress underlying card borders, box-shadows, animations, and pseudo-elements when in sell mode */
.drafting-panel.shop-sell-mode .draft-shop-card {
  box-shadow: none !important;
  border-color: transparent !important;
  animation: none !important;
  filter: none !important;
  opacity: 0.22;
}

.drafting-panel.shop-sell-mode .draft-shop-card::before,
.drafting-panel.shop-sell-mode .draft-shop-card::after {
  display: none !important;
  animation: none !important;
  opacity: 0 !important;
}

.shop-sell-overlay-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.shop-sell-trash-glyph {
  font-size: 32px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drafting-panel.shop-sell-hover .shop-sell-trash-glyph {
  transform: scale(1.2) rotate(-6deg);
}

.shop-sell-amount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  border: 1.5px solid #f87171;
  color: #ffffff;
  font-family: var(--font-title, sans-serif);
  font-size: 15px;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.drafting-panel.shop-sell-hover .shop-sell-amount-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #fde047;
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* In Battle View (Shop is minimized / hidden - zooming in to arena) */
.drafting-panel.battle-active {
  display: none !important;
}

/* Top Header Bar (Odds Matrix & Lock Shop) */
.draft-shop-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 12px;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(30, 45, 66, 0.65) 0%, rgba(13, 22, 34, 0.75) 100%);
  border: 1px solid rgba(200, 170, 110, 0.3);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Left: Gold Tracker in Shop Header (Directly above Refresh / Buy XP Column) */
.draft-gold-tracker {
  position: absolute;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, rgba(20, 33, 50, 0.96) 0%, rgba(8, 15, 26, 0.98) 100%);
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 170, 0.4), 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 158, 11, 0.25);
  user-select: none;
  width: 168px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.draft-gold-tracker:hover {
  border-color: #fbbf24;
  box-shadow: inset 0 1px 0 rgba(255, 245, 190, 0.5), 0 0 16px rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.gold-tracker-icon {
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  line-height: 1;
}

.gold-tracker-val {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7), 0 2px 4px rgba(0, 0, 0, 0.95);
  line-height: 1;
  letter-spacing: 0.3px;
}

.gold-tracker-label {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fbbf24;
  opacity: 0.95;
  line-height: 1;
}

.gold-interest-pill {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.25);
  border: 1.5px solid rgba(74, 222, 128, 0.65);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1.1;
  margin-left: auto;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}

/* Shop Rarity Odds Matrix */
.draft-odds-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.odds-title-label {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 1.2px;
  margin-right: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.odds-pct-val {
  font-weight: 900;
  font-size: 11px;
}

.draft-odds-dot {
  font-size: 11px;
  font-weight: 900;
  padding: 2.5px 8px;
  border-radius: 6px;
  border: 1.2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.draft-odds-dot:hover {
  transform: scale(1.06);
  filter: brightness(1.2);
}

.odds-c { 
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.35) 0%, rgba(71, 85, 105, 0.45) 100%); 
  color: #f1f5f9; 
  border-color: #94a3b8; 
}
.odds-u { 
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(21, 128, 61, 0.45) 100%); 
  color: #86efac; 
  border-color: #22c55e; 
}
.odds-r { 
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(29, 78, 216, 0.45) 100%); 
  color: #93c5fd; 
  border-color: #3b82f6; 
}
.odds-e { 
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.35) 0%, rgba(162, 28, 175, 0.45) 100%); 
  color: #f472b6; 
  border-color: #d946ef; 
}
.odds-l { 
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(161, 98, 7, 0.45) 100%); 
  color: #fef08a; 
  border-color: #eab308; 
}

/* Header Right Controls */
.draft-header-controls {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-btn-lock {
  background: linear-gradient(180deg, #243447 0%, #131f2d 100%);
  border: 1.5px solid #718096;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 6px rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 4px 12px;
  color: #e2e8f0;
  font-family: var(--font-title);
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.draft-btn-lock:hover {
  background: linear-gradient(180deg, #334458 0%, #1e2c3c 100%);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.draft-btn-lock.locked {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border-color: #f87171;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 12px rgba(239, 68, 68, 0.6);
}

/* Main Shop Row: Actions on Left, 5 Cards on Right */
/* Main Shop Row: Actions on Left, 5 Cards on Right (Desktop Default) */
.draft-shop-main {
  display: flex;
  gap: 10px;
  align-items: stretch;
  z-index: 2;
}

/* Left Action Column (Larger & Roomier with 3D Bevel) */
.draft-actions-col {
  width: 162px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
}

.draft-action-btn {
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 72px;
  flex: 1;
}

/* Specular Glass Sheen on Action Buttons */
.draft-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Refresh Button Styling */
.draft-action-btn.btn-reroll {
  background: radial-gradient(circle at 75% 25%, #243548 0%, #142130 55%, #0a121c 100%);
  border: 2px solid #8e6d32;
  box-shadow: 
    inset 0 1px 0 rgba(255, 220, 140, 0.4),
    inset 0 0 0 1px #4e3816,
    0 4px 12px rgba(0, 0, 0, 0.55);
}

.draft-action-btn.btn-reroll:hover:not(:disabled) {
  border-color: #fbbf24;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px #f59e0b,
    0 6px 18px rgba(245, 158, 11, 0.4),
    0 0 12px rgba(250, 204, 21, 0.35);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Buy XP Button Styling */
.draft-action-btn.btn-buy-xp {
  background: radial-gradient(circle at 75% 25%, #183750 0%, #0d2334 55%, #06141f 100%);
  border: 2px solid #1f648d;
  box-shadow: 
    inset 0 1px 0 rgba(125, 211, 252, 0.4),
    inset 0 0 0 1px #0e3d59,
    0 4px 12px rgba(0, 0, 0, 0.55);
}

.draft-action-btn.btn-buy-xp:hover:not(:disabled) {
  border-color: #38bdf8;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px #0284c7,
    0 6px 18px rgba(56, 189, 248, 0.45),
    0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.draft-action-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.draft-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #334155;
  box-shadow: none;
}

.draft-action-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  z-index: 2;
}

.draft-action-title {
  font-family: var(--font-title);
  font-size: 13.5px;
  font-weight: 900;
  color: #f1f5f9;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.draft-action-cost {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 1px 4px rgba(250, 204, 21, 0.5), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.draft-action-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.draft-reroll-glyph {
  font-size: 26px;
  color: #fbbf24;
  font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-reroll:hover .draft-reroll-glyph {
  transform: rotate(180deg) scale(1.1);
}

.btn-reroll.has-free-rerolls {
  border-color: #eab308 !important;
  box-shadow: inset 0 0 0 1px #fef08a, 0 0 18px rgba(234, 179, 8, 0.65) !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(69, 26, 3, 0.85)) !important;
}

.btn-reroll.has-free-rerolls .draft-reroll-glyph {
  color: #fde047 !important;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.9);
  animation: freeGlyphPulse 2s infinite ease-in-out;
}

@keyframes freeGlyphPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(15deg); }
}

.free-reroll-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fef08a 0%, #facc15 40%, #f59e0b 70%, #d97706 100%) !important;
  color: #451a03 !important;
  font-family: var(--font-title) !important;
  font-size: 11.5px !important;
  font-weight: 950 !important;
  letter-spacing: 0.6px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  animation: freeRerollGoldGlow 1.8s infinite ease-in-out !important;
  text-shadow: none !important;
  white-space: nowrap;
}

@keyframes freeRerollGoldGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.6), 0 0 12px rgba(250, 204, 21, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 3px 14px rgba(234, 179, 8, 0.9), 0 0 20px rgba(250, 204, 21, 0.8), inset 0 1px 0 rgba(255, 255, 255, 1);
    filter: brightness(1.15);
  }
}

/* Level & XP Badge inside Buy XP button (Jewel Pill) */
.draft-xp-level-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.45) 0%, rgba(14, 165, 233, 0.25) 100%);
  border: 1.5px solid #38bdf8;
  border-radius: 6px;
  padding: 3px 9px;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 8px rgba(56, 189, 248, 0.3);
}

/* Current level number — shown bold at the left of the XP pill */
.draft-xp-lvl-num {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 900;
  color: #7dd3fc;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
  min-width: 14px;
  text-align: center;
  border-right: 1px solid rgba(56, 189, 248, 0.35);
  padding-right: 5px;
  margin-right: 1px;
}

.draft-xp-val {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 900;
  color: #e0f2fe;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Reward cards that support beast hover preview */
.reward-card-hoverable {
  cursor: pointer;
}
.reward-card-hoverable:hover {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

/* XP subbar integrated inside Buy XP button */
.draft-xp-subbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(0, 0, 0, 0.7);
}

.draft-xp-subbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #7dd3fc 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  transition: width 0.3s ease;
}

/* Cards Container: 5 Columns */
.draft-cards-container {
  flex: 1;
  min-width: 0;
}

.shop-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

/* Individual landscape creature card (reflective and multi-toned) */
.draft-shop-card {
  background: #0d1624;
  border: 2px solid #718096;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s, filter 0.18s, border-color 0.18s;
  box-sizing: border-box;
}

/* Specular Glass Sheen Overlay on Top Half of Card */
.draft-card-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 35%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  border-radius: 10px 10px 0 0;
}

.draft-shop-card:hover:not(.purchased) {
  transform: translateY(-4px) scale(1.015);
  filter: brightness(1.14);
}

.draft-shop-card.purchased {
  background: rgba(10, 20, 35, 0.4) !important;
  border: 1.5px dashed #334155 !important;
  cursor: default;
  box-shadow: none !important;
  opacity: 0.35;
}

.draft-purchased-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draft-sold-text {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 900;
  color: #475569;
  letter-spacing: 2.5px;
}

/* ====================================================
   💎 TIER-BASED METALLIC & GEMSTONE BORDERS (1-5)
   ==================================================== */

/* Tier 1: Common (1 Gold - Grey / Slate) */
.draft-shop-card.tier-1 {
  border: 2.5px solid #94a3b8;
  box-shadow: 
    inset 0 1px 0 rgba(241, 245, 249, 0.65),
    inset 0 0 16px rgba(148, 163, 184, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.65);
}
.draft-shop-card.tier-1:hover:not(.purchased) {
  border-color: #cbd5e1;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(148, 163, 184, 0.75);
}

/* Tier 2: Uncommon (2 Gold - Vibrant Green) */
.draft-shop-card.tier-2 {
  border: 2.5px solid #22c55e;
  box-shadow: 
    inset 0 1px 0 rgba(134, 239, 172, 0.75),
    inset 0 0 18px rgba(34, 197, 94, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.65);
}
.draft-shop-card.tier-2:hover:not(.purchased) {
  border-color: #86efac;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 26px rgba(0, 0, 0, 0.75),
    0 0 20px rgba(34, 197, 94, 0.85);
}

/* Tier 3: Rare (3 Gold - Radiant Blue) */
.draft-shop-card.tier-3 {
  border: 2.5px solid #3b82f6;
  box-shadow: 
    inset 0 1px 0 rgba(147, 197, 253, 0.8),
    inset 0 0 20px rgba(59, 130, 246, 0.38),
    0 6px 18px rgba(0, 0, 0, 0.65);
}
.draft-shop-card.tier-3:hover:not(.purchased) {
  border-color: #93c5fd;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 28px rgba(0, 0, 0, 0.75),
    0 0 24px rgba(59, 130, 246, 0.85);
}

/* Tier 4: Epic (4 Gold - Magenta / Purple) */
.draft-shop-card.tier-4 {
  border: 2.5px solid #d946ef;
  box-shadow: 
    inset 0 1px 0 rgba(244, 114, 182, 0.9),
    inset 0 0 24px rgba(217, 70, 239, 0.45),
    0 6px 20px rgba(0, 0, 0, 0.7);
}
.draft-shop-card.tier-4:hover:not(.purchased) {
  border-color: #f472b6;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 28px rgba(217, 70, 239, 0.95);
}

/* Tier 5: Legendary (5 Gold - Gilded Yellow / Gold) */
.draft-shop-card.tier-5 {
  border: 2.5px solid #eab308;
  box-shadow: 
    inset 0 1px 0 rgba(254, 240, 138, 0.95),
    inset 0 0 26px rgba(234, 179, 8, 0.45),
    0 6px 24px rgba(0, 0, 0, 0.75);
}
.draft-shop-card.tier-5:hover:not(.purchased) {
  border-color: #fef08a;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 10px 32px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(250, 204, 21, 1);
}

/* ====================================================
   🔥 ELEMENT-THEMED ATMOSPHERIC BACKGROUNDS
   ==================================================== */

.draft-card-elem-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

/* FIRE (Volcanic Magma & Inferno) */
.draft-shop-card.elem-fire {
  background: 
    radial-gradient(circle at 80% 25%, rgba(249, 115, 22, 0.45) 0%, rgba(220, 38, 38, 0.22) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(185, 28, 28, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #2e0c07 0%, #1a0503 60%, #0c0201 100%);
}
.draft-shop-card.elem-fire .elem-backdrop-fire {
  background: radial-gradient(circle at 85% 30%, rgba(254, 215, 170, 0.15) 0%, transparent 50%);
}
.draft-shop-card.elem-fire .draft-card-bar {
  background: linear-gradient(90deg, #991b1b 0%, #450a0a 100%);
  border-top: 1px solid rgba(248, 113, 113, 0.45);
}

/* NATURE (Enchanted Forest & Lush Canopy) */
.draft-shop-card.elem-nature {
  background: 
    radial-gradient(circle at 80% 25%, rgba(34, 197, 94, 0.42) 0%, rgba(16, 185, 129, 0.2) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(21, 128, 61, 0.3) 0%, transparent 60%),
    linear-gradient(160deg, #072a18 0%, #03170c 60%, #010c06 100%);
}
.draft-shop-card.elem-nature .elem-backdrop-nature {
  background: radial-gradient(circle at 85% 30%, rgba(187, 247, 208, 0.15) 0%, transparent 50%);
}
.draft-shop-card.elem-nature .draft-card-bar {
  background: linear-gradient(90deg, #15803d 0%, #052e16 100%);
  border-top: 1px solid rgba(74, 222, 128, 0.45);
}

/* WATER (Oceanic Tide & Deep Marine Reef) */
.draft-shop-card.elem-water {
  background: 
    radial-gradient(circle at 80% 25%, rgba(14, 165, 233, 0.45) 0%, rgba(2, 132, 199, 0.22) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(3, 105, 161, 0.32) 0%, transparent 60%),
    linear-gradient(160deg, #062338 0%, #031320 60%, #010a12 100%);
}
.draft-shop-card.elem-water .elem-backdrop-water {
  background: radial-gradient(circle at 85% 30%, rgba(186, 230, 253, 0.18) 0%, transparent 50%);
}
.draft-shop-card.elem-water .draft-card-bar {
  background: linear-gradient(90deg, #0284c7 0%, #082f49 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.45);
}

/* LIGHTNING / ELECTRIC (High Voltage Storm Tempest) */
.draft-shop-card.elem-lightning,
.draft-shop-card.elem-electric {
  background: 
    radial-gradient(circle at 80% 25%, rgba(250, 204, 21, 0.4) 0%, rgba(99, 102, 241, 0.28) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(67, 56, 202, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #1c1538 0%, #0e0a22 60%, #070414 100%);
}
.draft-shop-card.elem-lightning .elem-backdrop-lightning,
.draft-shop-card.elem-electric .elem-backdrop-electric {
  background: radial-gradient(circle at 85% 30%, rgba(254, 240, 138, 0.2) 0%, transparent 50%);
}
.draft-shop-card.elem-lightning .draft-card-bar,
.draft-shop-card.elem-electric .draft-card-bar {
  background: linear-gradient(90deg, #4f46e5 0%, #1e1b4b 100%);
  border-top: 1px solid rgba(165, 180, 252, 0.45);
}

/* EARTH (Tectonic Caverns & Geode Strata) */
.draft-shop-card.elem-earth {
  background: 
    radial-gradient(circle at 80% 25%, rgba(217, 119, 6, 0.42) 0%, rgba(180, 83, 9, 0.22) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(120, 53, 15, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #2c1a0e 0%, #180d06 60%, #0b0502 100%);
}
.draft-shop-card.elem-earth .elem-backdrop-earth {
  background: radial-gradient(circle at 85% 30%, rgba(254, 215, 170, 0.15) 0%, transparent 50%);
}
.draft-shop-card.elem-earth .draft-card-bar {
  background: linear-gradient(90deg, #854d0e 0%, #451a03 100%);
  border-top: 1px solid rgba(251, 191, 36, 0.45);
}

/* VOID (Cosmic Spatial Rift & Nebula Abyss) */
.draft-shop-card.elem-void {
  background: 
    radial-gradient(circle at 80% 25%, rgba(168, 85, 247, 0.45) 0%, rgba(192, 38, 211, 0.22) 45%, transparent 75%),
    radial-gradient(circle at 20% 80%, rgba(126, 34, 206, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #260935 0%, #13031e 60%, #08010d 100%);
}
.draft-shop-card.elem-void .elem-backdrop-void {
  background: radial-gradient(circle at 85% 30%, rgba(233, 213, 255, 0.18) 0%, transparent 50%);
}
.draft-shop-card.elem-void .draft-card-bar {
  background: linear-gradient(90deg, #7e22ce 0%, #3b0764 100%);
  border-top: 1px solid rgba(216, 180, 254, 0.45);
}

/* Card Artwork Background */
.draft-card-art-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 32px;
  left: 18%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.7) 25%, black 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.7) 25%, black 100%);
}

.draft-card-img {
  width: 100%;
  height: 122%;
  object-fit: contain;
  object-position: right bottom;
  transform: translateY(2px) scale(1.12);
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.55));
}

.draft-card-img.is-splash-art,
.draft-card-img.is-shop-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
}

.draft-card-mascot-fallback {
  font-size: 60px;
  padding-right: 14px;
}

/* Card Traits Stack on Left */
.draft-card-traits-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 10px;
  z-index: 3;
  max-width: 60%;
}

.draft-trait-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 18, 30, 0.84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  width: fit-content;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.draft-trait-icon {
  font-size: 12px;
}

.draft-trait-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 76px;
}

.draft-trait-badge.rarity-badge {
  font-weight: 900;
  text-transform: capitalize;
}

.draft-trait-badge.rarity-badge.tier-1 {
  background: rgba(148, 163, 184, 0.25);
  border-color: #94a3b8;
  color: #f1f5f9;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.35);
}

.draft-trait-badge.rarity-badge.tier-2 {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
  color: #86efac;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.draft-trait-badge.rarity-badge.tier-3 {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.draft-trait-badge.rarity-badge.tier-4 {
  background: rgba(217, 70, 239, 0.25);
  border-color: #d946ef;
  color: #f472b6;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.45);
}

.draft-trait-badge.rarity-badge.tier-5 {
  background: rgba(234, 179, 8, 0.28);
  border-color: #eab308;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.5);
}

.draft-trait-badge.champ-bonus {
  background: rgba(234, 179, 8, 0.28);
  border-color: #eab308;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.45);
}

/* Card Bottom Bar */
.draft-card-bar {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.45);
}

.draft-card-beast-name {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.draft-card-beast-cost {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 900;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.draft-mini-coin {
  font-size: 11px;
}

/* Champion Bonus Outline Glow */
.draft-shop-card.has-champ-bonus {
  box-shadow: 0 0 0 2px #facc15, 0 0 16px rgba(250, 204, 21, 0.45);
}

/* --- 2★ AND 3★ UPGRADE READY INDICATORS & GLOWS --- */
.draft-card-upgrade-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  animation: badgeGlowPulse 1.8s infinite alternate ease-in-out;
}

/* Sparkling light sweep across the badge */
.draft-card-upgrade-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -130%;
  width: 70%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  transform: rotate(25deg);
  animation: starBadgeSweep 2.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes starBadgeSweep {
  0% {
    left: -130%;
  }
  45%, 100% {
    left: 170%;
  }
}

.draft-card-upgrade-badge.upgrade-2star {
  background: linear-gradient(135deg, #ca8a04 0%, #facc15 50%, #eab308 100%);
  border: 1.5px solid #fef08a;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(250, 204, 21, 0.8);
}

.draft-card-upgrade-badge.upgrade-3star {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 45%, #9333ea 100%);
  border: 1.5px solid #fef08a;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(245, 158, 11, 0.95),
    0 0 8px rgba(255, 255, 255, 0.8);
}

.upgrade-badge-stars {
  font-size: 13px;
  line-height: 1;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  animation: starGlint 1.5s infinite alternate ease-in-out;
}

.upgrade-2star .upgrade-badge-stars {
  color: #1e1b4b;
  text-shadow: 0 0 4px #ffffff, 0 0 8px #fef08a;
}

.upgrade-3star .upgrade-badge-stars {
  color: #ffffff;
  text-shadow: 0 0 6px #ffffff, 0 0 12px #fde047, 0 0 18px #f59e0b;
}

@keyframes starGlint {
  0% {
    transform: scale(0.95);
    filter: brightness(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
  }
  100% {
    transform: scale(1.08);
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(255, 255, 255, 1));
  }
}

@keyframes badgeGlowPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  100% {
    transform: scale(1.06);
    filter: brightness(1.2);
  }
}

/* Card Upgrade Highlights */
.draft-shop-card.can-upgrade-2star {
  border-color: #facc15 !important;
  box-shadow: 0 0 0 2px #facc15, 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 16px rgba(250, 204, 21, 0.6) !important;
  animation: cardUpgradeGlow2Star 2s infinite alternate ease-in-out;
}

@keyframes cardUpgradeGlow2Star {
  0% {
    box-shadow: 0 0 0 2px #facc15, 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(250, 204, 21, 0.45);
  }
  100% {
    box-shadow: 0 0 0 2.5px #fde047, 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(250, 204, 21, 0.85);
  }
}

.draft-shop-card.can-upgrade-3star {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 2.5px #fbbf24, 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 22px rgba(245, 158, 11, 0.8) !important;
  animation: cardUpgradeGlow3Star 1.8s infinite alternate ease-in-out;
}

@keyframes cardUpgradeGlow3Star {
  0% {
    box-shadow: 0 0 0 2px #fbbf24, 0 0 14px rgba(245, 158, 11, 0.6);
  }
  100% {
    box-shadow: 0 0 0 3px #fef08a, 0 0 28px rgba(245, 158, 11, 1), 0 0 8px #fff;
  }
}

/* Full-Card Reflective Light Sweep for All Team-Owned and Upgrade-Ready Monster Cards */
.draft-shop-card.is-owned-in-team::after,
.draft-shop-card.can-upgrade-2star::after,
.draft-shop-card.can-upgrade-3star::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -160%;
  width: 90%;
  height: 240%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 20%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(250, 204, 21, 0.2) 75%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  z-index: 5;
  animation: cardUpgradeReflectiveSweep 3.8s infinite ease-in-out;
}

.draft-shop-card.can-upgrade-3star::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(254, 240, 138, 0.04) 20%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(245, 158, 11, 0.25) 80%,
    transparent 100%
  );
  animation: cardUpgradeReflectiveSweep 3.2s infinite ease-in-out;
}

@keyframes cardUpgradeReflectiveSweep {
  0% {
    left: -160%;
  }
  38%, 100% {
    left: 210%;
  }
}

/* ====================================================
   🐾 TEAM-OWNED BEAST HIGHLIGHT (Never miss a roll!)
   ==================================================== */

.draft-shop-card.is-owned-in-team:not(.can-upgrade-2star):not(.can-upgrade-3star) {
  border-color: #facc15 !important;
  box-shadow: 
    inset 0 0 16px rgba(234, 179, 8, 0.28),
    0 0 0 2px rgba(250, 204, 21, 0.9),
    0 6px 20px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(250, 204, 21, 0.55) !important;
  animation: cardOwnedPulseGlow 2.4s infinite alternate ease-in-out;
}

.draft-shop-card.is-owned-in-team:not(.can-upgrade-2star):not(.can-upgrade-3star):hover:not(.purchased) {
  border-color: #fde047 !important;
  box-shadow: 
    inset 0 0 20px rgba(250, 204, 21, 0.42),
    0 0 0 2.5px #fde047,
    0 10px 26px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(250, 204, 21, 0.85) !important;
}

.draft-shop-card.is-owned-in-team .draft-card-beast-name {
  color: #fffbeb;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.6), 0 1px 3px rgba(0, 0, 0, 0.95);
}

@keyframes cardOwnedPulseGlow {
  0% {
    border-color: #eab308 !important;
    box-shadow: 
      inset 0 0 12px rgba(234, 179, 8, 0.2),
      0 0 0 2px rgba(250, 204, 21, 0.75),
      0 6px 16px rgba(0, 0, 0, 0.6),
      0 0 12px rgba(250, 204, 21, 0.35);
  }
  100% {
    border-color: #fef08a !important;
    box-shadow: 
      inset 0 0 18px rgba(234, 179, 8, 0.38),
      0 0 0 2.5px rgba(254, 240, 138, 1),
      0 8px 24px rgba(0, 0, 0, 0.72),
      0 0 22px rgba(250, 204, 21, 0.8);
  }
}

.draft-card-owned-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.96) 0%, rgba(180, 83, 9, 0.96) 45%, rgba(202, 138, 4, 0.96) 100%);
  border: 1.5px solid #fef08a;
  border-radius: 12px;
  padding: 3px 8px;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 14px rgba(250, 204, 21, 0.65);
  animation: ownedBadgePulse 2s infinite alternate ease-in-out;
}

/* Light sweep glint on the owned badge */
.draft-card-owned-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -130%;
  width: 70%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  transform: rotate(25deg);
  animation: starBadgeSweep 2.4s infinite ease-in-out;
  pointer-events: none;
}

.draft-card-owned-badge .owned-tag-icon {
  font-size: 11px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.draft-card-owned-badge .owned-tag-label {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.6px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.draft-card-owned-badge .owned-tag-count,
.draft-card-owned-badge .owned-tag-text {
  font-family: var(--font-title);
  font-size: 10.5px;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

@keyframes ownedBadgePulse {
  0% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 4px rgba(250, 204, 21, 0.4));
  }
  100% {
    transform: scale(1.05);
    filter: brightness(1.22) drop-shadow(0 0 10px rgba(250, 204, 21, 0.9));
  }
}

/* Graphic Icon Artwork Styles */
.item-art-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.item-art-icon-lg {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.relic-art-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

/* ====================================================
   POST-BATTLE REWARDS SYSTEM (SEQUENTIAL ANIMATED REVEAL)
   ==================================================== */
.victory-modal-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(620px, calc(100vw - 28px));
  max-width: 620px;
  max-height: min(92vh, 780px);
  padding: 0 26px 26px;
  overflow-y: auto;
  text-align: left;
  border-color: #5b402f;
  background: linear-gradient(180deg, #fffdf5 0%, #fffaf0 48%, #f8f3e8 100%);
  box-shadow: 0 10px 0 #2f211b, 0 28px 54px rgba(0, 0, 0, 0.52);
}

.victory-hero {
  position: relative;
  isolation: isolate;
  margin: 0 -26px 14px;
  padding: 22px 26px 20px;
  overflow: hidden;
  text-align: center;
  border-radius: 14px 14px 22px 22px;
  border-bottom: 1px solid rgba(180, 83, 9, 0.2);
  background:
    radial-gradient(circle at 50% -25%, rgba(255, 247, 174, 0.96) 0%, rgba(255, 230, 143, 0.5) 35%, transparent 70%),
    linear-gradient(180deg, #fff9df 0%, #fffdf5 100%);
}

.victory-hero::before,
.victory-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -56px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(217, 119, 6, 0.13);
  transform: rotate(45deg);
}

.victory-hero::before { left: -88px; }
.victory-hero::after { right: -88px; }

.victory-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: #a16207;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.victory-eyebrow::before,
.victory-eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d6a13d);
}

.victory-eyebrow::after { transform: scaleX(-1); }

.victory-title-anim {
  font-size: 34px;
  font-weight: 900;
  color: #4b3024;
  margin: 0 0 6px !important;
  text-align: center;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
  animation: victoryTitleDrop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes victoryTitleDrop {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.victory-gold-section-anim {
  text-align: center;
  margin-bottom: 16px;
  animation: victoryGoldReveal 0.45s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes victoryGoldReveal {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.victory-gold-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16.5px;
  color: #57483f;
  font-weight: 700;
}

.victory-summary-coin {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 2px;
  filter: drop-shadow(0 2px 2px rgba(146, 64, 14, 0.3));
}

.victory-gold-highlight {
  color: #c66a06;
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-title);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  letter-spacing: 0.5px;
}

.victory-breakdown-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}

.victory-breakdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #66594f;
  background: rgba(255, 255, 255, 0.86);
  border: 1.5px solid #e6dac8;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(70, 48, 32, 0.06);
}

.victory-breakdown-chip strong {
  color: #b45309;
}

.victory-breakdown-chip.victory-xp-chip {
  background: rgba(224, 242, 254, 0.9);
  border-color: #7dd3fc;
  color: #0369a1;
}

.victory-breakdown-chip.victory-xp-chip strong {
  color: #0284c7;
}

.victory-rewards-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #6b625c;
  margin-bottom: 10px;
  animation: victoryLabelReveal 0.4s 0.35s ease both;
}

.victory-rewards-heading::after {
  content: '';
  height: 1.5px;
  flex: 1;
  background: linear-gradient(90deg, #d8ccbc, transparent);
}

.victory-reward-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: #6b4a36;
  border-radius: 999px;
  box-shadow: 0 2px 0 #3e2c22;
}

@keyframes victoryLabelReveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reward-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.reward-tier-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  animation: rewardCardPopIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reward-tier-card:hover {
  transform: translateY(-2px) scale(1.01);
}

@keyframes rewardCardPopIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }
  65% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card Media / Icon */
.reward-card-media {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(56, 42, 31, 0.12), inset 0 1px 0 #fff;
}

.reward-card-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transform: scale(1.15);
}

.reward-media-coin {
  filter: drop-shadow(0 3px 2px rgba(146, 64, 14, 0.32));
}

.reward-media-xp {
  filter: drop-shadow(0 3px 3px rgba(2, 132, 199, 0.28));
}

.reward-media-duplicator {
  filter: drop-shadow(0 3px 3px rgba(126, 34, 206, 0.34));
}

.reward-media-reroll {
  filter: drop-shadow(0 3px 3px rgba(22, 163, 74, 0.32));
}

.reward-media-duplicate {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  color: #7c3aed;
}

.reward-card-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
}

.reward-card-content {
  flex: 1;
  min-width: 0;
}

.reward-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.reward-card-title {
  font-family: var(--font-title);
  font-size: 17.5px;
  font-weight: 900;
  color: #2c2927;
  line-height: 1.25;
}

.reward-card-desc {
  font-size: 14.5px;
  font-weight: 600;
  color: #555e6d;
  line-height: 1.45;
}

.reward-badge-pill {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
}

.reward-tier-name {
  padding: 4px 10px;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Tier 1: NORMAL (Gold / XP) */
.reward-tier-card.tier-normal {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1.5px solid #cbd5e0;
  box-shadow: 0 3px 9px rgba(51, 65, 85, 0.08);
}
.reward-tier-card.reward-type-gold,
.reward-tier-card.reward-type-gold_jackpot {
  background: linear-gradient(135deg, #fffef9 0%, #fff8df 100%);
  border-color: #e8c56b;
}
.reward-tier-card.reward-type-xp {
  background: linear-gradient(135deg, #fbfdff 0%, #eff9ff 100%);
  border-color: #9fd7ef;
}
.reward-tier-card.tier-normal .reward-badge-pill {
  background: #edf2f7;
  color: #4a5568;
  border: 1px solid #cbd5e0;
}

/* Tier 2: UNCOMMON (1-2 Rerolls) */
.reward-tier-card.tier-common,
.reward-tier-card.tier-uncommon {
  background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
  border: 2.5px solid #38a169;
  box-shadow: 0 4px 12px rgba(56, 161, 105, 0.16);
}
.reward-tier-card.tier-common .reward-badge-pill,
.reward-tier-card.tier-uncommon .reward-badge-pill {
  background: #38a169;
  color: #ffffff;
}

/* Tier 3: RARE (Gold Jackpot / 1-2 Cost Duplicator) */
.reward-tier-card.tier-rare {
  background: linear-gradient(135deg, #ebf8ff 0%, #e1f0fa 100%);
  border: 2.5px solid #3182ce;
  box-shadow: 0 4px 16px rgba(49, 130, 206, 0.22);
}
.reward-tier-card.tier-rare .reward-badge-pill {
  background: #2b6cb0;
  color: #ffffff;
}

/* Tier 4: EPIC (5 Rerolls / 3-Cost Duplicator) */
.reward-tier-card.tier-epic {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 2.5px solid #805ad5;
  box-shadow: 0 4px 18px rgba(128, 90, 213, 0.3);
}
.reward-tier-card.tier-epic .reward-badge-pill {
  background: #805ad5;
  color: #ffffff;
}

/* Tier 5: LEGENDARY (10 Rerolls / 4-Cost Duplicator / Relic) */
.reward-tier-card.tier-legendary {
  background: linear-gradient(135deg, #fffdf0 0%, #fef3c7 40%, #fde68a 80%, #fef9c3 100%);
  border: 3px solid #f59e0b;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.9), 0 0 35px rgba(245, 158, 11, 0.75), 0 0 65px rgba(251, 191, 36, 0.45), inset 0 0 16px rgba(254, 240, 138, 0.85);
  transform: scale(1.03) translateY(-2px);
  z-index: 5;
  margin: 6px 0;
  animation: legendaryHaloPulse 2.2s infinite ease-in-out, rewardCardPopIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  position: relative;
}

.reward-tier-card.tier-legendary::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, rgba(245, 158, 11, 0.25) 45%, transparent 70%);
  z-index: -1;
  animation: legendaryHaloRing 2.2s infinite ease-in-out;
  pointer-events: none;
}

.reward-tier-card.tier-legendary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.7) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: legendaryShineSweep 3.5s infinite ease-in-out;
  pointer-events: none;
}

.reward-tier-card.tier-legendary .reward-badge-pill {
  background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

@keyframes legendaryHaloPulse {
  0% {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.8), 0 0 25px rgba(245, 158, 11, 0.65), 0 0 50px rgba(251, 191, 36, 0.35), inset 0 0 12px rgba(254, 240, 138, 0.7);
    transform: scale(1.025) translateY(-2px);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 1), 0 0 45px rgba(245, 158, 11, 0.9), 0 0 80px rgba(251, 191, 36, 0.6), inset 0 0 22px rgba(254, 240, 138, 0.95);
    transform: scale(1.045) translateY(-4px);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.8), 0 0 25px rgba(245, 158, 11, 0.65), 0 0 50px rgba(251, 191, 36, 0.35), inset 0 0 12px rgba(254, 240, 138, 0.7);
    transform: scale(1.025) translateY(-2px);
  }
}

@keyframes legendaryHaloRing {
  0% {
    opacity: 0.6;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 0.6;
    transform: scale(0.98);
  }
}

@keyframes legendaryShineSweep {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  25%, 100% {
    transform: translateX(100%) rotate(25deg);
  }
}

/* Tier 6: MYTHIC (5-Cost Universal Duplicator) */
.reward-tier-card.tier-mythic {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7e2 40%, #e9d8fd 70%, #feebc8 100%);
  background-size: 200% 200%;
  border: 3px solid #d53f8c;
  box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.9), 0 0 35px rgba(213, 63, 140, 0.75), 0 0 70px rgba(168, 85, 247, 0.5), inset 0 0 18px rgba(254, 215, 226, 0.85);
  transform: scale(1.035) translateY(-3px);
  z-index: 6;
  margin: 6px 0;
  animation: mythicPrism 4s linear infinite, mythicHaloPulse 2.2s infinite ease-in-out, rewardCardPopIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  position: relative;
}

.reward-tier-card.tier-mythic::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.5) 0%, rgba(168, 85, 247, 0.3) 50%, transparent 75%);
  z-index: -1;
  animation: legendaryHaloRing 2.2s infinite ease-in-out;
  pointer-events: none;
}

.reward-tier-card.tier-mythic::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.85) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: legendaryShineSweep 3s infinite ease-in-out;
  pointer-events: none;
}

.reward-tier-card.tier-mythic .reward-badge-pill {
  background: linear-gradient(90deg, #e53e3e, #d53f8c, #805ad5, #3182ce);
  background-size: 200% auto;
  animation: mythicGradient 2.5s linear infinite;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(213, 63, 140, 0.4);
}

@keyframes mythicHaloPulse {
  0% {
    box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.8), 0 0 25px rgba(213, 63, 140, 0.6), 0 0 50px rgba(168, 85, 247, 0.4), inset 0 0 14px rgba(254, 215, 226, 0.7);
    transform: scale(1.03) translateY(-2px);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 1), 0 0 50px rgba(213, 63, 140, 0.95), 0 0 90px rgba(168, 85, 247, 0.7), inset 0 0 24px rgba(254, 215, 226, 0.95);
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.8), 0 0 25px rgba(213, 63, 140, 0.6), 0 0 50px rgba(168, 85, 247, 0.4), inset 0 0 14px rgba(254, 215, 226, 0.7);
    transform: scale(1.03) translateY(-2px);
  }
}

@keyframes mythicPrism {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes mythicGradient {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Claim All Rewards Button */
.btn-claim-all-rewards {
  width: 100%;
  margin-top: 18px;
  min-height: 58px;
  padding: 14px 28px;
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #47bd78 0%, #2f9b62 100%);
  color: #ffffff;
  border: 2.5px solid #21734a;
  border-radius: 16px;
  box-shadow: 0 6px 0 #1c6741, 0 12px 24px rgba(37, 122, 77, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-claim-all-rewards:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  box-shadow: 0 8px 0 #1c6741, 0 15px 26px rgba(37, 122, 77, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-claim-all-rewards:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #1c6741, 0 5px 10px rgba(37, 122, 77, 0.24);
}

.btn-claim-all-rewards.is-disabled,
.btn-claim-all-rewards:disabled {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 0 #1e293b, 0 6px 14px rgba(0, 0, 0, 0.25) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(80%) !important;
  opacity: 0.65;
  transform: none !important;
}

.btn-claim-all-rewards.is-ready {
  animation: claimBtnUnlockPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes claimBtnUnlockPop {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

/* 3-Second Battle Start Countdown Overlay */
.battle-countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 125;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 72%);
  transition: opacity 0.25s ease;
}

.battle-countdown-overlay.hidden {
  display: none !important;
}

.battle-countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateY(-8px);
}

.battle-countdown-label {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fef08a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 14px rgba(234, 179, 8, 0.65);
  opacity: 0.95;
}

.battle-countdown-digit {
  font-family: var(--font-title);
  font-size: 92px;
  font-weight: 950;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 0 #78350f) drop-shadow(0 14px 26px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 35px rgba(245, 158, 11, 0.85));
  animation: countdownDigitPop 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.battle-countdown-digit.is-fight {
  font-size: 68px;
  letter-spacing: 2.5px;
  background: linear-gradient(180deg, #ffffff 0%, #fed7aa 35%, #ef4444 85%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 0 #450a0a) drop-shadow(0 14px 28px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.9));
  animation: countdownFightPop 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes countdownDigitPop {
  0% {
    opacity: 0;
    transform: scale(1.7) translateY(-10px);
  }
  35% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
  75% {
    opacity: 1;
    transform: scale(1.0);
  }
  100% {
    opacity: 0.85;
    transform: scale(0.96);
  }
}

@keyframes countdownFightPop {
  0% {
    opacity: 0;
    transform: scale(2.0) translateY(-15px);
  }
  40% {
    opacity: 1;
    transform: scale(1.1) translateY(0);
  }
  80% {
    opacity: 1;
    transform: scale(1.0);
  }
  100% {
    opacity: 0;
    transform: scale(1.2) translateY(-8px);
  }
}

@media (max-width: 560px) {
  .victory-modal-container {
    width: calc(100vw - 20px);
    padding: 0 14px 18px;
    border-width: 4px;
  }

  .victory-hero {
    margin-inline: -14px;
    padding: 16px 14px 15px;
  }

  .victory-title-anim { font-size: 28px; }
  .reward-card-title { font-size: 16px; }
  .reward-card-desc { font-size: 13.5px; }

  .reward-tier-card {
    gap: 12px;
    padding: 10px 12px;
  }

  .reward-card-media {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .reward-card-icon {
    width: 54px;
    height: 54px;
  }

  .reward-card-img {
    width: 54px;
    height: 54px;
    border-radius: 10px;
  }

  .reward-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .reward-badge-pill { align-self: flex-start; }
  .btn-claim-all-rewards { margin-top: 14px; font-size: 18px; min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .victory-modal-container *,
  .victory-modal-container *::before,
  .victory-modal-container *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}



/* Event / Mystery Outcome Modal */
.event-outcome-modal {
  animation: rewardPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.event-outcome-badge {
  display: inline-block;
  background: linear-gradient(135deg, #805ad5, #b794f4);
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 3px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(128, 90, 213, 0.4);
}

/* ====================================================
   ⚔️ PRE-BATTLE FLOATING NODE BRIEFING POPOVER
   ==================================================== */

.node-briefing-popover {
  position: absolute;
  width: 300px;
  max-width: 88vw;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(56, 189, 248, 0.3);
  color: #f1f5f9;
  z-index: 100;
  transform: translateY(-50%);
  animation: popoverFadeIn 0.2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
  pointer-events: all;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-50%) scale(0.92); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

.node-briefing-popover .node-briefing-header {
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.node-briefing-popover .briefing-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.node-briefing-popover .briefing-act-floor {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #94a3b8;
}

.node-briefing-popover .node-briefing-badge {
  font-family: var(--font-title);
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.node-briefing-popover .node-briefing-badge.threat-normal {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.node-briefing-popover .node-briefing-badge.threat-elite {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.5);
  animation: elitePulseGlow 1.8s infinite alternate;
}

.node-briefing-popover .node-briefing-badge.threat-boss {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.5);
  animation: bossPulseGlow 1.5s infinite alternate;
}

@keyframes elitePulseGlow {
  0% { box-shadow: 0 0 4px rgba(192, 132, 252, 0.4); }
  100% { box-shadow: 0 0 12px rgba(192, 132, 252, 0.8); }
}

@keyframes bossPulseGlow {
  0% { box-shadow: 0 0 6px rgba(248, 113, 113, 0.5); }
  100% { box-shadow: 0 0 16px rgba(248, 113, 113, 0.9); }
}

.node-briefing-popover .briefing-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.node-briefing-popover .node-briefing-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-briefing-popover .briefing-hostiles-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
}

.node-briefing-popover .briefing-hostile-count {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  color: #7dd3fc;
  letter-spacing: 0.4px;
}

.node-briefing-popover .briefing-mystery-grid {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}

.node-briefing-popover .briefing-mystery-monster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.node-briefing-popover .mystery-silhouette {
  width: 42px;
  height: 42px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.node-briefing-popover .mystery-label {
  font-size: 8.5px;
  color: #94a3b8;
  font-weight: 700;
}

/* BIGGER & RICHER REWARDS */
.node-briefing-popover .briefing-rewards-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.node-briefing-popover .rewards-preview-title {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.4px;
}

.node-briefing-popover .rewards-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.node-briefing-popover .reward-tag {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.node-briefing-popover .reward-tag.reward-tag-relic {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #f3e8ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.node-briefing-popover .node-briefing-actions {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.node-briefing-popover .btn-briefing-back {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.node-briefing-popover .btn-briefing-back:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.node-briefing-popover .btn-briefing-start {
  flex: 1;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 900;
  padding: 8px 14px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.15s ease;
}

.node-briefing-popover .btn-briefing-start:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ====================================================
   🌑 CLASSIC IRIS WIPE TRANSITION (Circle Close & Open)
   ==================================================== */

.battle-iris-transition {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 350vmax #020617;
  pointer-events: all;
  z-index: 999999;
  border: none;
  outline: none;
  will-change: width, height;
}

.battle-iris-transition.iris-closing,
.battle-iris-transition.exit-closing {
  animation: irisClose 0.85s cubic-bezier(0.38, 0, 0.2, 1) forwards;
}

.battle-iris-transition.iris-opening,
.battle-iris-transition.exit-opening {
  animation: irisOpen 0.90s cubic-bezier(0, 0, 0.25, 1) forwards;
}

@keyframes irisClose {
  0% {
    width: 280vmax;
    height: 280vmax;
  }
  100% {
    width: 0px;
    height: 0px;
  }
}

@keyframes irisOpen {
  0% {
    width: 0px;
    height: 0px;
  }
  100% {
    width: 280vmax;
    height: 280vmax;
  }
}

/* ====================================================
   📱 MOBILE & TABLET ARENA / SHOP / BENCH OVERHAUL
   ==================================================== */

@media (max-width: 960px) {
  .arena-stage-box {
    gap: 6px;
    padding: 2px;
  }

  /* Compact Sidebars on smaller laptops and tablets */
  .player-sidebar-panel,
  .enemy-sidebar-panel {
    width: 130px;
  }
  .player-champ-portrait {
    width: 50px;
    height: 50px;
  }
  .player-champ-name {
    font-size: 13px;
  }
  .mini-stat-row {
    font-size: 11px;
  }

  /* Shop cards horizontal scroll */
  .draft-cards-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .shop-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .draft-shop-card {
    min-width: 200px;
    flex: 0 0 200px;
  }
}

@media (max-width: 768px) {
  /* On Mobile Phones: Canvas Takes Full Width */
  .arena-main-row {
    flex-direction: column;
    gap: 6px;
  }

  /* Hide bulky desktop sidebar cards on mobile, keep arena focused */
  .player-sidebar-panel,
  .enemy-sidebar-panel {
    display: none;
  }

  .arena-container {
    width: 100%;
    min-height: 220px;
    border-radius: 14px;
    border-width: 2.5px;
  }

  /* Compact Bench & Item Bag Row */
  .bench-and-items-row {
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 4px;
  }

  .bench-slots {
    gap: 4px;
  }

  .bench-slot {
    width: clamp(38px, 9.5vw, 48px);
    height: clamp(38px, 9.5vw, 48px);
    border-radius: 10px;
    border-width: 2px;
  }

  .bench-slot .bench-slot-cost {
    font-size: 9px;
    padding: 1px 3px;
  }

  .board-item-bag-dock {
    padding: 4px 6px;
    border-radius: 10px;
  }

  .item-tray-badge {
    width: 36px;
    height: 36px;
  }

  /* Creature shop mobile overhaul */
  .draft-shop-panel {
    padding: 6px 8px;
    border-radius: 14px;
    border-width: 2.5px;
  }

  .draft-shop-top-bar {
    padding: 0 4px 4px 4px;
  }

  .draft-gold-tracker {
    width: 85px;
    padding: 2px 4px;
    gap: 3px;
  }

  .draft-gold-tracker .gold-tracker-label {
    display: none;
  }

  .draft-gold-tracker .gold-interest-pill {
    font-size: 8px;
    padding: 1px 3px;
  }

  .draft-odds-pills {
    gap: 3px;
  }

  .odds-pill {
    padding: 1px 4px;
    font-size: 10px;
  }

  .draft-shop-main {
    flex-direction: row;
    gap: 6px;
  }

  .draft-actions-col {
    width: 85px;
    flex-shrink: 0;
    gap: 4px;
  }

  .draft-action-btn {
    padding: 5px 6px;
    min-height: 44px;
    border-radius: 10px;
  }

  .draft-action-title {
    font-size: 11px;
  }

  .draft-action-cost {
    font-size: 11px;
  }

  .draft-cards-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .shop-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .draft-shop-card {
    min-width: 200px;
    max-width: 200px;
  }

  .shop-card-name {
    font-size: 12px;
  }

  .shop-card-art {
    height: 48px;
  }

  .shop-card-trait-badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  .shop-card-desc {
    font-size: 9.5px;
    line-height: 1.2;
  }

  /* Start Battle Floating Action Button */
  .btn-start-battle {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Node Briefing Popover on Mobile */
  .node-briefing-popover {
    width: 92vw;
    left: 4vw !important;
    transform: none !important;
    padding: 14px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .bench-slot {
    width: 36px;
    height: 36px;
  }
  .draft-actions-col {
    width: 72px;
  }
  .draft-action-title {
    font-size: 10px;
  }
  .draft-action-cost {
    font-size: 10px;
  }
}

/* --- LIVE COMBAT STATISTICS (TOP RIGHT) --- */
.combat-stats-dock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: auto;
}

.combat-stats-info-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(191, 219, 254, 0.75);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(30, 58, 92, 0.96), rgba(10, 24, 42, 0.98));
  color: #e0f2fe;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.combat-stats-info-btn:hover,
.combat-stats-info-btn[aria-expanded="true"] {
  transform: scale(1.08);
  border-color: #fef08a;
  background: linear-gradient(180deg, rgba(67, 90, 122, 0.98), rgba(15, 32, 54, 0.99));
}

.combat-stats-panel {
  width: min(370px, calc(100vw - 40px));
  max-height: min(68vh, 570px);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e5edf7;
  background: linear-gradient(180deg, rgba(12, 25, 42, 0.97), rgba(5, 14, 27, 0.985));
  border: 1.5px solid rgba(125, 160, 199, 0.72);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-origin: top right;
  animation: combatStatsOpen 0.16s ease-out both;
}

.combat-stats-panel.hidden { display: none !important; }

@keyframes combatStatsOpen {
  from { opacity: 0; transform: translateY(-5px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.combat-stats-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px 10px 6px;
}

.combat-stats-tab {
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 6px;
  padding: 6px 5px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.combat-stats-tab:hover { color: #e2e8f0; border-color: #64748b; }
.combat-stats-tab.active {
  color: #fef08a;
  border-color: rgba(250, 204, 21, 0.7);
  background: rgba(113, 63, 18, 0.45);
  box-shadow: inset 0 -2px 0 #eab308;
}

.combat-stats-legend {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  padding: 0 13px 5px;
  color: #94a3b8;
  font-size: 8.5px;
  font-weight: 800;
}

.combat-stats-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.combat-stats-legend-swatch { width: 7px; height: 7px; border-radius: 2px; }

.combat-stats-list {
  min-height: 84px;
  overflow-y: auto;
  padding: 0 9px 10px;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
}

.combat-stats-empty {
  padding: 24px 12px;
  text-align: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.combat-stat-row {
  display: grid;
  grid-template-columns: 20px 38px minmax(0, 1fr) auto;
  grid-template-areas: "rank art name total" "rank art bar bar";
  align-items: center;
  column-gap: 7px;
  row-gap: 5px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: opacity 0.18s ease, background 0.18s ease;
}

.combat-stat-row:first-child { background: linear-gradient(90deg, rgba(234, 179, 8, 0.10), transparent 75%); }
.combat-stat-row.is-dead { opacity: 0.62; }
.combat-stat-rank { grid-area: rank; color: #64748b; font-size: 11px; font-weight: 950; text-align: center; }
.combat-stat-row:first-child .combat-stat-rank { color: #facc15; }

.combat-stat-art {
  grid-area: art;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.86);
}

.combat-stat-name {
  grid-area: name;
  overflow: hidden;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-stat-total { grid-area: total; color: #f8fafc; font-size: 11px; font-weight: 950; text-align: right; }
.combat-stat-bar {
  grid-area: bar;
  height: 11px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.9), rgba(30, 41, 59, 0.95));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06);
}

.combat-stat-bar-fill {
  position: relative;
  height: 100%;
  display: flex;
  overflow: hidden;
  border-radius: inherit;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
  transition: width 0.18s linear;
}

.combat-stat-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.16) 36%, transparent 52%, rgba(0, 0, 0, 0.16) 100%);
  border-radius: inherit;
}

.combat-stat-bar-primary,
.combat-stat-bar-secondary,
.combat-stat-bar-tertiary {
  height: 100%;
  filter: saturate(1.14) brightness(1.05);
  transition: width 0.18s linear;
}

.arena-floating-hud { right: 58px; }

@media (max-width: 700px) {
  .combat-stats-dock { top: 7px; right: 7px; }
  .combat-stats-panel { width: min(330px, calc(100vw - 24px)); max-height: 62vh; }
  .combat-stat-row { grid-template-columns: 18px 32px minmax(0, 1fr) auto; }
  .combat-stat-art { width: 30px; height: 30px; }
}

/* Landscape Mobile Tweaks */
@media (max-height: 500px) and (orientation: landscape) {
  .arena-stage-box {
    gap: 4px;
  }
  .player-sidebar-panel,
  .enemy-sidebar-panel {
    display: none;
  }
  .arena-container {
    min-height: 140px;
  }
  .bench-slot {
    width: 34px;
    height: 34px;
  }
  .shop-card-art {
    height: 36px;
  }
  .draft-shop-panel {
    padding: 4px 6px;
  }
}

/* Keep mobile controls in separate rows and scroll cards at readable widths. */
@media (max-width: 768px), (max-width: 960px) and (max-height: 500px) {
  .minimal-battle-view {
    padding: 6px;
    overflow-y: auto;
    align-items: flex-start;
  }

  .arena-stage-box { min-height: 660px; }
  .arena-container { --arena-controls-height: 52; min-height: 340px; }

  .board-bench-overlay { bottom: 6px; padding: 0 4px; width: 100%; box-sizing: border-box; display: flex; justify-content: center; }
  .bench-slots-wrap { width: calc(100% - 8px); max-width: 440px; overflow: visible; padding: 3px 4px; box-sizing: border-box; }
  .bench-slots { display: grid !important; grid-template-columns: repeat(8, minmax(0, 1fr)) !important; width: 100% !important; gap: 3px !important; }
  .bench-slot { flex: none !important; width: 100% !important; max-width: 46px; aspect-ratio: 1 / 1 !important; height: auto !important; min-width: 0 !important; }

  .board-item-bag-dock {
    bottom: 82px;
    left: 6px;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    max-width: calc(100% - 132px);
    flex-direction: row;
    justify-content: flex-start;
    gap: 6px;
  }
  .item-bag-header { flex-shrink: 0; }
  .board-item-bag-dock .item-tray-empty-hint { display: none; }
  .board-item-bag-dock .item-tray-slots {
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
  }
  .board-item-bag-dock .item-tray-badge { flex-shrink: 0; }

  .drafting-panel.draft-shop-wrapper { padding: 6px; gap: 6px; }
  .draft-shop-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 4px;
  }
  .draft-gold-tracker { position: static; width: 100%; max-width: 130px; min-height: 36px; }
  .draft-header-controls { position: static; grid-column: 2; grid-row: 1; }
  .draft-btn-lock { min-height: 44px; }
  .draft-odds-bar { grid-column: 1 / -1; grid-row: 2; gap: 4px; }
  .draft-odds-dot { min-width: 0; flex: 1; padding: 3px; }
  .odds-title-label { margin-right: 0; font-size: 10px; }
  .draft-actions-col { width: 100%; flex-direction: row; gap: 6px; }
  .draft-cards-container { overflow: visible; padding: 0; }
  .shop-cards {
    overflow-x: auto;
    padding: 4px 2px 8px;
    box-sizing: border-box;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #c8aa6e #0d1a29;
  }
  .draft-shop-card { scroll-snap-align: start; }
  .draft-shop-card:hover:not(.purchased) { transform: none; }
  .draft-card-traits-col { max-width: 75%; padding: 8px; gap: 4px; }
  .draft-card-bar { padding: 0 8px; gap: 6px; min-height: 38px; height: auto; }
  .draft-card-beast-name { white-space: normal; font-size: 12px; line-height: 1.15; }
  .draft-card-beast-cost { flex-shrink: 0; }
}

/* --- TOP-RIGHT QUICK MENU (HIDDEN ON DESKTOP, ACTIVE ON MOBILE) --- */
.top-right-gear-menu {
  display: none !important;
}

.gear-menu-trigger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #c8aa6e;
  border-radius: 50%;
  background: linear-gradient(180deg, #1b3047 0%, #0d1e2e 100%);
  color: #fff3cf;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, background 0.2s;
}

.gear-menu-trigger:hover {
  transform: scale(1.08);
  border-color: #fde047;
}

.top-right-gear-menu.menu-open .gear-menu-trigger {
  border-color: #fde047;
  transform: rotate(60deg) scale(1.05);
}

.gear-menu-dropdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateY(-8px) scale(0.92);
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-right-gear-menu.menu-open .gear-menu-dropdown {
  max-height: 220px;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  transform: translateY(0) scale(1);
}

.gear-dropdown-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(191, 219, 254, 0.7);
  background: linear-gradient(180deg, rgba(27, 48, 71, 0.95), rgba(13, 30, 46, 0.98));
  color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.gear-dropdown-btn:hover {
  transform: scale(1.1);
  border-color: #fef08a;
}

.gear-dropdown-btn.combat-stats-info-btn {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
}

.gear-bag-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.gear-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #eab308;
  color: #1e1b18;
  font-family: var(--font-title, sans-serif);
  font-size: 10px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  min-width: 14px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.gear-settings-btn {
  font-size: 18px;
}

/* --- BOARD SYNERGIES (DESKTOP DEFAULT: FULL LIST VISIBLE, NO DROPDOWN) --- */
.board-synergies-tracker {
  position: absolute;
  top: 18px;
  left: 14px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  overflow: visible;
  padding: 4px 6px 4px 2px;
}

.synergy-roll-indicator {
  display: none !important;
}

.board-synergies-dropdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  transform: none;
}
