/* =====================================================================
   PokéChamp — Team Builder & Synergy Matrix Styles
   ===================================================================== */

/* Hero & Presets Section */
.tb-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-card);
}

.tb-hero-left {
  max-width: 650px;
}

.tb-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.tb-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tb-presets-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-card);
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.2rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.preset-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-clear-team {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.25);
  color: #fda4af;
}

.btn-clear-team:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--accent-rose);
  color: #fff;
}

/* 16-Char Hash Bar Card */
.hash-bar-card {
  background: linear-gradient(135deg, rgba(18, 24, 38, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hash-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hash-tag-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  letter-spacing: 0.08em;
}

.hash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.hash-display-wrap {
  display: flex;
  align-items: center;
}

.hash-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #38bdf8;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  letter-spacing: 0.1em;
  user-select: all;
}

.hash-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-hash-action {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-hash-action:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn-primary-action {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.btn-primary-action:hover {
  background: #4f46e5;
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.6);
}

.btn-battle-action {
  background: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);
  border-color: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.4);
  text-decoration: none;
}

.btn-battle-action:hover {
  background: linear-gradient(135deg, #e11d48 0%, #d97706 100%);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.65);
  transform: translateY(-2px);
}

/* Team Summary Stats Ribbon */
.team-summary-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.summary-stat-box {
  background: rgba(18, 24, 38, 0.65);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.summary-stat-box:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
}

/* 6-Slot Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty Slot Card */
.slot-empty-card {
  min-height: 340px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 2rem 1.5rem;
  text-align: center;
}

.slot-empty-card:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.slot-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #a5b4fc;
  transition: transform 0.2s ease;
}

.slot-empty-card:hover .slot-empty-icon {
  transform: scale(1.1) rotate(90deg);
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.slot-empty-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.slot-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.slot-empty-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Filled Slot Card (Pikalytics Style) */
.slot-filled-card {
  min-height: 320px;
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.slot-filled-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* Card Main 2-Column Body */
.slot-card-body,
.slot-card-body-2col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0.85rem;
}

/* Pokemon Element Badges in Top Right of Box */
.slot-card-types-top {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
}

.slot-card-types-top .type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.16rem 0.5rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.slot-card-types-top .type-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

/* Left Column: Poke Info & Moves */
.slot-left-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 0.75rem;
}

.slot-header-block {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.2rem 0.35rem 0.2rem 0.1rem;
  transition: background 0.15s ease;
}

.slot-header-block:hover {
  background: rgba(255, 255, 255, 0.04);
}

.slot-header-block:hover .slot-card-name {
  color: #38bdf8;
}

.slot-header-block:hover .slot-poke-sprite {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.slot-poke-sprite {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.slot-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.slot-card-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1.3;
}

.slot-meta-chip:hover {
  color: #38bdf8;
}

.slot-item-icon-mini {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  vertical-align: middle;
}

.remove-chip-icon {
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.remove-chip-icon:hover {
  color: #f43f5e;
}

.slot-nature-select-wrap {
  margin-top: 0.15rem;
}

.slot-nature-select {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease;
  width: 100%;
}

.slot-nature-select:focus {
  border-color: var(--primary);
}

/* 4 Moves List */
.slot-moves-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slot-move-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.5rem;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-move-row:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
}

.slot-move-row.empty {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-dim);
  justify-content: center;
  font-weight: 600;
}

.slot-move-row.empty:hover {
  border-color: var(--primary);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.08);
}

.slot-move-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  color: #fff;
  min-width: 48px;
  text-align: center;
}

.slot-move-name {
  color: #f1f5f9;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.slot-move-remove-btn {
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s ease;
}

.slot-move-remove-btn:hover {
  color: #f43f5e;
}

/* Right Column: Stats List */
.slot-right-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1.85rem;
  padding-bottom: 0.25rem;
  gap: 0.42rem;
}

.slot-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.slot-stat-name {
  width: 32px;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.03em;
}

.slot-stat-sp-box {
  width: 42px;
  padding: 0.15rem 0.3rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.slot-stat-final {
  width: 38px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Card Bottom Footer */
.slot-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-spread {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.btn-spread:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.btn-remove-poke {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.btn-remove-poke:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
  border-color: var(--accent-rose);
}

/* =====================================================================
   Right Slide-Out Drawer (Moves, Items, Abilities, Spreads)
   ===================================================================== */
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1400;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.drawer-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.drawer-poke-sprite {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
}

.drawer-poke-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-card);
  background: rgba(15, 23, 42, 0.4);
  padding: 0 0.75rem;
  overflow-x: auto;
}

.drawer-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.drawer-tab-btn:hover {
  color: #fff;
}

.drawer-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-search-wrap {
  margin-bottom: 0.5rem;
}

.drawer-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}

.drawer-search-input:focus {
  border-color: var(--primary);
}

.drawer-list-item {
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.drawer-list-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(28, 36, 56, 0.8);
}

.drawer-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.drawer-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-item-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  vertical-align: middle;
}

.drawer-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.drawer-item-usage {
  font-size: 0.75rem;
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.drawer-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-drawer-action {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-drawer-action.add {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-drawer-action.add:hover {
  background: #38bdf8;
  color: #0f172a;
}

.btn-drawer-action.remove {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
}

.btn-drawer-action.remove:hover {
  background: #f43f5e;
  color: #fff;
}

.btn-drawer-action.equipped {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  cursor: default;
}

/* =====================================================================
   Customize Spread Modal (Screenshot 3 Style)
   ===================================================================== */
.spread-modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.spread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spread-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.spread-poke-sprite {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}

.spread-poke-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.btn-spread-done {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.4rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 0 14px var(--primary-glow);
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-spread-done:hover {
  background: #4f46e5;
}

.spread-nature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-card);
}

.spread-sp-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  gap: 1rem;
}

.spread-sliders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spread-slider-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

.spread-stat-label {
  width: 36px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.spread-range-input {
  flex: 1;
  accent-color: #38bdf8;
  cursor: pointer;
  height: 6px;
}

.spread-sp-val-box {
  width: 42px;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spread-final-val {
  width: 42px;
  text-align: right;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Synergy & Analytics Container */
.analytics-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(12px);
}

.analytics-tabs {
  display: flex;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.analytics-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.analytics-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.analytics-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pane-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.pane-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Tera Toggle */
.tera-toggle-wrap {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toggle-label input {
  display: none;
}

.toggle-slider {
  width: 38px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-label input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-label input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

/* Vulnerability Alerts */
.vulnerability-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.vulnerability-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.vulnerability-card.danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.vulnerability-card.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.vulnerability-card.good {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

/* Type Matrix Grid */
.type-matrix-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .type-matrix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .type-matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.type-matrix-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.type-matrix-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}

.type-matrix-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-net-score {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
}

.matrix-net-score.positive {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.matrix-net-score.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.matrix-net-score.negative {
  background: rgba(244, 63, 94, 0.2);
  color: #f87171;
}

.matrix-counts-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
}

.count-weak {
  color: #f87171;
}

.count-resist {
  color: #34d399;
}

.count-immune {
  color: #c084fc;
}

/* Offensive Grid */
.coverage-score-pill {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
}

.offensive-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .offensive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .offensive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.offensive-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.offensive-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
}

.offensive-card.covered {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}

.offensive-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offensive-status-badge.covered {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.offensive-status-badge.missing {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.offensive-dealers {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  width: 100%;
  display: block;
}

/* Speed Ladder */
.speed-ladder-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.speed-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-card);
}

.speed-row.team-member {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.speed-name {
  width: 210px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.team-badge-pill {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.speed-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.speed-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #64748b;
  transition: width 0.4s ease;
}

.speed-row.team-member .speed-bar-fill {
  background: linear-gradient(90deg, #6366f1, #38bdf8);
}

.speed-val {
  width: 45px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: #38bdf8;
}

/* QUICK ADD Meta Suggestions (Screenshot Style) */
.quick-add-section {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quick-add-header {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.quick-add-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-add-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.quick-add-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.quick-add-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  min-width: 215px;
  flex: 0 1 auto;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-add-card:hover {
  background: rgba(28, 36, 56, 0.9);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.quick-add-sprite {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.quick-add-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.quick-add-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.quick-add-types {
  display: flex;
  gap: 0.25rem;
}

.quick-add-type-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.42rem;
  border-radius: 4px;
  color: #fff;
  cursor: help;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.quick-add-type-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.btn-quick-add {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.32rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-quick-add:hover {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.btn-quick-add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Teammates Recommendations */
.teammates-recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.teammate-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  transition: all 0.2s ease;
}

.teammate-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
}

.teammate-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.teammate-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.teammate-sprite {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.teammate-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.teammate-synergy {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  font-weight: 700;
}

.teammate-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.teammate-reason-item {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.35;
}

.btn-add-teammate {
  width: 100%;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #fff;
  padding: 0.45rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-add-teammate:hover {
  background: var(--primary);
}

/* Picker Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open,
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  animation: fadeIn 0.2s ease forwards;
}

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

.picker-modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.picker-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.picker-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.picker-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
}

.picker-filters {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.5);
}

.picker-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Mode tabs (Type / Move) */
.picker-mode-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  gap: 2px;
}

.picker-mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.picker-mode-tab:hover {
  color: #fff;
}

.picker-mode-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.tier-pill-group {
  display: flex;
  gap: 0.35rem;
}

.picker-tier-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.picker-tier-btn:hover {
  color: #fff;
}

.picker-tier-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Sort pills */
.picker-sort-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.picker-sort-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-right: 0.2rem;
}

.picker-sort-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.picker-sort-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.picker-sort-pill.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Type Pills Subpanel */
.picker-type-subpanel {
  width: 100%;
}

.picker-type-pills,
.picker-resistance-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 120px;
  overflow-y: auto;
  padding: 2px 0;
}

.type-pill-btn,
.res-pill-btn {
  background: var(--pill-color, rgba(255, 255, 255, 0.08));
  border: 1.5px solid transparent;
  color: #ffffff;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  transition: all 0.15s ease;
  user-select: none;
  opacity: 0.92;
}

.type-pill-btn[data-type="ALL"],
.res-pill-btn[data-res="ALL"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  text-shadow: none;
}

.type-pill-btn:hover,
.res-pill-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.type-pill-btn[data-type="ALL"]:hover,
.res-pill-btn[data-res="ALL"]:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.type-pill-btn.active,
.res-pill-btn.active {
  opacity: 1;
  border-color: #ffffff;
  box-shadow: 0 0 14px var(--pill-color, #00a2ff), 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.type-pill-btn[data-type="ALL"].active,
.res-pill-btn[data-res="ALL"].active {
  background: #00a2ff;
  border-color: #00a2ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 162, 255, 0.5);
}

/* Dim unselected pills when one or more types/resistances are selected */
.picker-type-pills.has-selection .type-pill-btn:not(.active):not([data-type="ALL"]),
.picker-resistance-pills.has-selection .res-pill-btn:not(.active):not([data-res="ALL"]) {
  opacity: 0.38;
  filter: grayscale(0.25) brightness(0.75);
}

.picker-type-pills.has-selection .type-pill-btn:not(.active):not([data-type="ALL"]):hover,
.picker-resistance-pills.has-selection .res-pill-btn:not(.active):not([data-res="ALL"]):hover {
  opacity: 0.95;
  filter: none;
}

/* Resistance Subpanel Details */
.picker-resistance-subpanel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.picker-res-hint-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 0.1rem;
}

.picker-res-hint-text strong {
  color: #38bdf8;
}

.picker-res-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.picker-res-badge.immune {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

/* Move Subpanel */
.picker-move-subpanel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.picker-move-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.picker-move-search-wrap .search-icon {
  position: absolute;
  left: 1rem;
  font-size: 0.9rem;
  pointer-events: none;
}

.picker-move-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  padding: 0.55rem 2.4rem 0.55rem 2.6rem;
  color: #fff;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s;
}

.picker-move-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.picker-move-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
}

.picker-move-clear-btn:hover {
  color: #fff;
}

.picker-move-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #0f172a;
  border: 1px solid var(--border-card);
  border-radius: 9px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.picker-move-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.picker-move-item:last-child {
  border-bottom: none;
}

.picker-move-item:hover {
  background: rgba(99, 102, 241, 0.2);
}

.picker-move-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}

.picker-move-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.picker-move-type {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
}

.picker-active-move-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  font-size: 0.8rem;
  color: #c7d2fe;
}

.picker-active-move-banner strong {
  color: #fff;
}

.picker-active-move-remove {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.picker-active-move-remove:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Pool Notice */
.picker-pool-notice {
  font-size: 0.76rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

/* List / Grid */
.picker-grid {
  padding: 1rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: calc(85vh - 270px);
}

.picker-poke-card {
  position: relative;
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.picker-poke-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

/* Left side: sprite + info */
.picker-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.picker-poke-sprite {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.picker-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.picker-card-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.picker-poke-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
}

.picker-poke-rank {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.picker-card-types {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

/* Top-right corner Tier Tag */
.picker-card-tier {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Right side: USE % and WR % Metrics */
.picker-card-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 2.8rem;
  flex-shrink: 0;
  text-align: right;
}

.picker-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.picker-metric .metric-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.picker-metric .metric-value {
  font-size: 0.96rem;
  font-weight: 800;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
}

/* Dialog Modals (Import / Showdown) */
.dialog-modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.showdown-box {
  max-width: 650px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.dialog-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dialog-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  outline: none;
  letter-spacing: 0.08em;
}

.dialog-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.showdown-textarea {
  width: 100%;
  height: 220px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-card);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  padding: 0.75rem;
  border-radius: 8px;
  outline: none;
  resize: vertical;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-confirm {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 0 14px var(--primary-glow);
  font-family: inherit;
}

.btn-confirm:hover {
  background: #4f46e5;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 18px var(--primary-glow);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =====================================================================
   PokéChamp Team Builder Specialized Custom Tooltips
   ===================================================================== */
.tb-custom-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none !important;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(13, 19, 33, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px var(--tb-tip-glow, rgba(99, 102, 241, 0.25));
  padding: 0.85rem 1rem;
  max-width: 440px;
  min-width: 280px;
  width: max-content;
  color: #f1f5f9;
  font-family: inherit;
}

.tb-custom-tooltip.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: none !important;
}

/* Tooltip Header */
.tb-tip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.6rem;
  margin-bottom: 0.65rem;
}

.tb-tip-title-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.tb-tip-poke-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.tb-tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.tb-tip-title-col {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.tb-tip-main-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-tip-sub-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tb-tip-summary-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tb-tip-stat-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.tb-tip-stat-pill.pill-weak {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
}

.tb-tip-stat-pill.pill-res {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.tb-tip-stat-pill.pill-imm {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
}

.tb-tip-stat-pill.pill-adv {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

/* Tooltip Sections */
.tb-tip-sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tb-tip-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tb-tip-sec-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
}

.tb-tip-sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
}

.tb-tip-sec-tag.weak { color: #fb7185; }
.tb-tip-sec-tag.resist { color: #34d399; }
.tb-tip-sec-tag.immune { color: #c084fc; }
.tb-tip-sec-tag.advantage { color: #38bdf8; }
.tb-tip-sec-tag.disadvantage { color: #fb923c; }

.tb-tip-sec-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Item breakdown row in defensive matrix tooltip */
.tb-poke-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.tb-poke-breakdown-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tb-poke-row-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.tb-poke-mini-sprite {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.tb-poke-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-poke-type-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.tb-poke-type-badges .type-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.05rem 0.32rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.tb-mult-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.tb-mult-pill.mult-4x {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.tb-mult-pill.mult-2x {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
}

.tb-mult-pill.mult-half {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.tb-mult-pill.mult-quarter {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.tb-mult-pill.mult-0x {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.tb-tip-empty-state {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-style: italic;
  padding: 0.15rem 0.25rem;
}

/* Offensive STAB Dealer List Rows */
.tb-dealer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.tb-dealer-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tb-dealer-move-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #e2e8f0;
  font-weight: 600;
}

.tb-dealer-move-tag .type-badge {
  font-size: 0.6rem;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
}

/* Attacks carried pill bar */
.tb-carried-attacks-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tb-carried-move-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.7rem;
}
