:root {
  --bg-main: #101014;
  --bg-card: #16161c;
  --bg-card-alt: #1b1b23;
  --bg-card-hover: #24242e;
  --bg-pill: #23232d;
  --bg-pill-hover: #2e2e3b;
  --border-main: #272731;
  --border-active: #3c3c4a;
  --border-card: rgba(255, 255, 255, 0.07);
  --color-primary: #e11d48;
  --color-primary-gold: #facc15;
  --color-accent: #3b82f6;
  --text-main: #f5f7fa;
  --text-muted: #a6adb8;
  --text-dim: #707783;

  /* Tier colors */
  --t1-color: #fbbf24;
  --t2-color: #38bdf8;
  --t3-color: #f97316;
  --t4-color: #818cf8;
  --t5-color: #a6adb8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03), transparent 55%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0b0f;
}
::-webkit-scrollbar-thumb {
  background: #272731;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3c3c4a;
}

/* App Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem 1.25rem;
}

/* Navbar */
.navbar {
  height: 72px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}
.nav-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-link img, .nav-link svg {
  height: 22px;
  width: 22px;
  object-fit: contain;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.06);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 14px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 0.6rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  z-index: 100;
}
.dropdown-menu.show {
  display: flex;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s;
}
.dropdown-item:hover {
  background: var(--bg-pill);
  color: #fff;
}

/* Search bar */
.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-main);
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  gap: 0.6rem;
  width: 260px;
  position: relative;
  transition: border-color 0.2s, width 0.2s;
}
.nav-search:focus-within {
  border-color: var(--color-primary);
  width: 310px;
  background: rgba(0, 0, 0, 0.4);
}
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  width: 100%;
}
.nav-search input::placeholder {
  color: var(--text-dim);
}
.search-kbd {
  background: var(--bg-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 14px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  z-index: 100;
  padding: 0.6rem;
}
.search-results.active {
  display: flex;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-item:hover {
  background: var(--bg-pill);
}
.search-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}
.search-item-info {
  flex: 1;
}
.search-item-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.search-item-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Main Rankings Card */
.rankings-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 20px;
  border-top-left-radius: 0;
  padding: 1.75rem 2rem 2.5rem 2rem;
  margin-top: 5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Gamemode Tabs Bar */
.gamemode-tabs {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 0px;
}
.gamemode-tab {
  width: 114px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 2px solid var(--border-main);
  border-bottom: none;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}
.gamemode-tab img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.15s, transform 0.15s;
}
.gamemode-tab:hover {
  background: rgba(225, 29, 72, 0.08);
  color: var(--text-main);
}
.gamemode-tab:hover img {
  opacity: 1;
  transform: scale(1.1);
}
.gamemode-tab.active {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--border-main);
}
.gamemode-tab.active img {
  opacity: 1;
}
.gamemode-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #fff;
  z-index: 10;
}

/* Subheader Controls */
.rankings-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-main);
}

.subheader-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-info, .btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-pill);
  color: var(--text-main);
  border: 1px solid var(--border-main);
  border-radius: 10px;
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-info:hover, .btn-refresh:hover {
  background: var(--bg-pill-hover);
  border-color: var(--border-active);
}

/* Server IP Box */
.server-ip-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.server-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}
.server-details {
  display: flex;
  flex-direction: column;
}
.server-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.server-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.server-ip-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-pill);
  border: 1px solid var(--border-main);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.server-ip-badge:hover {
  background: var(--bg-pill-hover);
  border-color: var(--border-active);
}
.server-discord-btn {
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.server-discord-btn:hover {
  opacity: 0.9;
}

/* Filters */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.filters-right {
  justify-content: flex-end;
  width: 100%;
}
.discord-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-pill);
  border: 1px solid var(--border-main);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.discord-icon-btn img {
  width: 18px;
  height: 18px;
}
.discord-icon-btn:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.15);
}

.region-select {
  background: var(--bg-pill);
  border: 1px solid var(--border-main);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

/* Leaderboard Column Headers */
.leaderboard-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.col-rank {
  width: 66px;
  text-align: center;
}
.col-player {
  flex: 1;
  padding-left: 5rem;
}
.col-region {
  width: 90px;
  text-align: center;
}
.col-tiers {
  width: 500px;
  text-align: right;
  padding-right: 0.5rem;
}

/* Ranking Cards List (Recreated exactly from attached reference image) */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-card-row {
  display: flex;
  align-items: center;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 1.25rem 0 0;
  height: 88px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  content-visibility: auto;
  contain-intrinsic-size: auto 104px;
}
.ranking-card-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* Rank Badge Styles (Exact reference chevron and plain styles) */
.rank-badge-chevron {
  width: 68px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  flex-shrink: 0;
  margin-left: 0;
}
.rank-badge-chevron span {
  font-size: 1.65rem;
  font-weight: 900;
  font-style: italic;
  color: #ffffff;
  text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.75);
  margin-right: 10px;
  letter-spacing: -0.02em;
}
.rank-badge-chevron {
  position: relative;
  overflow: hidden;
}
.rank-badge-chevron::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  animation: rank-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rank-shine {
  0% {
    left: -80%;
  }
  55% {
    left: 130%;
  }
  100% {
    left: 130%;
  }
}
.rank-badge-chevron.rank-1 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}
.rank-badge-chevron.rank-2 {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.3);
}
.rank-badge-chevron.rank-3 {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.35);
}

.rank-badge-plain {
  width: 68px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rank-badge-plain span {
  font-size: 1.65rem;
  font-weight: 900;
  font-style: italic;
  color: #f1f5f9;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: -0.02em;
}

/* Player Model Preview Container (Seamless, NO black box border) */
.player-model-container {
  width: 84px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.6rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.player-model-img {
  max-width: 82px;
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

/* Player Info */
.player-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.player-name-text {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-subtitle-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}
.combat-rank-icon,
.combat-title-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  object-fit: contain;
}
.combat-master-mark {
  position: relative;
  width: 0.82rem;
  height: 0.82rem;
  flex: 0 0 auto;
  transform: rotate(45deg);
  border: 2px solid #f4c430;
  background: rgba(244, 196, 48, 0.24);
  border-radius: 2px;
}
.combat-master-mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #f4c430;
  border-radius: 1px;
}

/* Region Badge */
.region-pill-box {
  width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.region-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-align: center;
  letter-spacing: 0.04em;
  background: rgba(120, 120, 130, 0.16);
  color: var(--text-muted);
}
.region-badge-pill.reg-NA {
  background: rgba(244, 63, 94, 0.22);
  color: #fb7185;
}
.region-badge-pill.reg-EU {
  background: rgba(52, 199, 89, 0.18);
  color: #7ee2a8;
}
.region-badge-pill.reg-AS {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.region-badge-pill.reg-SA {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
}
.region-badge-pill.reg-AU {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
}
.region-badge-pill.reg-ME {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

/* Tiers Row (Right side of ranking card) */
.tiers-row-box {
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  flex-shrink: 0;
}

.gamemode-tier-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 44px;
  flex-shrink: 0;
}

/* Circle around gamemodes logo with refined tier color borders */
.gamemode-tier-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #20202a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
}
.gamemode-tier-circle img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.gamemode-tier-circle.circle-tier-1 {
  border-color: rgba(234, 179, 8, 0.45);
}
.gamemode-tier-circle.circle-tier-2 {
  border-color: rgba(56, 189, 248, 0.45);
}
.gamemode-tier-circle.circle-tier-3 {
  border-color: rgba(249, 115, 22, 0.45);
}
.gamemode-tier-circle.circle-tier-4 {
  border-color: rgba(129, 140, 248, 0.45);
}
.gamemode-tier-circle.circle-tier-5 {
  border-color: rgba(166, 173, 184, 0.4);
}
.gamemode-tier-circle.circle-unranked {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
}
.tiers-row-box .gamemode-tier-circle.circle-unranked::after {
  content: '?';
  font-size: 0.85rem;
  font-weight: 800;
  color: #6a7380;
  line-height: 1;
}

/* Tier Pill Badge directly below the circle */
.gamemode-tier-pill {
  width: 40px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-primary-gold);
}
.gamemode-tier-pill.pill-unranked {
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
}
.tiers-row-box .gamemode-tier-pill.pill-unranked {
  visibility: hidden;
}

/* Status States: Loading, Error, Empty */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  text-align: center;
  gap: 1rem;
}
.state-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.state-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 400px;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(225, 29, 72, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover {
  color: #fff;
}

/* Profile Modal Details */
.profile-header {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-main);
}
.profile-skin-preview {
  width: 120px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7));
}
.profile-details {
  flex: 1;
}
.profile-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.profile-name {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.profile-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.stat-pill {
  background: var(--bg-pill);
  border: 1px solid var(--border-main);
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}
.stat-value {
  font-weight: 800;
  color: #fff;
  font-size: 1.15rem;
}

.profile-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.85rem 0;
}
.profile-rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}
.profile-mode-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.profile-mode-card img {
  width: 28px;
  height: 28px;
}
.profile-mode-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-main);
  border-radius: 10px;
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.2s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
  margin-top: 5rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 1rem;
  border-top: 1px solid var(--border-main);
}

/* Responsive */
@media (max-width: 1024px) {
  .col-tiers, .tiers-row-box { width: 360px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .navbar { margin-bottom: 2.5rem; height: 64px; }
  .rankings-card { margin-top: 4rem; padding: 1.25rem; }
  .gamemode-tab { width: 90px; height: 62px; font-size: 0.8rem; }
  .col-tiers, .tiers-row-box { display: none; }
  .col-region, .region-pill-box { width: 70px; }
  .player-model-container { width: 60px; height: 62px; margin-left: 0.4rem; margin-right: 0.35rem; }
  .player-model-img { max-width: 56px; max-height: 56px; }
  .rank-badge-chevron, .rank-badge-plain { width: 50px; font-size: 1.3rem; }
  .player-name-text { font-size: 1.15rem; }
}

/* ============ Blade Tiers — bigger, minimal interface ============ */
body { font-size: 18px; }
.app-container { max-width: 1620px; padding: 2.25rem 1.75rem 5rem; }
.navbar { height: 84px; }
.nav-link { font-size: 1.1rem; }
.gamemode-tab { font-size: 1.05rem; }
.ranking-card-row { min-height: 104px; }
.player-name-text { font-size: 1.45rem; }

/* Player profile modal */
.modal-content.bt-profile { max-width: 560px; text-align: left; }
.bt-profile-head { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 2rem; }
.bt-profile-avatar {
  width: 118px; height: 118px; border-radius: 50%;
  background: var(--bg-card-alt); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.bt-profile-avatar img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.bt-profile-name { font-size: 2.1rem; font-weight: 800; color: var(--color-primary); }
.bt-profile-title {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(225, 29, 72, 0.18); color: #fb7185;
  border-radius: 999px; padding: 0.35rem 1rem; font-weight: 700; font-size: 1rem;
}
.bt-profile-title .combat-title-icon { width: 1.35rem; height: 1.35rem; }
.bt-profile-title.combat-title-grandmaster,
.bt-profile-title.combat-title-master { color: #facc15; background: rgba(250, 204, 21, 0.14); }
.bt-profile-title.combat-title-specialist { color: #c084fc; background: rgba(192, 132, 252, 0.14); }
.bt-profile-title.combat-title-cadet,
.bt-profile-title.combat-title-novice { color: #c4b5fd; background: rgba(196, 181, 253, 0.14); }
.bt-profile-title.combat-title-rookie { color: #aeb4bc; background: rgba(174, 180, 188, 0.12); }
.bt-profile-region { color: var(--text-dim); font-weight: 700; font-size: 1.05rem; }
.bt-profile-section {
  font-size: 1.1rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--text-muted); margin: 1.25rem 0 0.6rem;
}
.bt-position-box {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-card-alt); border: 1px solid var(--border-card);
  border-radius: 12px; padding: 0.9rem 1.1rem;
}
.bt-position-rank { font-size: 1.6rem; font-weight: 900; font-style: italic; color: #fff; }
.bt-position-label { font-size: 1.15rem; font-weight: 800; color: #fff; }
.bt-position-points { color: var(--text-muted); font-weight: 600; }
.bt-profile-tiers {
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  background: var(--bg-card-alt); border: 1px solid var(--border-card);
  border-radius: 12px; padding: 1rem;
}

/* ===== Information modal: achievement titles list ===== */
.nav-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.titles-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
  color: var(--text, #e6e9ee);
}
.titles-heading span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.titles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.titles-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.titles-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  object-fit: contain;
}
.title-badge {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  display: inline-block;
  background: #facc15;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35);
}
.titles-name {
  font-weight: 700;
  font-size: 0.98rem;
}
.titles-desc {
  color: var(--text-muted, #9aa3ad);
  font-size: 0.88rem;
  margin-top: 0.1rem;
}
.title-grandmaster,
.title-master { color: #facc15; }
.title-ace { color: #f87171; }
.title-specialist { color: #c084fc; }
.title-cadet { color: #818cf8; }
.title-novice { color: #a5b4fc; }
.title-rookie { color: #aeb4bc; }

/* ================= Home & Testers pages ================= */
/* Home header — reference design: logo left, centered links, Apply + Discord right */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.25rem;
  margin-bottom: 4.5rem;
  position: relative;
  z-index: 50;
}

.home-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.home-brand img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.home-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 9px;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.home-nav-link:hover {
  color: #fff;
}
.home-nav-link.active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.home-apply-btn {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.home-apply-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.home-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.home-discord-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.home-discord-btn:hover {
  filter: brightness(1.12);
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-container {
  padding-top: 0.5rem;
}

.overview-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 4rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-season-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}

.hero-title .gold {
  color: var(--color-primary-gold);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.18rem;
  line-height: 1.65;
  max-width: 36rem;
  margin-bottom: 2.4rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.hero-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.hero-btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 25px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.hero-btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.hero-btn-ghost {
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border-main);
}

.hero-btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.hero-stats {
  display: flex;
  gap: 3.25rem;
  flex-wrap: wrap;
}

.hero-stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.top-players-card {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.top-players-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}

.top-players-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.top-player-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem;
  border-radius: 10px;
  transition: background 0.15s ease;
  text-decoration: none;
}

.top-player-row:hover {
  background: var(--bg-card-hover);
}

.top-rank {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-pill);
  border-radius: 9px;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.top-rank-1 {
  color: var(--t1-color);
  background: color-mix(in srgb, var(--t1-color) 20%, transparent);
}

.top-rank-2 {
  color: #cbd5e1;
  background: color-mix(in srgb, #cbd5e1 16%, transparent);
}

.top-rank-3 {
  color: var(--t3-color);
  background: color-mix(in srgb, var(--t3-color) 18%, transparent);
}

.top-avatar {
  width: 38px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.top-player-info {
  min-width: 0;
}

.top-player-name {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-player-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-player-pills {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.mini-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 7px;
  letter-spacing: 0.01em;
}

.mini-pill.p1 { color: var(--t1-color); background: color-mix(in srgb, var(--t1-color) 15%, transparent); }
.mini-pill.p2 { color: var(--t2-color); background: color-mix(in srgb, var(--t2-color) 15%, transparent); }
.mini-pill.p3 { color: var(--t3-color); background: color-mix(in srgb, var(--t3-color) 15%, transparent); }
.mini-pill.p4 { color: var(--t4-color); background: color-mix(in srgb, var(--t4-color) 15%, transparent); }
.mini-pill.p5 { color: var(--t5-color); background: color-mix(in srgb, var(--t5-color) 15%, transparent); }

.top-players-more {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.top-players-more:hover {
  text-decoration: underline;
}

.section-heading {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.section-heading .gold {
  color: var(--color-primary-gold);
}

.feature-section {
  margin-top: 2.5rem;
  padding-bottom: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: 16px;
  padding: 1.6rem;
}

.feature-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Testers page */
.testers-card {
  padding: 2.5rem;
}

.testers-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 42rem;
  margin-bottom: 2rem;
}

.testers-state {
  border: 2px dashed var(--border-main);
  border-radius: 14px;
  background: var(--bg-card-alt);
}

.testers-cta {
  margin-top: 1.25rem;
}

@media (max-width: 1180px) {
  .home-nav {
    position: static;
    transform: none;
  }
}

@media (max-width: 1020px) {
  .home-header {
    margin-bottom: 2.5rem;
  }
  .home-nav {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .testers-card {
    padding: 1.5rem;
  }
}
