/* ============================================================
   CLASH — In-Game Shop, Items Inventory & Dialog Modals
   File: css/modals.css
   ============================================================ */

/* ── Forfeit Buttons in Modals ── */
.confirm-btn.ff-modal-btn {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(180, 83, 9, 0.35));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.confirm-btn.ff-modal-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  transform: translateY(-1.5px);
}

.confirm-btn.ff-modal-btn.locked {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
}

.confirm-btn.ff-danger-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.6);
}

.confirm-btn.ff-danger-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
  transform: translateY(-1.5px);
}

/* ── PvP Chat / Command Bar ── */
.pvp-chat-bar {
  position: fixed;
  bottom: 24px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.9) 0%, rgba(1, 4, 9, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 163, 224, 0.4);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 16px rgba(0, 163, 224, 0.2);
  z-index: 100;
  max-width: 300px;
  width: calc(100% - 40px);
  animation: slideInChat 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInChat {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pvp-chat-prompt {
  font-size: 14px;
  line-height: 1;
}

.pvp-chat-input {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}

.pvp-chat-input::placeholder {
  color: #64748b;
  font-weight: 500;
}


/* ── Items & Inventory Window Modal ──────────────────────────── */
.items-window-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 24px);
  opacity: 0;
  transition: opacity 0.22s var(--ease-out);
}

.items-window-overlay.active {
  opacity: 1;
}

.items-window-card {
  width: 100%;
  max-width: 1020px;
  max-height: 88vh;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.2) 0%, rgba(1, 4, 9, 0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 163, 224, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 163, 224, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: itemsCardPop 0.25s var(--ease-spring);
}

.items-window-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--blue-hex-subtle), transparent 60%);
  pointer-events: none;
}

@keyframes itemsCardPop {
  0% {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.items-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px 20px;
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.08) 0%, rgba(0, 90, 130, 0.04) 50%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.items-window-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.items-window-title-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(0, 163, 224, 0.2) 100%);
  border: 1px solid rgba(200, 155, 60, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  box-shadow: 0 4px 14px rgba(200, 155, 60, 0.15);
}

.items-window-title-icon-wrap svg {
  width: 20px;
  height: 20px;
  fill: #fbbf24;
}

.items-window-title {
  font-family: var(--font-display);
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(200, 155, 60, 0.35);
}

.items-window-subtitle {
  font-size: clamp(10.5px, 1.3vw, 12px);
  color: var(--text-secondary);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.items-window-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.items-window-key-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.items-window-key-hint kbd,
.items-footer-hint kbd {
  background: #141b24;
  border: 1px solid rgba(200, 155, 60, 0.35);
  color: var(--gold-light);
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.items-window-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.items-window-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
  transform: scale(1.05);
}

.items-window-body {
  padding: 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.items-window-body::-webkit-scrollbar {
  width: 6px;
}

.items-window-body::-webkit-scrollbar-thumb {
  background: rgba(200, 155, 60, 0.25);
  border-radius: 3px;
}

/* Team Sections */
.items-team-group {
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.items-team-group.ally-group {
  border-color: rgba(0, 163, 224, 0.22);
  background: linear-gradient(180deg, rgba(0, 90, 130, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.items-team-group.enemy-group {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(150, 20, 30, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.items-team-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.items-team-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.ally-group .items-team-label {
  color: #38bdf8;
}

.enemy-group .items-team-label {
  color: #f87171;
}

.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.ally-dot {
  background: #38bdf8;
  color: #38bdf8;
}

.enemy-dot {
  background: #f87171;
  color: #f87171;
}

.items-hero-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Individual Hero Row in Items Window */
.items-hero-row {
  display: grid;
  grid-template-columns: 215px 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm, 6px);
  padding: 8px 12px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.items-hero-row:hover {
  border-color: rgba(0, 163, 224, 0.4);
  background: rgba(0, 90, 130, 0.12);
  box-shadow: 0 6px 16px rgba(0, 163, 224, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.items-hero-row.is-local-player {
  border-color: rgba(200, 155, 60, 0.4);
  background: linear-gradient(90deg, rgba(200, 155, 60, 0.1) 0%, rgba(0, 0, 0, 0.35) 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(200, 155, 60, 0.08);
}

.items-hero-row.is-dead {
  opacity: 0.65;
  filter: grayscale(0.2);
}

/* Hero Identity Left Column */
.items-hero-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.items-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.items-hero-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #091428;
  box-shadow: 0 0 10px rgba(0, 163, 224, 0.3);
}

.enemy-group .items-hero-avatar {
  border-color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.items-hero-avatar.has-fb {
  border-color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
}

.items-hero-avatar svg {
  width: 20px;
  height: 20px;
}

.items-hero-lv-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: linear-gradient(135deg, #c89b3c, #785a28);
  color: #000;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #091428;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.items-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.items-hero-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.items-hero-name {
  font-weight: 800;
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.items-you-tag {
  background: var(--gold);
  color: #000;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.items-fb-tag {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  padding: 1.5px 3.5px;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.items-fb-tag svg {
  width: 9px;
  height: 9px;
  fill: #ffffff;
  display: block;
}

.items-hero-class-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.items-hero-hp-status {
  font-size: 10px;
  font-weight: 600;
  color: #10b981;
}

.items-hero-hp-status.dead-text {
  color: #f87171;
}

/* Center Column: Items Grid */
.items-hero-inventory {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.item-slot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.18s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.item-slot.empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.item-slot.empty::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.item-slot.filled {
  border-color: rgba(200, 155, 60, 0.35);
  background: linear-gradient(135deg, rgba(20, 35, 50, 0.9) 0%, rgba(5, 12, 18, 0.95) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.item-slot.filled.type-boots {
  border-color: rgba(234, 179, 8, 0.4);
}

.item-slot.filled.type-sword {
  border-color: rgba(239, 68, 68, 0.4);
}


.item-slot.filled.type-armor {
  border-color: rgba(16, 185, 129, 0.4);
}

.item-slot.filled.type-gloves {
  border-color: rgba(56, 189, 248, 0.4);
}

.item-slot.filled.type-arcane_wand {
  border-color: rgba(56, 189, 248, 0.5);
}

.item-slot.filled.type-bloodthirster {
  border-color: rgba(225, 29, 72, 0.5);
}

.item-slot.filled.type-cursed_sword {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.item-slot.filled.type-deathcrown {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}

.item-slot.filled.type-light_fruit {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.item-slot.filled.type-windrunner_boots {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.item-slot.filled.type-iron_barrier {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.item-slot.filled.type-invisibility_cloak {
  border-color: rgba(192, 132, 252, 0.5);
}

.item-slot-num {
  font-family: var(--font-display, inherit);
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  user-select: none;
}

.item-slot.filled.type-boots .item-slot-num {
  color: #fde047;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.item-slot.filled.type-sword .item-slot-num {
  color: #fca5a5;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}


.item-slot.filled.type-armor .item-slot-num {
  color: #6ee7b7;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.item-slot.filled.type-gloves .item-slot-num {
  color: #7dd3fc;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.item-slot.filled.type-arcane_wand .item-slot-num {
  color: #7dd3fc;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.item-slot.filled.type-bloodthirster .item-slot-num {
  color: #fb7185;
  text-shadow: 0 0 8px rgba(225, 29, 72, 0.6);
}

.item-slot.filled.type-cursed_sword .item-slot-num {
  color: #d8b4fe;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.item-slot.filled.type-deathcrown .item-slot-num {
  color: #e9d5ff;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.item-slot.filled.type-light_fruit .item-slot-num {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.item-slot.filled.type-windrunner_boots .item-slot-num {
  color: #a7f3d0;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.item-slot.filled.type-iron_barrier .item-slot-num {
  color: #fde047;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.item-slot.filled.type-invisibility_cloak .item-slot-num {
  color: #f0abfc;
  text-shadow: 0 0 8px rgba(232, 121, 249, 0.6);
}

.item-slot svg {
  width: 19px;
  height: 19px;
}

/* Potion Buff Pills */
.items-potion-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.potion-pill {
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  box-sizing: border-box;
}

.potion-pill.potion-red {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.potion-pill.potion-blue {
  border-color: rgba(59, 130, 246, 0.55);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
}

.potion-pill.potion-black {
  border-color: rgba(161, 161, 170, 0.55);
  color: #e4e4e7;
  background: rgba(161, 161, 170, 0.1);
}

.potion-type-label {
  font-family: var(--font-display, inherit);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
}

.potion-pill svg {
  width: 9px;
  height: 9px;
}

.potion-count-badge {
  background: var(--gold);
  color: #000;
  font-size: 7.5px;
  font-weight: 900;
  border-radius: 6px;
  padding: 0 3px;
  line-height: 10px;
  height: 10px;
}

/* Right Column: Hero Stats & Gold */
.items-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: flex-end;
  min-width: max-content;
}

.items-stat-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.stat-pill span {
  color: var(--text-primary);
  font-weight: 800;
}

.stat-pill.stat-pill-deaths {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.stat-pill.stat-pill-deaths span {
  color: #fca5a5;
}

.stat-pill.stat-pill-ad-buff {
  border-color: rgba(0, 163, 224, 0.6);
  background: radial-gradient(circle at center, rgba(0, 163, 224, 0.22) 0%, rgba(2, 16, 36, 0.85) 100%);
  box-shadow: 0 0 8px rgba(0, 163, 224, 0.35), inset 0 0 4px rgba(0, 210, 255, 0.2);
  color: #38bdf8;
}

.stat-pill.stat-pill-ad-buff span {
  color: #67e8f9;
  text-shadow: 0 0 6px rgba(0, 210, 255, 0.7);
}

.stat-pill.stat-pill-as-buff {
  border-color: rgba(239, 68, 68, 0.6);
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.22) 0%, rgba(36, 6, 10, 0.85) 100%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.35), inset 0 0 4px rgba(255, 59, 48, 0.2);
  color: #f87171;
}

.stat-pill.stat-pill-as-buff span {
  color: #fca5a5;
  text-shadow: 0 0 6px rgba(255, 59, 48, 0.7);
}

/* Items Window Footer */
.items-window-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Responsive adjustments for items window */
@media (max-width: 768px) {
  .items-hero-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .items-hero-stats {
    align-items: flex-start;
  }

  .items-stat-pills {
    justify-content: flex-start;
  }
}


/* ── Confirmation Modal ──────────────────────────────────── */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  padding: 16px;
}

.confirm-modal.active {
  display: flex;
  opacity: 1;
}

.confirm-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.2) 0%, rgba(1, 4, 9, 0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 163, 224, 0.22);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 32px);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 30px rgba(0, 163, 224, 0.12);
  transform: scale(0.9);
  transition: transform 0.25s var(--ease-spring);
}

.confirm-modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--blue-hex-subtle), transparent 60%);
  pointer-events: none;
}

.confirm-modal.active .confirm-modal-content {
  transform: scale(1);
}

.confirm-modal-content h2 {
  font-family: var(--font-display);
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  font-size: clamp(18px, 4vw, 24px);
  margin-bottom: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.confirm-modal-content p {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: clamp(12px, 2vw, 14px);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-btn {
  font-family: var(--font-display);
  font-size: clamp(11px, 2vw, 13px);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  min-width: 120px;
  min-height: 44px;
}

.confirm-btn.yes-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.confirm-btn.yes-btn:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.confirm-btn.no-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.confirm-btn.no-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-light);
  transform: translateY(-1.5px);
}


/* ── Shop UI ─────────────────────────────────────────────── */
#shop {
  position: fixed;
  left: 50%;
  top: clamp(8px, 1.8vh, 18px);
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.2) 0%, rgba(1, 4, 9, 0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 163, 224, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px 10px 14px;
  z-index: 20;
  display: none;
  width: min(92%, 390px);
  max-height: min(72vh, 490px);
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 155, 60, 0.35) transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 163, 224, 0.12);
}

#shop::-webkit-scrollbar {
  width: 5px;
}

#shop::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

#shop::-webkit-scrollbar-thumb {
  background: rgba(200, 155, 60, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#shop::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 155, 60, 0.65);
}

#shop::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--blue-hex-subtle), transparent 60%);
  pointer-events: none;
}

#shop h2 {
  font-family: var(--font-display);
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  margin-bottom: 6px;
  font-size: clamp(14px, 2.2vw, 17px);
  text-align: center;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#shopList,
#activeShopList {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
  padding: 0;
}

.si {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  min-height: 36px;
}

.si:hover {
  border-color: rgba(0, 163, 224, 0.4);
  background: rgba(0, 90, 130, 0.12);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0, 163, 224, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.si.owned {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: none;
}

.si-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.si-num {
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: clamp(11.5px, 1.6vw, 13px);
  color: var(--text-primary, #ffffff);
  min-width: 14px;
  line-height: 1.25;
}

.si .in {
  color: var(--text-primary);
  font-weight: 700;
  font-size: clamp(11.5px, 1.6vw, 13px);
  margin-bottom: 1px;
  letter-spacing: 0.5px;
}

.si .is {
  color: #2dd4bf;
  font-size: clamp(8.5px, 1.2vw, 9.5px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.si .ic {
  color: var(--gold-light);
  font-weight: 900;
  font-size: clamp(11.5px, 1.6vw, 13px);
  font-family: var(--font-display);
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

/* ── Potions Design ──────────────────────────────────────── */
.shop-section-title {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 8px 0 4px 2px;
  border-bottom: 1.2px solid rgba(218, 165, 32, 0.15);
  padding-bottom: 2px;
}

.potions-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 7px;
  margin-top: 4px;
  margin-bottom: 8px;
  padding: 0;
  width: 100%;
}

.potion-card {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  padding: 7px 7px 6px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 44px;
  box-sizing: border-box;
}

.potion-card:hover {
  border-color: rgba(0, 163, 224, 0.5);
  background: rgba(0, 90, 130, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 163, 224, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.potion-card.type-potion_red:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.potion-card.type-potion_blue:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.potion-card.type-potion_black:hover {
  border-color: rgba(161, 161, 170, 0.6);
  box-shadow: 0 0 12px rgba(161, 161, 170, 0.3);
}

.potion-card .p-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 1px;
}

.potion-card .p-name {
  color: var(--text-primary);
  font-weight: 800;
  font-size: clamp(10px, 1.3vw, 11.5px);
  line-height: 1.1;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding-right: 24px;
  white-space: nowrap;
}

.potion-card .p-active-badge {
  background: var(--gold);
  color: #000;
  font-size: 8.5px;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 11px;
  height: 11px;
  display: inline-block;
}

.potion-card .p-desc {
  color: var(--text-muted);
  font-size: clamp(7.5px, 1.0vw, 8.5px);
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.potion-card .p-price {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: clamp(8px, 1.1vw, 9px);
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.3px;
}

.shop-exit-text {
  color: var(--text-muted);
  font-size: clamp(9.5px, 1.5vw, 11px);
  margin-top: 8px;
  text-align: center;
  width: 100%;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.shop-kbd {
  background: #181a1d;
  border: 1px solid var(--gold-border);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--gold-light);
  font-weight: 800;
  font-family: monospace;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.4);
  display: inline-block;
  margin: 0 4px;
}


/* Shop Category Filter Tabs */
.shop-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 6px 0 10px 0;
  padding: 0 4px;
  flex-wrap: wrap;
}

.shop-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-family: var(--font-display, sans-serif);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shop-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.shop-tab.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

/* Shop item card icon */
.si-item-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.si.cat-magic .in {
  color: #7dd3fc;
}

.si.cat-attack .in {
  color: #fca5a5;
}

.si.cat-active .in {
  color: #e879f9;
}

/* ============================================================
   COMPETITIVE LEADERBOARD & RANKED DIVISION SYSTEM STYLES
   ============================================================ */

/* ── Top-Left Rankings Trigger Button ────────────────────── */
.leaderboard-top-btn {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.95) 0%, rgba(3, 6, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-secondary, #94a3b8);
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.leaderboard-top-btn:hover {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(180, 130, 40, 0.35) 100%);
  color: #fbbf24;
  border-color: rgba(200, 155, 60, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 155, 60, 0.25);
}

.leaderboard-top-btn:active {
  transform: translateY(0);
}

.leaderboard-btn-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  filter: drop-shadow(0 0 4px rgba(200, 155, 60, 0.35));
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-top-btn:hover .leaderboard-btn-icon {
  fill: #fbbf24;
  transform: none;
}

.leaderboard-btn-text {
  line-height: 1;
}

/* In-game offset when exit button is visible on the left */
body:not(:has(#overlay:not(.hidden))) .leaderboard-top-btn {
  top: 12px;
  left: 60px;
}

/* Competitive indicator styling for Ranked In-Game HUD */
.leaderboard-top-btn.in-game-ranked {
  background: linear-gradient(180deg, rgba(28, 20, 8, 0.95) 0%, rgba(16, 11, 4, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 0 12px;
  gap: 6px;
}

.leaderboard-top-btn.in-game-ranked:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.4) 100%);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.leaderboard-top-btn.in-game-ranked .leaderboard-btn-text {
  font-weight: 800;
  letter-spacing: 1px;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.leaderboard-top-btn.in-game-ranked::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  margin-left: 2px;
  animation: pulse-ranked-dot 2s infinite ease-in-out;
}

@keyframes pulse-ranked-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Fullscreen Modal Overlay ────────────────────────────── */
.leaderboard-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  padding: clamp(12px, 2.5vw, 24px);
  animation: lbFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ── Modal Dialog Window ─────────────────────────────────── */
.leaderboard-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1080px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.2) 0%, rgba(1, 4, 9, 0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 163, 224, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(0, 163, 224, 0.12);
  overflow: hidden;
  animation: lbSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Radial top glow & decorative Hextech top border */
.leaderboard-modal-dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(0, 163, 224, 0.12), transparent 60%);
  pointer-events: none;
}

.leaderboard-modal-dialog::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #00a3e0 25%, #c89b3c 50%, #00a3e0 75%, transparent 100%);
  pointer-events: none;
}

/* ── Modal Header ────────────────────────────────────────── */
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 14px 24px;
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.08) 0%, rgba(0, 90, 130, 0.04) 50%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.lb-header-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-trophy-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 6px);
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.2) 0%, rgba(200, 155, 60, 0.06) 100%);
  border: 1px solid rgba(200, 155, 60, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(200, 155, 60, 0.2);
}

.lb-trophy-svg {
  width: 24px;
  height: 24px;
  fill: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.lb-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 20px;
  font-weight: 800;
  color: #f0e6d2;
  letter-spacing: 1.5px;
  background: linear-gradient(180deg, #ffffff 0%, #f0e6d2 60%, #c89b3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.lb-subtitle {
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 600;
  color: #00a3e0;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.lb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-refresh-btn,
.lb-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lb-refresh-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.lb-refresh-btn:hover {
  background: rgba(0, 163, 224, 0.2);
  border-color: #00a3e0;
  color: #38bdf8;
  transform: rotate(45deg);
}

.lb-close-btn {
  font-size: 16px;
  font-weight: bold;
}

.lb-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
  transform: scale(1.05);
}

/* ── Sticky Personal User Standing Card ──────────────────── */
.lb-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(0, 163, 224, 0.08) 0%, rgba(200, 155, 60, 0.04) 50%, rgba(2, 10, 22, 0.25) 100%);
  border-bottom: 1px solid rgba(0, 163, 224, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  gap: 20px;
}

.user-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.user-avatar-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #c89b3c;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.user-avatar-wrap:hover {
  transform: scale(1.06);
}

.user-avatar-bg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-icon {
  width: 24px;
  height: 24px;
}

.user-tier-pin {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: #091428;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}

.user-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-name {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  transition: color 0.15s ease;
}

.user-name:hover {
  color: #38bdf8;
}

.user-name-edit-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.user-name-edit-btn:hover {
  color: #38bdf8;
}

.user-tag-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.user-rank-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #c89b3c;
  letter-spacing: 0.5px;
}

.user-stat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.user-streak-fire {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.user-streak-cold {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.user-tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.user-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.user-lp-value {
  color: #f0e6d2;
}

.user-lp-value strong {
  font-size: 14px;
  color: #ffffff;
}

.user-next-tier-hint {
  font-size: 11px;
  color: #94a3b8;
}

.user-progress-bar-track {
  width: 100%;
  max-width: 360px;
  height: 5px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}

.user-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.user-card-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: 6px;
}

.user-stat-val {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.user-stat-val--winrate {
  color: #10b981;
}

.user-stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.user-stat-sub {
  font-size: 10px;
  color: #64748b;
}

/* ── Toolbar (Tabs & Search) ─────────────────────────────── */
.lb-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 16px;
  flex-wrap: wrap;
}

.lb-tab-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.16s ease;
}

.lb-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.lb-tab-btn.active {
  background: rgba(0, 163, 224, 0.2);
  border-color: #00a3e0;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(0, 163, 224, 0.25);
}

.lb-tab-focus {
  border-color: rgba(200, 155, 60, 0.4);
  color: #fbbf24;
}

.lb-tab-focus:hover {
  background: rgba(200, 155, 60, 0.18);
  border-color: #c89b3c;
  color: #fef08a;
}

.lb-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 12px;
  width: 240px;
  transition: all 0.2s ease;
}

.lb-search-box:focus-within {
  border-color: #00a3e0;
  box-shadow: 0 0 10px rgba(0, 163, 224, 0.25);
  width: 270px;
}

.lb-search-svg {
  width: 15px;
  height: 15px;
  fill: #64748b;
  flex-shrink: 0;
}

.lb-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 12px;
  width: 100%;
}

.lb-search-input::placeholder {
  color: #64748b;
}

/* ── Rankings Table ──────────────────────────────────────── */
.lb-table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  max-height: 52vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 155, 60, 0.4) rgba(0, 0, 0, 0.3);
}

.lb-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.lb-table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.lb-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(200, 155, 60, 0.35);
  border-radius: 4px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.lb-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(2, 8, 16, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lb-table th {
  padding: 10px 18px;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #c89b3c;
  border-bottom: 1px solid rgba(200, 155, 60, 0.2);
  white-space: nowrap;
}

.col-rank {
  width: 75px;
  text-align: center;
}

.col-player {
  width: 260px;
}

.col-tier {
  width: 210px;
}

.col-winrate {
  width: 190px;
}

.col-hero {
  width: 180px;
}

.lb-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lb-table tbody tr:hover {
  background: rgba(0, 163, 224, 0.06);
}

/* User Row Styling */
.lb-row--user {
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.14) 0%, rgba(200, 155, 60, 0.08) 100%) !important;
  border-left: 3px solid #00a3e0;
}

.lb-row--user:hover {
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.22) 0%, rgba(200, 155, 60, 0.12) 100%) !important;
}

.lb-row--pulse {
  animation: userRowPulse 1.8s ease;
}

@keyframes userRowPulse {
  0% {
    box-shadow: inset 0 0 0 2px #00a3e0, 0 0 20px rgba(0, 163, 224, 0.6);
  }
  50% {
    box-shadow: inset 0 0 0 2px #fbbf24, 0 0 30px rgba(251, 191, 36, 0.6);
  }
  100% {
    box-shadow: none;
  }
}

.lb-table td {
  padding: 12px 18px;
  vertical-align: middle;
}

/* ── Podium Medals ───────────────────────────────────────── */
.rank-pos-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 12px;
  font-weight: 800;
  width: 36px;
  height: 28px;
  border-radius: 4px;
  line-height: 1;
}

.rank-pos-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.medal-crown {
  font-size: 12px;
  margin-right: 2px;
}

.rank-pos-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25) 0%, rgba(148, 163, 184, 0.08) 100%);
  border: 1px solid #cbd5e1;
  color: #f1f5f9;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.3);
}

.rank-pos-bronze {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid #d97706;
  color: #fed7aa;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
}

.rank-pos-num {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
}

/* ── Player Cell ─────────────────────────────────────────── */
.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #00a3e0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-mini-icon {
  width: 17px;
  height: 17px;
}

.player-names-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player-main-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-name-text {
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.you-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: #00a3e0;
  color: #02070d;
  letter-spacing: 0.5px;
}

.player-tag-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

/* ── Tier Cell ───────────────────────────────────────────── */
.tier-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tier-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  width: fit-content;
  letter-spacing: 0.4px;
}

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

.tier-lp-num {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

.lp-diff-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
}

.lp-diff-pos {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.lp-diff-neg {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ── Win Rate Cell ───────────────────────────────────────── */
.winrate-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 130px;
}

.winrate-num-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
}

.winrate-record-sub {
  font-size: 10px;
  color: #64748b;
}

.winrate-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
}

.winrate-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* ── Hero Cell ───────────────────────────────────────────── */
.hero-fav-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-fav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.hero-fav-name {
  font-size: 12px;
  font-weight: 700;
}

/* ── KDA & MVP Cell ──────────────────────────────────────── */
.kda-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kda-kills {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.kda-mvp-pill {
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  width: fit-content;
}

/* Empty State */
.lb-no-results {
  text-align: center;
  padding: 40px 20px;
}

.lb-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

.lb-empty-icon {
  font-size: 32px;
}

.lb-clear-search-btn {
  background: rgba(0, 163, 224, 0.2);
  border: 1px solid #00a3e0;
  color: #38bdf8;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Footer ──────────────────────────────────────────────── */
.lb-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 24px;
  background: #030a12;
  border-top: 1px solid rgba(240, 230, 210, 0.08);
  font-size: 11px;
  color: #94a3b8;
  gap: 16px;
  flex-wrap: wrap;
}

.lb-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-season-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.lb-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-reset-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.lb-reset-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* ── Summoner Dossier Drawer ─────────────────────────────── */
.lb-dossier-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: linear-gradient(135deg, rgba(2, 10, 22, 0.45) 0%, rgba(1, 4, 9, 0.7) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1.5px solid rgba(0, 163, 224, 0.22);
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.85);
  z-index: 20;
  animation: dossierSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes dossierSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.dossier-header {
  position: relative;
  padding: 22px 20px 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dossier-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dossier-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

.dossier-hero-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.4);
  background: rgba(0, 0, 0, 0.3);
}

.dossier-avatar-bg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dossier-hero-svg {
  width: 26px;
  height: 26px;
}

.dossier-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.dossier-name-row h3 {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 16px;
  color: #f1f5f9;
  font-weight: 700;
}

.dossier-tag {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

.dossier-tier-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dossier-tier-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.dossier-lp-val {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.dossier-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dossier-h2h-box {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.dossier-h2h-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #94a3b8;
  display: block;
  margin-bottom: 2px;
}

.dossier-h2h-detail {
  font-size: 12px;
  font-weight: 700;
}

.dossier-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dossier-stat-tile {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.dossier-stat-num {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 16px;
  font-weight: 800;
  color: #f1f5f9;
}

.dossier-stat-desc {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 0.4px;
}

.dossier-sec-title {
  font-size: 10px;
  font-weight: 800;
  color: #c89b3c;
  letter-spacing: 0.8px;
  display: block;
  margin-bottom: 6px;
}

.dossier-hero-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 6px;
}

.dossier-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dossier-hero-info {
  display: flex;
  flex-direction: column;
}

.dossier-hero-info strong {
  font-size: 13px;
  color: #f1f5f9;
}

.dossier-hero-role {
  font-size: 10px;
  color: #94a3b8;
}

.dossier-form-row {
  display: flex;
  gap: 6px;
}

.form-chip {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
}

.form-chip--w {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.form-chip--l {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
}

/* ── Post-Match Overlay Competitive Badge & Button ───────── */
.ov-lp-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px auto 14px auto;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(12, 28, 44, 0.9) 0%, rgba(6, 16, 28, 0.95) 100%);
  border: 1px solid rgba(200, 155, 60, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(200, 155, 60, 0.15);
  max-width: 520px;
  width: 100%;
  animation: lpBannerGlow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lpBannerGlow {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ov-lp-badge-icon {
  font-size: 18px;
}

.ov-lp-change-text {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 15px;
  font-weight: 800;
}

.ov-lp-change-text.win {
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.ov-lp-change-text.loss {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.ov-lp-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.ov-lp-standing {
  font-size: 12px;
  font-weight: 700;
  color: #f0e6d2;
}

.ov-lp-rank-pos {
  color: #fbbf24;
}

.o-leaderboard-btn {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.25) 0%, rgba(0, 163, 224, 0.25) 100%);
  border: 1px solid rgba(200, 155, 60, 0.6);
  color: #fbbf24;
  padding: 10px 24px;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(200, 155, 60, 0.2);
  transition: all 0.2s ease;
  margin-top: 10px;
}

.o-leaderboard-btn:hover {
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.4) 0%, rgba(0, 163, 224, 0.4) 100%);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.75), 0 0 20px rgba(200, 155, 60, 0.4);
  transform: translateY(-1.5px);
}

/* ── Responsive Mobile Optimizations ─────────────────────── */
@media (max-width: 768px) {
  .leaderboard-top-btn {
    left: 12px;
    height: 34px;
    padding: 0 10px;
    font-size: 10px;
  }
  .leaderboard-top-btn .leaderboard-btn-text {
    display: none;
  }
  .lb-header {
    padding: 14px 16px;
  }
  .lb-title {
    font-size: 16px;
  }
  .lb-user-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 12px;
  }
  .user-card-right {
    width: 100%;
    justify-content: space-between;
  }
  .user-stat-box {
    min-width: auto;
    flex: 1;
  }
  .lb-toolbar {
    padding: 10px 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .lb-search-box {
    width: 100% !important;
  }
  .lb-tab-group {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
  }
  .lb-tab-btn {
    white-space: nowrap;
  }
  .col-hero {
    display: none;
  }
}

