/* Minimalistic dark mode styles for the tier test website */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #111;
  border-bottom: 1px solid #222;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  background: #222;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: #e0e0e0;
}

.brandText {
  display: flex;
  flex-direction: column;
}

.brandName {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
}

.brandSub {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
}

.topActions {
  display: flex;
  gap: 8px;
}

.pill {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Press Start 2P', monospace;
}

.pill:hover {
  background: #333;
  color: #fff;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.modeBar {
  display: flex;
  gap: 1px;
  background: #2a2a2a;
  padding: 1px;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.modeTab {
  padding: 8px 16px 8px 32px;
  background: #1a1a1a;
  color: #888;
  border: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: font-size 0.2s ease, background-size 0.2s ease, color 0.2s ease;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  background-position: 8px center;
  background-clip: padding-box;
  background-origin: padding-box;
  position: relative;
}

.modeTab:hover {
  font-size: 16px;
  background-size: 24px 24px;
  color: #e0e0e0;
  background-position: 8px center;
}

.modeTab.active {
  font-size: 16px;
  background-size: 24px 24px;
  color: #fff;
  background-color: #333;
  background-position: 8px center;
}

/* Mode tab icons */
.modeTab[data-mode="overall"] { background-image: url('./imgs/gamemodes/overall.png'); }
.modeTab[data-mode="spear"] { background-image: url('./imgs/gamemodes/spear.png'); }
.modeTab[data-mode="nethpot"] { background-image: url('./imgs/gamemodes/nethpot.png'); }
.modeTab[data-mode="vanilla"] { background-image: url('./imgs/gamemodes/vanilla.png'); }
.modeTab[data-mode="uhc"] { background-image: url('./imgs/gamemodes/uhc.png'); }
.modeTab[data-mode="sword"] { background-image: url('./imgs/gamemodes/sword.png'); }
.modeTab[data-mode="axe"] { background-image: url('./imgs/gamemodes/axe.png'); }
.modeTab[data-mode="mace"] { background-image: url('./imgs/gamemodes/mace.png'); }

.panel {
  background: #0f0f0f;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.panelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #2a2a2a;
  background: #1a1a1a;
}

.panelTitle {
  font-size: 18px;
  font-weight: 600;
  color: #e0e0e0;
  display: none;
}

.panelSub {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  display: none;
}

.actions {
  display: flex;
  gap: 8px;
}

.panelBody {
  min-height: 400px;
}

.table {
  width: 100%;
}

.row {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #2a2a2a;
  transition: all 0.2s ease;
  background: #0f0f0f;
  min-height: 50px;
}

.row:hover {
  background: #1a1a1a;
  transform: translateX(2px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.row.head {
  background: #1a1a1a;
  font-weight: 600;
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
}

.overallRow {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.overallRow:hover {
  background: #151515;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.overallRow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #444;
  transition: all 0.2s ease;
}

.overallRow:hover::before {
  background: #666;
}

.placeCell {
  width: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 16px;
}

.placeBadge {
  background: #333;
  color: #e0e0e0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.overallRow:nth-child(1) .placeBadge {
  background: #FFD700;
  color: #000;
}

.overallRow:nth-child(2) .placeBadge {
  background: #C0C0C0;
  color: #000;
}

.overallRow:nth-child(3) .placeBadge {
  background: #CD7F32;
  color: #000;
}

.overallRow:nth-child(1) .playerName,
.overallRow:nth-child(1) .playerMeta {
  font-weight: 700;
  color: #FFD700;
}

.overallRow:nth-child(2) .playerName,
.overallRow:nth-child(2) .playerMeta {
  font-weight: 600;
  color: #C0C0C0;
}

.overallRow:nth-child(3) .playerName,
.overallRow:nth-child(3) .playerMeta {
  font-weight: 600;
  color: #CD7F32;
}

.playerCell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #222;
  overflow: hidden;
}

.avatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playerText {
  flex: 1;
}

.playerName {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
}

.playerMeta {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 40px; /* Use line-height for vertical centering */
}

.right {
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modesMini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 3px 6px 3px 24px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: 4px center;
  background-clip: padding-box;
  background-origin: padding-box;
  text-align: left;
}

.tierBadge {
  background: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #3a3a3a;
}

.tier-none {
  opacity: 0.4;
}

.regionSection {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #333;
}

.regionBadge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
  display: inline-block;
}

.region-NA { background: #4A90E2; color: white; }
.region-EU { background: #2ECC71; color: white; }
.region-AS { background: #F39C12; color: white; }
.region-SA { background: #E74C3C; color: white; }
.region-AU { background: #9B59B6; color: white; }

.tier-HT1 { background: #FFD700; color: #000; }
.tier-LT1 { background: #FFA500; color: #000; }
.tier-HT2 { background: #FF6B6B; color: #000; }
.tier-LT2 { background: #4ECDC4; color: #000; }
.tier-HT3 { background: #45B7D1; color: #000; }
.tier-LT3 { background: #96CEB4; color: #000; }
.tier-HT4 { background: #9B59B6; color: #000; }
.tier-LT4 { background: #BDC3C7; color: #000; }
.tier-HT5 { background: #E74C3C; color: #000; }
.tier-LT5 { background: #95A5A6; color: #000; }

.empty {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 12px;
}

/* Mode-specific tier colors */
.modeIcon[data-mode="spear"] { background: #FF6B6B; }
.modeIcon[data-mode="nethpot"] { background: #FFA500; }
.modeIcon[data-mode="vanilla"] { background: #4ECDC4; }
.modeIcon[data-mode="uhc"] { background: #45B7D1; }
.modeIcon[data-mode="sword"] { background: #9B59B6; }
.modeIcon[data-mode="axe"] { background: #E74C3C; }
.modeIcon[data-mode="mace"] { background: #95A5A6; }

/* Tiers board */
.tiersBoard {
  padding: 20px;
}

.tiersColumns {
  display: flex;
  gap: 16px;
}

.tierCol {
  flex: 1;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}

.tierHead {
  background: #1a1a1a;
  padding: 12px;
  border-bottom: 1px solid #222;
}

.tierName {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
}

.tierDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
}

.tierList {
  padding: 12px;
}

.tierList .badge {
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tierList .badge:hover {
  transform: translateX(4px);
}

.miniRow {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #222;
  transition: background 0.2s;
}

.miniRow:hover {
  background: #151515;
}

.miniRow.clickable {
  cursor: pointer;
}

.miniLeft {
  width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.miniName {
  font-size: 12px;
  color: #e0e0e0;
}

.miniTier {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
}

/* Profile modal */
.profileOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.profileOverlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.profileOverlay.hidden {
  display: none;
}

.profileBackdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.profileDialog {
  background: #111;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  z-index: 1001;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.profileOverlay:not(.hidden) .profileDialog {
  transform: scale(1) translateY(0);
}

.profileClose {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #333;
  color: #e0e0e0;
  border: none;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  transition: all 0.2s ease;
}

.profileClose:hover {
  background: #555;
  color: #fff;
  transform: scale(1.1);
}

.profileHeader {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profileAvatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #222;
}

.profileName {
  font-size: 18px;
  font-weight: 600;
  color: #e0e0e0;
}

.profileRank {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.rankIcon {
  width: 40px;
  height: 40px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.rankIcon.newbie { background-image: url('./imgs/ranks/newbie.png'); }
.rankIcon.novice { background-image: url('./imgs/ranks/novice.png'); }
.rankIcon.experienced { background-image: url('./imgs/ranks/experienced.png'); }
.rankIcon.specialist { background-image: url('./imgs/ranks/specialist.png'); }
.rankIcon.expert { background-image: url('./imgs/ranks/expert.png'); }
.rankIcon.master { background-image: url('./imgs/ranks/master.png'); }
.rankIcon.grandmaster { background-image: url('./imgs/ranks/grandmaster.png'); }

/* Mode icons with colors and external images - IMPORTANT: These must override any previous styles */
.modeIcon {
  background-size: 16px 16px !important;
  background-repeat: no-repeat !important;
  background-position: 4px center !important;
  min-width: auto;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 8px;
}

.modeIcon[data-mode="spear"] { background-color: #FF6B6B !important; background-image: url('./imgs/gamemodes/spear.png') !important; }
.modeIcon[data-mode="nethpot"] { background-color: #FFA500 !important; background-image: url('./imgs/gamemodes/nethpot.png') !important; }
.modeIcon[data-mode="vanilla"] { background-color: #4ECDC4 !important; background-image: url('./imgs/gamemodes/vanilla.png') !important; }
.modeIcon[data-mode="uhc"] { background-color: #45B7D1 !important; background-image: url('./imgs/gamemodes/uhc.png') !important; }
.modeIcon[data-mode="sword"] { background-color: #9B59B6 !important; background-image: url('./imgs/gamemodes/sword.png') !important; }
.modeIcon[data-mode="axe"] { background-color: #E74C3C !important; background-image: url('./imgs/gamemodes/axe.png') !important; }
.modeIcon[data-mode="mace"] { background-color: #95A5A6 !important; background-image: url('./imgs/gamemodes/mace.png') !important; }
.modeIcon[data-mode="overall"] { background-color: #4A90E2 !important; background-image: url('./imgs/gamemodes/overall.png') !important; } 
.profilePoints {
  font-size: 14px;
  color: #e0e0e0;
  margin-top: 4px;
}

.profilePlace {
  font-size: 16px;
  font-weight: 600;
  color: #e0e0e0;
}

.profileModes {
  margin-top: 20px;
}

.profileRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.pointsSection {
  margin-bottom: 24px;
}

.pointsSection h3 {
  color: #e0e0e0;
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 600;
}

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

.pointsItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #1a1a1a;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
}

.tierName {
  font-weight: 600;
  color: #e0e0e0;
}

.tierPoints {
  color: #888;
  font-size: 14px;
}

.pointsSection p {
  color: #888;
  line-height: 1.5;
  font-size: 14px;
}

/* Legend */
.legendGrid {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: #111;
  border-radius: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.chip {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
}

.chip b {
  color: #e0e0e0;
}

.chip span {
  color: #888;
  margin-left: 4px;
}

/* Search */
.searchWrap {
  position: relative;
}

.search {
  background: #1a1a1a !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 300px;
}

.search:focus {
  outline: none;
  border-color: #555 !important;
  box-shadow: 0 0 0 4px rgba(85, 85, 85, 0.12);
}

.searchHint {
  position: absolute;
  top: 100%;
  left: 0;
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}

.highlight {
  background: #333;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .shell {
    padding: 0 12px;
  }
  
  .modeBar {
    flex-wrap: wrap;
  }
  
  .modeTab {
    flex: 1;
    min-width: 80px;
    text-align: center;
  }
  
  .panelHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .row {
    padding: 12px;
  }
  
  .right {
    width: 180px;
  }
  
  .tiersColumns {
    flex-direction: column;
  }
}
