/* ==========================================================================
   Fang Tierlist — Components & UI Modules
   ========================================================================== */

/* ==========================================================================
   Tier Badges & Chips
   ========================================================================== */
.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-gaming);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tier-badge.lg {
  font-size: 0.95rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
}

.tier-badge.sm {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
}

/* Tier Colors with Esports Glow */
.tier-badge[data-tier="HT1"] {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.tier-badge[data-tier="LT1"] {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.tier-badge[data-tier="HT2"] {
  background: rgba(167, 139, 250, 0.18);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.25);
}
.tier-badge[data-tier="LT2"] {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.45);
}
.tier-badge[data-tier="HT3"] {
  background: rgba(96, 165, 250, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.25);
}
.tier-badge[data-tier="LT3"] {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.tier-badge[data-tier="HT4"] {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.tier-badge[data-tier="LT4"] {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.tier-badge[data-tier="HT5"] {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.tier-badge[data-tier="LT5"] {
  background: rgba(71, 85, 105, 0.12);
  color: #64748b;
  border: 1px solid rgba(71, 85, 105, 0.25);
}
.tier-badge[data-tier="UNR"] {
  background: rgba(51, 65, 85, 0.12);
  color: #64748b;
  border: 1px solid rgba(51, 65, 85, 0.25);
}

/* Region Badges */
.region-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.5px;
}

/* Account Type Pills */
.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.account-badge.premium {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.account-badge.cracked {
  background: rgba(245, 158, 11, 0.12);
  color: var(--tier-ht2);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Page Hero Section (Cinematic Esports Presentation)
   ========================================================================== */
.page-hero {
  margin-bottom: 3.25rem;
  padding: 2rem 0 1.25rem;
  text-align: center;
  position: relative;
}

/* Subtle ambient glow behind hero */
.page-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-white);
  text-transform: uppercase;
  margin-bottom: 1rem;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.hero-brand {
  color: #ffffff;
  display: inline-block;
  text-shadow: 0 4px 24px rgba(255, 255, 255, 0.15);
}

/* 3-stop gradient shimmer: Purple → Blue → Cyan */
.hero-title .accent {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #22d3ee 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6))
          drop-shadow(0 0 40px rgba(34, 211, 238, 0.25));
  animation: heroShimmer 4s ease-in-out infinite alternate;
  display: inline-block;
}

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

.hero-subtitle {
  font-family: var(--font-main);
  font-size: 1.125rem;
  font-weight: 500;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: 0.6px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.subtitle-divider {
  color: #8b5cf6;
  font-weight: 700;
  margin: 0 0.4rem;
  opacity: 0.9;
}

/* ==========================================================================
   Gradient Text Utility (reusable, apply to any heading)
   ========================================================================== */
.gradient-text {
  background: var(--grad-primary);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.45));
  animation: heroShimmer 4.5s ease-in-out infinite alternate;
}

.gradient-text-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.5));
}

/* ==========================================================================
   Gradient Border Utility (cards, buttons, highlights)
   ========================================================================== */
.gradient-border {
  position: relative;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-primary);
  z-index: -1;
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

.gradient-border:hover::before {
  opacity: 1;
  animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
  0%   { background: linear-gradient(135deg, #8b5cf6, #3b82f6, #22d3ee); }
  33%  { background: linear-gradient(225deg, #8b5cf6, #3b82f6, #22d3ee); }
  66%  { background: linear-gradient(315deg, #8b5cf6, #3b82f6, #22d3ee); }
  100% { background: linear-gradient(135deg, #8b5cf6, #3b82f6, #22d3ee); }
}

/* Gold gradient border for rank #1 */
.gradient-border-gold::before {
  background: var(--grad-gold);
}

/* Rank-1 gold gradient text badge */
.rank-1-text {
  background: var(--grad-gold);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
}


/* Stats Counter Grid (Glassmorphism + Modern Esports Glow) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(139, 92, 246, 0.25);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient-subtle);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-value {
  font-family: var(--font-gaming);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
}

.profile-stat-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Profile avatar wrap (replaces old inline-styled div) */
.profile-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
}

/* Profile body render container (replaces old inline styles) */
.profile-body-render-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  width: 100%;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.profile-body-render-img {
  max-height: 160px;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 12px rgba(34, 211, 238, 0.15));
}

/* Profile stat wide (spans full width in 2-col grid) */
.profile-stat-wide {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.profile-stat-val-sm {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-white);
}

/* Profile action buttons row */
.profile-actions-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.profile-actions-row .btn {
  flex: 1;
}

/* Profile back button (proper touch target) */
.profile-back-btn {
  font-size: 0.88rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Discord badge in profile */
.discord-badge {
  background: rgba(88, 101, 242, 0.15);
  color: #818cf8;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

/* Copy IP button — proper touch target */
.copy-ip-btn {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Filter & Search Toolbar (Glassmorphism)
   ========================================================================== */
.toolbar-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: var(--transition);
}

.search-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35);
  background: rgba(15, 20, 35, 0.95);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.region-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-input);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.region-pill {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.region-pill:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.region-pill.active {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.custom-select {
  background: var(--bg-input);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
  cursor: pointer;
}

.custom-select:focus {
  border-color: #8b5cf6;
}

/* ==========================================================================
   Rankings Podium (Top 3 Players — Special Rank #1 Treatment)
   ========================================================================== */
.podium-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-end;
}

.podium-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.podium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.25);
}

/* Rank #1 Special Champion Treatment (Gold Radiant Aura + Subtle Pulse) */
.podium-card.rank-1 {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12) 0%, rgba(20, 27, 45, 0.9) 60%);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.25), 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 2.5rem 1.5rem;
  order: 2;
  animation: championGlow 3s ease-in-out infinite alternate;
}

@keyframes championGlow {
  0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2), 0 10px 30px rgba(0, 0, 0, 0.6); }
  100% { box-shadow: 0 0 35px rgba(251, 191, 36, 0.4), 0 12px 36px rgba(0, 0, 0, 0.7); }
}

.podium-card.rank-2 {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, rgba(20, 27, 45, 0.85) 60%);
  border-color: rgba(139, 92, 246, 0.4);
  order: 1;
}

.podium-card.rank-3 {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(20, 27, 45, 0.85) 60%);
  border-color: rgba(59, 130, 246, 0.4);
  order: 3;
}

.podium-crown {
  position: absolute;
  top: -18px;
  font-size: 1.8rem;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8));
  animation: floatCrown 2.5s ease-in-out infinite alternate;
}

@keyframes floatCrown {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.podium-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 1rem;
}

.podium-card.rank-1 .podium-avatar-wrap {
  width: 92px;
  height: 92px;
}

.podium-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  image-rendering: pixelated;
  background: #111420;
  border: 2px solid var(--border-medium);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.podium-card.rank-1 .podium-avatar {
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.podium-rank-pill {
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-family: var(--font-gaming);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.podium-card.rank-1 .podium-rank-pill {
  background: var(--gold-gradient);
  color: #080b11;
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.podium-card.rank-2 .podium-rank-pill {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  color: #ffffff;
  border-color: #a78bfa;
}

.podium-card.rank-3 .podium-rank-pill {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: #ffffff;
  border-color: #60a5fa;
}

.podium-username {
  font-family: var(--font-display), sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.35rem;
}

.podium-points {
  font-family: var(--font-gaming);
  font-size: 1.2rem;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 0.75rem;
}

.podium-card.rank-1 .podium-points {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* ==========================================================================
   Rankings Table (Glassmorphism Leaderboard)
   ========================================================================== */
.rankings-table-wrap {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.rankings-table thead {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.rankings-table th {
  padding: 1.1rem 1.25rem;
  font-family: var(--font-gaming);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.rankings-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.rankings-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
  transform: scale-[1.002];
}

.rankings-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
}

.rank-number {
  font-family: var(--font-gaming);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-muted);
  width: 48px;
}

.rank-number.top-1 { color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.5); font-size: 1.2rem; }
.rank-number.top-2 { color: #a78bfa; text-shadow: 0 0 10px rgba(167, 139, 250, 0.4); }
.rank-number.top-3 { color: #60a5fa; text-shadow: 0 0 10px rgba(96, 165, 250, 0.4); }

.player-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-head-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.player-head {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
  background: #141928;
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.player-info-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.player-username-link {
  font-weight: 700;
  color: var(--text-white);
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.player-username-link:hover {
  color: #a78bfa;
}

.player-subline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Circular Gamemode Tier Badges (Row & Card Display) */
.gamemode-tiers-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.gm-tier-badge-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.gm-circle-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #13182a;
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gm-tier-badge-wrap:hover .gm-circle-badge {
  transform: translateY(-2px) scale(1.1);
  background: #1c243c;
}

/* Tier Specific Accents (Gold -> Purple -> Blue -> Slate) */
.gm-circle-badge.tier-t1 {
  border-color: rgba(251, 191, 36, 0.6);
  color: #fbbf24;
}
.gm-tier-badge-wrap:hover .gm-circle-badge.tier-t1 {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5);
}

.gm-circle-badge.tier-t2 {
  border-color: rgba(167, 139, 250, 0.6);
  color: #a78bfa;
}
.gm-tier-badge-wrap:hover .gm-circle-badge.tier-t2 {
  border-color: #a78bfa;
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.45);
}

.gm-circle-badge.tier-t3 {
  border-color: rgba(96, 165, 250, 0.6);
  color: #60a5fa;
}
.gm-tier-badge-wrap:hover .gm-circle-badge.tier-t3 {
  border-color: #60a5fa;
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.45);
}

.gm-circle-badge.tier-t4 {
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}
.gm-tier-badge-wrap:hover .gm-circle-badge.tier-t4 {
  border-color: #cbd5e1;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.3);
}

.gm-circle-badge.tier-t5 {
  border-color: rgba(100, 116, 139, 0.4);
  color: #94a3b8;
}
.gm-tier-badge-wrap:hover .gm-circle-badge.tier-t5 {
  border-color: #94a3b8;
  box-shadow: 0 0 12px rgba(100, 116, 139, 0.3);
}

.gm-circle-tier-code {
  font-family: var(--font-gaming);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  line-height: 1;
  text-align: center;
}

.tier-code-t1 { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.tier-code-t2 { color: #a78bfa; text-shadow: 0 0 8px rgba(167, 139, 250, 0.4); }
.tier-code-t3 { color: #60a5fa; text-shadow: 0 0 8px rgba(96, 165, 250, 0.4); }
.tier-code-t4 { color: #cbd5e1; }
.tier-code-t5 { color: #94a3b8; }
.tier-code-unr { color: #64748b; }

/* Interactive Hover Tooltip */
.gm-tier-badge-wrap[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 20, 35, 0.95);
  color: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease-out;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
  z-index: 60;
}

.gm-tier-badge-wrap:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.points-cell {
  font-family: var(--font-gaming);
  font-weight: 800;
  font-size: 1.15rem;
  color: #a78bfa;
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   Gamemode Tab View & Matrix Columns
   ========================================================================== */
.gamemodes-nav {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gamemodes-nav::-webkit-scrollbar { display: none; }


.gamemode-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.gamemode-tab-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-white);
}

.gamemode-tab-btn.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.gamemode-hero-banner {
  background: linear-gradient(135deg, #121826 0%, #162035 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.gm-hero-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.gm-hero-icon {
  font-size: 3rem;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gm-hero-title {
  font-family: var(--font-gaming);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 1px;
}

.gm-hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Tier Matrix Columns / Rows */
.tier-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tier-group-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.tier-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-group-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tier-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.matrix-player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: var(--transition);
}

.matrix-player-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.matrix-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
  background: #1e293b;
  flex-shrink: 0;
}

.matrix-player-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-player-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Player Profile Page
   ========================================================================== */
.profile-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  image-rendering: pixelated;
  border: 3px solid var(--border-medium);
  background: #1e293b;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.profile-username {
  font-family: var(--font-gaming);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.profile-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-stats-box {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-stat-item {
  text-align: center;
}

.profile-stat-val {
  font-family: var(--font-gaming);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.profile-stat-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Gamemode Tier Breakdown Grid */
.profile-gamemodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.profile-gm-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.profile-gm-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(139, 92, 246, 0.2);
}

.profile-gm-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.profile-gm-circle-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #13182a;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.profile-gm-card:hover .profile-gm-circle-large {
  transform: scale(1.08);
}

.profile-gm-circle-large.tier-t1 { border-color: #fbbf24; color: #fbbf24; box-shadow: 0 0 14px rgba(251, 191, 36, 0.4); }
.profile-gm-circle-large.tier-t2 { border-color: #a78bfa; color: #a78bfa; box-shadow: 0 0 14px rgba(167, 139, 250, 0.35); }
.profile-gm-circle-large.tier-t3 { border-color: #60a5fa; color: #60a5fa; box-shadow: 0 0 14px rgba(96, 165, 250, 0.35); }
.profile-gm-circle-large.tier-t4 { border-color: #94a3b8; color: #cbd5e1; box-shadow: 0 0 10px rgba(148, 163, 184, 0.25); }
.profile-gm-circle-large.tier-t5 { border-color: #64748b; color: #94a3b8; box-shadow: 0 0 10px rgba(100, 116, 139, 0.25); }
.profile-gm-circle-large.tier-unr { border-color: #334155; color: #64748b; }

.profile-gm-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-white);
}

.profile-gm-pts {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* History Timeline */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.timeline-title {
  font-family: var(--font-gaming);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline-list {
  position: relative;
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: var(--border-medium);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.25);
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

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

.timeline-action {
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-notes {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-family: var(--font-gaming);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

.modal-close-btn {
  color: var(--text-muted);
  font-size: 1.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.modal-close-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   Buttons (Modern Purple-to-Blue Gradient with Radiant Glow)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.4px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary {
  background: rgba(22, 29, 48, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--text-primary);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  background: rgba(32, 42, 70, 0.95);
  border-color: #8b5cf6;
  color: #ffffff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  transform: translateY(-2px) scale(1.02);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet ≤ 1024px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .podium-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile ≤ 768px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Stats ──────────────────────────────────────────────────────── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* ── Podium (single column, centered) ──────────────────────────── */
  .podium-section {
    grid-template-columns: 1fr !important;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    gap: 0.65rem;
  }

  .podium-card.rank-1 { order: 1; }
  .podium-card.rank-2 { order: 2; }
  .podium-card.rank-3 { order: 3; }

  .podium-card { padding: 1.25rem 1rem; }
  .podium-card.rank-1 { padding: 1.5rem 1rem; }

  /* ── Rankings Table → Mobile Card View ─────────────────────────── */
  /* Hide the table header row */
  .rankings-table thead {
    display: none !important;
  }

  /* Make the table structure block-based */
  .rankings-table,
  .rankings-table tbody {
    display: block;
    width: 100%;
  }

  /* Each row becomes a card */
  .rankings-table tbody tr.player-row {
    display: grid;
    grid-template-areas:
      "player player rank"
      "tiers  tiers  tiers"
      "region .      points";
    grid-template-columns: 1fr auto auto;
    align-items: start;
    gap: 0.5rem 0.75rem;
    padding: 0.9rem 1rem;
    margin: 0.45rem 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: var(--radius-md);
    background: rgba(22, 29, 48, 0.78);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    position: relative;
    width: auto;
  }

  .rankings-table tbody tr.player-row:hover,
  .rankings-table tbody tr.player-row:active {
    background: rgba(32, 43, 72, 0.92);
    border-color: rgba(139, 92, 246, 0.4);
  }

  /* Assign grid areas by data-label */
  .rankings-table td[data-label="Rank"] {
    grid-area: rank;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    width: auto;
  }

  .rankings-table td[data-label="Player"] {
    grid-area: player;
    padding: 0;
    width: auto;
  }

  .rankings-table td[data-label="Region"] {
    grid-area: region;
    padding: 0;
    width: auto;
  }

  .rankings-table td[data-label="Tiers"] {
    grid-area: tiers;
    padding: 0;
    width: auto;
  }

  .rankings-table td[data-label="Points"] {
    grid-area: points;
    padding: 0;
    font-size: 1rem;
    font-weight: 800;
    text-align: right;
    width: auto;
  }

  /* Ensure td default styles reset */
  .rankings-table td {
    display: block;
    width: auto;
    border: none;
    padding: 0;
  }

  /* Player avatar smaller on mobile */
  .player-head-wrap { width: 36px !important; height: 36px !important; }
  .player-head { border-radius: 6px; }

  /* Tiers row wrap nicely */
  .gamemode-tiers-row {
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  .gm-circle-badge { width: 26px !important; height: 26px !important; }
  .gm-circle-tier-code { font-size: 0.6rem; }

  /* ── Toolbar ────────────────────────────────────────────────────── */
  .toolbar-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
  }

  .search-box {
    min-width: unset;
    width: 100%;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .region-pills {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .region-pills::-webkit-scrollbar { display: none; }

  .region-pill {
    flex-shrink: 0;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
  }

  .custom-select {
    width: 100%;
    min-height: 40px;
  }

  /* ── Profile Page ───────────────────────────────────────────────── */
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .profile-card {
    padding: 1.25rem 1rem;
  }

  .profile-avatar-wrap {
    margin: 0 auto;
  }

  .profile-gamemodes-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  /* ── Gamemode Hero Banner ───────────────────────────────────────── */
  .gamemode-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.85rem;
    gap: 0.85rem;
  }

  .gm-hero-left {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  /* ── Admin Panel ────────────────────────────────────────────────── */
  .admin-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1.1rem 1rem;
  }

  .admin-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }

  .admin-tab {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Admin tables: horizontal scroll */
  .admin-players-table-wrap,
  .admin-staff-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }

  /* Forms full-width */
  .form-control {
    min-height: 44px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* All buttons: min 44px touch target */
  .btn {
    min-height: 44px;
    width: 100%;
  }

  /* Modal buttons only full-width in modal context */
  .modal-body .btn,
  .modal-footer .btn {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Small Mobile ≤ 480px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Stats: 1 column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .stat-card { padding: 0.9rem 1rem; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.72rem; }

  /* Podium compact */
  .podium-avatar-wrap { width: 54px !important; height: 54px !important; }
  .podium-username { font-size: 0.95rem; }
  .podium-points { font-size: 0.92rem; }

  /* Rankings rows tighter */
  .rankings-table tbody tr.player-row {
    padding: 0.75rem 0.75rem;
    margin: 0.35rem 0;
    border-radius: var(--radius-sm);
    gap: 0.4rem 0.5rem;
  }

  /* Login card */
  .login-card { padding: 1.5rem 1rem; }

  /* Profile */
  .profile-gm-card { padding: 0.75rem; }

  .btn { font-size: 0.85rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   TOUCH DEVICES — :active replaces :hover
   ══════════════════════════════════════════════════════════════════════════ */
@media (hover: none) {
  /* Remove hover transforms that don't work on touch */
  .podium-card:hover,
  .stat-card:hover,
  .profile-gm-card:hover,
  .rankings-table tbody tr.player-row:hover,
  .btn:hover {
    transform: none !important;
  }

  /* Add active states for tactile feedback */
  .podium-card:active         { transform: scale(0.98) !important; }
  .stat-card:active           { transform: scale(0.97) !important; }
  .btn:active                 { transform: scale(0.96) !important; opacity: 0.9; }
  .region-pill:active         { transform: scale(0.95) !important; }

  /* Gradient border: no hover animation on touch */
  .gradient-border:hover::before { animation: none; opacity: 0.6; }
}


