:root {
  --primary: #fbbf24; /* Brighter Amber 400 */
  --primary-hover: #f59e0b; /* Amber 500 */
  --secondary: #f97316; /* Vibrant Orange 500 */
  --accent: #fcd34d; /* Amber 300 */
  
  /* RGB values for RGBA usage */
  --primary-rgb: 251, 191, 36;
  --primary-hover-rgb: 245, 158, 11;
  --secondary-rgb: 249, 115, 22;

  --bg-darker: #0c0a09; /* Deeper Stone 950 */
  --bg-card: rgba(23, 23, 23, 0.6); /* Cleaner dark neutral */
  --bg-nav: rgba(12, 10, 9, 0.95);
  --text-main: #fafafa;
  --text-muted: #a1a1aa; /* More sophisticated muted tone */
  --border-color: rgba(255, 255, 255, 0.08); /* Minimalist borders */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --glass: blur(12px);
  --text-glow: 0 0 12px rgba(255, 255, 255, 0.3);
  --title-glow: 0 0 30px rgba(255, 255, 255, 0.4);
  
  --glow-subtle: 0 0 10px rgba(255, 255, 255, 0.15); /* Modern clean glow */
  --glow-white: 0 0 10px rgba(255, 255, 255, 0.2);
  --glow-yellow: 0 0 12px rgba(251, 191, 36, 0.3);
  --glow-red: 0 0 12px rgba(239, 68, 68, 0.3);

  /* Premium Motion Constants */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --glass: blur(8px);
  --transition-fast: 0.12s var(--ease-out-expo);
  --transition-medium: 0.3s var(--ease-out-expo);
  --transition-slow: 0.45s var(--ease-out-expo);
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html {
  min-height: 100%;
  overflow-y: auto; /* Standard scrolling */
}

body {
  background: #050505;
  background-image: 
    linear-gradient(rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

h1, h2, h3, h4, h5, h6, .section-title, .modal-title {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
  letter-spacing: -0.02em;
}

.nav-btn, .btn, .stat-num, .stat-label, .rank-badge, .time-display, .username-cell {
  text-shadow: var(--glow-subtle) !important;
}

.btn-error, .delete-team-btn, .profile-logout-btn, .support-btn {
  text-shadow: var(--glow-red) !important;
}

p, span, label, input, textarea, select, li, td, th {
  text-shadow: var(--glow-subtle);
}

.nav-btn span.emoji {
  text-shadow: none !important;
}

/* MODERNIZE SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { 
  background: var(--border-color); 
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* SCROLLING BANNER (MODERNIZED) */
.ticker-wrap {
  background: rgba(var(--primary-rgb), 0.1);
  backdrop-filter: var(--glass);
  overflow: hidden;
  padding: 10px 0;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}
.ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}
@keyframes ticker {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ENTRANCE ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* SIDEBAR NAV */
nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 30px;
  padding: 40px 20px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  z-index: 1000;
  background: var(--bg-nav); /* Uses the warm Stone 900 background */
  border-right: 1px solid var(--border-color);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
  padding: 0 10px 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo-pixel {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}
.logo-sub {
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  opacity: 0.8;
  text-shadow: var(--text-glow);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  transition: all var(--transition-medium);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(4px);
}

.nav-btn:active {
  transform: translateX(2px) scale(0.98);
}

.nav-btn.active {
  background: var(--primary);
  color: #000;
  font-weight: 800;
  transform: translateX(6px);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.15);
}

.nav-btn.sunset.active { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 8px 20px rgba(var(--secondary-rgb), 0.4); }
.nav-btn.gold.active { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.discord-btn {
  text-decoration: none;
  background: rgba(88, 101, 242, 0.2) !important;
  color: #7289da !important; /* Slightly brighter blue for better visibility on dark */
  border: 1px solid rgba(88, 101, 242, 0.4) !important;
  font-weight: 700;
}

.discord-btn:hover {
  background: #5865f2 !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.6);
}

.sidebar-credit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 15px;
  padding: 0 10px;
  opacity: 0.6;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* MAIN CONTENT */
main {
  max-width: 1200px;
  margin-left: 260px; /* Offset for sidebar */
  padding: 60px;
  position: relative;
  z-index: 10; /* Above coins */
  min-height: 100vh;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}
.screen.active { 
  display: block; 
  opacity: 1;
  transform: translateY(0);
  animation: premiumEntrance 0.6s var(--ease-out-expo) forwards;
}

@keyframes premiumEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.98); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* STAGGERED LIST ANIMATION */
/* Clean Leaderboard Rows */
.leaderboard-table tbody tr {
  opacity: 0;
  animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
}

.leaderboard-table tbody tr::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.08), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
  pointer-events: none;
  z-index: -1;
  border-radius: var(--radius-sm);
}

.leaderboard-table tbody tr:hover::after {
  opacity: 1;
}

.leaderboard-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.02) !important;
  box-shadow: inset 0 0 20px rgba(var(--primary-rgb), 0.05), 
              0 0 15px rgba(var(--primary-rgb), 0.1);
}

.leaderboard-table td {
  padding: 16px 20px;
  background: transparent;
  font-size: 15px;
  transition: all var(--transition-medium);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody tr:hover td { 
  border-bottom-color: rgba(var(--primary-rgb), 0.15);
}

.leaderboard-table tr:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-table tr:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-table tr:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-table tr:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-table tr:nth-child(5) { animation-delay: 0.25s; }
.leaderboard-table tr:nth-child(n+6) { animation-delay: 0.3s; }

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

/* STATS BAR */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-box {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-medium);
}
.stat-box:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  display: block;
  text-shadow: var(--text-glow);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 5px;
}

/* WR HOLDER DISPLAY */
.wr-holder-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--primary-rgb), 0.1);
  animation: fadeIn 0.5s ease-out;
}

.wr-pfp-mini {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
  transition: transform 0.3s ease;
}

.wr-pfp-mini:hover {
  transform: scale(1.1);
}

.wr-username-mini {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

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

/* SUPPORT MODAL SPECIFIC */
.support-box {
  max-width: 480px;
  text-align: center;
}

.support-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.support-icon-large {
  font-size: 60px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.3));
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.support-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.support-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.support-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0;
}

.support-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  font-size: 14px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.support-btn {
  margin-bottom: 15px;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
  animation: supportGlow 2s infinite;
}

@keyframes supportGlow {
  0% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); border-color: rgba(239, 68, 68, 0.8); }
  100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); }
}

.support-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  transform: translateY(-4px) scale(1.04) translateX(4px);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
  color: #fff !important;
}

/* TEAMS SYSTEM */
.teams-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.btn-create-team-trigger {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  border: none;
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-create-team-trigger:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--team-color, var(--primary));
}

.delete-team-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.delete-team-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

.team-card-color-bar {
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--team-color, var(--primary));
}

.team-card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.team-card-members {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.create-team-container {
  max-width: 500px;
  margin: 0 auto;
}

.color-picker-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.team-color-preview {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  background: hsl(200, 96%, 57%);
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.create-team-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.create-team-actions .btn {
  flex: 1;
}

.player-team-tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 10px;
  vertical-align: middle;
  border: 1px solid currentColor;
  text-transform: uppercase;
  text-shadow: none !important;
  letter-spacing: 1.5px; /* Fix squashed team name */
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* TEAM DETAILS PAGE */
.team-details-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.team-title-group {
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}

.team-owner-tag {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px; /* Fix squashed owner tag */
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.2);
  text-shadow: none !important;
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: var(--primary);
  color: #000;
  transform: translateX(-5px);
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.team-member-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.team-member-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-5px);
}

.team-member-pfp {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.team-member-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.team-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* CUSTOM DROPDOWN */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  transition: all 0.3s ease;
}

.dropdown-trigger:hover {
  border-color: var(--primary);
}

.dropdown-trigger::after {
  content: '▼';
  font-size: 10px;
  color: var(--text-muted);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1c1917;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 5px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.dropdown-menu.show {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.dropdown-search {
  position: sticky;
  top: 0;
  background: #1c1917;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.dropdown-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
}

.dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: #fff;
}

.dropdown-item.selected {
  background: var(--primary);
  color: #000;
}

.profile-username {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
  text-transform: uppercase;
  text-shadow: var(--glow-white) !important;
  line-height: 1.1;
  margin-bottom: 5px;
}

.profile-country-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.profile-country-display {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.country-edit-btn {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  color: #000;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

.country-edit-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

.profile-country-menu {
  top: 100% !important;
  left: 0 !important;
  width: 250px !important;
  z-index: 9999 !important;
}

/* FILTER DROPDOWN */
.filter-wrapper {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-select {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.filter-select:hover {
  border-color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.05) !important;
}

.filter-select option {
  background: #1c1917;
  color: #fff;
}

/* PIXEL CARD (MODERN CARD) */
.pixel-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 30px;
  box-shadow: var(--shadow);
  position: relative;
}

.leaderboard-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.time-filter-select {
  width: auto !important;
  min-width: 140px;
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: var(--border-color) !important;
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px !important;
  border-radius: var(--radius-sm) !important;
}

/* MODERN CARD HOVERS */
.pixel-card, .stat-box, .rule-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pixel-card:hover, .stat-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* LEADERBOARD TABLE */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.leaderboard-table th {
  padding: 15px 20px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}
.leaderboard-table td {
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 15px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  border: none;
}
.leaderboard-table tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.leaderboard-table tr td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.rank-badge {
  width: 48px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  font-weight: 800;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
}
.rank-1 { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4); }
.rank-2 { background: linear-gradient(135deg, #a8a29e, #57534e); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #ea580c, #9a3412); color: #fff; }

.time-display {
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--text-glow);
}
.username-cell { 
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600; 
  color: #fff; 
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
}
.leaderboard-pfp {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.2);
}
.username-text {
  white-space: nowrap;
}
.video-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.video-link:hover { 
  text-decoration: underline; 
  text-shadow: var(--text-glow);
}

.delete-run-btn {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  font-size: 12px;
  padding: 2px 6px;
  margin-left: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.delete-run-btn:hover {
  background: var(--error);
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* FORMS (MODERNIZED) */
.form-group { margin-bottom: 25px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-hover-rgb), 0.15);
}

.time-dropdown-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.time-unit {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.time-unit-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.time-select {
  width: 100%;
  text-align: center;
}

.time-separator {
  font-weight: 800;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 10px;
}

/* PASSWORD TOGGLE */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 5;
}

.password-toggle:hover {
  color: var(--primary);
}

/* SMOOTH BUTTONS */
.btn, .nav-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  gap: 10px;
  transition: all 0.3s ease;
}
.btn-yellow { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); 
  color: #fff; 
  box-shadow: 0 4px 15px rgba(var(--primary-hover-rgb), 0.2);
}
.btn-yellow:hover { 
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%); 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(var(--primary-hover-rgb), 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  color: #fff;
}

.btn-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-error:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* CONFIRM MODAL SPECIFIC */
.confirm-box {
  max-width: 400px;
  text-align: center;
}

.confirm-message {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 30px;
  line-height: 1.5;
}

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

.confirm-actions .btn {
  padding: 12px 24px;
  font-size: 14px;
}

/* HERO CTA */
.hero-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.btn-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 20px 60px;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(var(--primary-hover-rgb), 0.3);
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all var(--transition-medium);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-hero:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 60px rgba(var(--primary-hover-rgb), 0.6);
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

.btn-hero:active {
  transform: translateY(-4px) scale(0.98);
}

.btn-hero .btn-icon {
  font-size: 24px;
}

/* MODERN RULES */
.modern-rules-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.rule-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.rule-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
  border-color: var(--primary);
}

.rule-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--primary);
  opacity: 0.5;
}

.rule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.rule-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.4));
}

.rule-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
  letter-spacing: 1px;
  text-shadow: var(--text-glow);
}

.rule-description {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.6;
  opacity: 0.9;
}

.rules-footer-info {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

.rules-footer-info strong {
  color: var(--primary);
  text-shadow: var(--text-glow);
}

/* MODALS (MODERNIZED) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #141210;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: premiumModalEntrance 0.5s var(--ease-out-expo);
}
@keyframes premiumModalEntrance {
  from { transform: scale(0.9) translateY(30px); opacity: 0; filter: blur(10px); }
  to { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}
.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: var(--title-glow);
}
.modal-close {
  position: absolute;
  top: 15px; 
  right: 15px;
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 20px; 
  cursor: pointer;
  z-index: 1000; /* Extremely high to be above everything */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--error);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.tab-btns {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 30px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  box-shadow: var(--shadow);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ALERTS */
.alert {
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }

/* USER INDICATOR */
.header-top {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 1100; /* Above everything including sidebar */
  will-change: transform;
}
.user-indicator {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border-radius: 100px;
  border: 1px solid var(--primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(var(--primary-hover-rgb), 0.2);
}

#userTeamTagHeader {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid currentColor;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-left: 5px;
}

.admin-header-btn {
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid #ea580c;
  color: #ea580c;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  display: inline-block; /* Ensure it shows on desktop */
}

.admin-header-btn:hover {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.4);
}

.user-indicator.show { display: flex; }
.user-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

/* LOADING & LANDING */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(41, 37, 36, 0.8) 0%, rgba(28, 25, 23, 1) 100%);
  backdrop-filter: blur(15px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-overlay.show {
  display: flex;
}

.loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.landing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #050505;
  background-image: 
    linear-gradient(rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  z-index: 99998;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.landing-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.coins-container {
  position: fixed; /* Changed from absolute to fixed to prevent scroll interference */
  inset: 0;
  pointer-events: none;
  z-index: 0; /* Lower than any content */
}

.floating-coin {
  position: absolute;
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--primary);
  font-weight: 900;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4), inset 0 0 10px rgba(var(--primary-rgb), 0.4);
  animation: floatUp var(--duration) linear infinite;
  opacity: 0.3;
  backdrop-filter: blur(2px);
}

.floating-coin::after {
  content: '★';
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) translateX(var(--drift)) rotate(360deg);
    opacity: 0;
  }
}

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

.landing-overlay.show {
  display: flex;
  opacity: 1;
}

.landing-character {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -85%); /* Moved down further from -95% */
  width: 250px; /* Reduced from 380px to make Jake smaller */
  z-index: 5; /* Positive z-index to stay above background */
  opacity: 1; /* Increased visibility */
  filter: drop-shadow(0 0 25px rgba(var(--primary-rgb), 0.5));
  pointer-events: none;
  animation: characterFloat 6s ease-in-out infinite;
}

.landing-character img {
  width: 100%;
  height: auto;
}

@keyframes characterFloat {
  0%, 100% { transform: translate(-50%, -85%); }
  50% { transform: translate(-50%, -90%); }
}

.landing-content {
  text-align: center;
  max-width: 500px;
  width: 90%;
  padding: 50px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 2px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(var(--primary-rgb), 0.05);
  animation: premiumEntrance 0.8s var(--ease-out-expo) forwards;
  position: relative;
  z-index: 10; /* Above character */
}

.landing-content::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 30px; height: 30px;
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
}

.landing-content::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 30px; height: 30px;
  border-bottom: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}

.landing-logo {
  margin-bottom: 40px;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.landing-btn {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

body.landing-mode nav,
body.landing-mode main,
body.landing-mode .header-top,
body.landing-mode .sponsor-box {
  display: none !important;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(var(--primary-rgb), 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}

.loading-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
  margin-top: 10px;
}

.loading-subtext {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  opacity: 0.8;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.owner-btn-sidebar {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.owner-btn-sidebar:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-hover-rgb), 0.05);
  text-shadow: var(--text-glow);
}

/* PLAY SCREEN */
.play-container {
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Align to the bottom of the container */
  min-height: 75vh; /* Increased height to push content further down */
  padding: 40px;
}

.play-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  width: 100%;
  max-width: 1000px;
  flex-wrap: wrap;
  margin: 0 auto; /* Center the grid container itself */
}

.play-card-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.play-character {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -75%);
  width: 220px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.4));
  animation: playCharFloat 5s ease-in-out infinite;
}

@keyframes playCharFloat {
  0%, 100% { transform: translate(-50%, -75%); }
  50% { transform: translate(-50%, -80%); }
}

.play-character img {
  width: 100%;
  height: auto;
}

.play-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-decoration: none;
  padding: 50px !important;
  text-align: center;
  width: 320px;
  min-height: 220px;
  position: relative;
  z-index: 10;
  background: rgba(10, 10, 10, 0.7) !important;
  backdrop-filter: blur(20px);
  border-radius: 4px !important;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.play-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.play-card-icon {
  font-size: 50px;
  filter: drop-shadow(0 0 15px rgba(var(--primary-rgb), 0.4));
}

.play-card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: 1px;
}

.nav-btn.play-btn {
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  margin-top: 10px;
}

.nav-btn.play-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
}

.nav-btn.play-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%);
  color: #000;
  font-weight: 800;
}

/* DONATE SCREEN */
.donate-nav-btn {
  color: #10b981 !important; /* Green */
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.donate-nav-btn:hover {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6) !important;
  transform: translateY(-4px) scale(1.04) translateX(4px);
}

.donate-nav-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #000 !important;
  font-weight: 800;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.9), 0 0 15px rgba(255, 255, 255, 0.4) !important;
  animation: donateGlowPulse 1.5s infinite; /* Sped up animation */
}

@keyframes donateGlowPulse {
  0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 35px rgba(16, 185, 129, 0.9); }
  100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
}

.donate-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  position: relative;
  overflow: hidden;
}

.donate-card {
  max-width: 600px;
  width: 90%;
  text-align: center;
  padding: 50px !important;
  background: rgba(10, 10, 10, 0.8) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  position: relative;
  z-index: 10;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.1) !important;
}

.donate-icon {
  font-size: 60px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.4));
}

.donate-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #10b981;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  margin-bottom: 20px;
}

.donate-text {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.btn-donate {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #000 !important;
  font-weight: 800;
  padding: 18px 32px !important;
  font-size: 18px !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn-donate:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.6) !important;
}
.admin-runs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.admin-run-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: all 0.3s ease;
}

.admin-run-card:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.admin-run-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-run-user {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-run-date {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-run-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-run-time {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  text-shadow: var(--text-glow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-time-btn {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: all 0.2s ease;
  filter: grayscale(1);
}

.edit-time-btn:hover {
  opacity: 1;
  transform: scale(1.2);
  filter: grayscale(0);
}

.admin-run-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.admin-run-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.admin-run-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.btn-approve {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-approve:hover {
  background: #10b981;
  color: #fff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-reject {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-reject:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* RECORD DETAIL MODAL SPECIFIC - ENHANCED */
.detail-box {
  max-width: 800px;
  width: 95%;
  text-align: left;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #1a1715 0%, #141210 100%);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  display: flex;
  flex-direction: column;
}

.detail-header {
  position: relative;
  padding: 60px 40px 40px;
  background: linear-gradient(to bottom, rgba(var(--primary-rgb), 0.1), transparent);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.detail-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: var(--primary);
  filter: blur(100px);
  opacity: 0.15;
  z-index: 0;
}

.detail-rank-badge {
  position: absolute;
  top: 40px;
  right: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(var(--primary-hover-rgb), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  transform: rotate(5deg);
}

.detail-rank-label {
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 1px;
}

.detail-rank-value {
  font-size: 32px;
  line-height: 1;
}

.detail-user-title {
  font-size: 42px; /* Slightly smaller to fit with PFP */
  margin-bottom: 0px;
  letter-spacing: -2px;
  text-align: left;
  position: relative;
  z-index: 1;
  line-height: 1;
}

.detail-user-profile-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  z-index: 1;
  position: relative;
}

.detail-pfp-wrapper {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.detail-pfp-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

.detail-user-info-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.detail-user-title {
  margin: 0 !important;
}

.detail-user-bio {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 450px;
  font-style: italic;
  opacity: 0.9;
}

.detail-subtitle {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

.detail-body {
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detail-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-stats-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.detail-info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-info-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-info-value {
  font-weight: 700;
  color: #fff;
  font-size: 18px;
}

.detail-info-value.highlight {
  color: var(--primary);
  font-size: 36px;
  font-family: 'Montserrat', sans-serif;
  text-shadow: var(--title-glow);
  line-height: 1;
  margin-top: 5px;
}

.detail-visual-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px dashed var(--border-color);
  position: relative;
}

.detail-visual-icon {
  font-size: 80px;
  filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.4));
  margin-bottom: 20px;
}

.status-verified-large {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--success);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-footer {
  padding: 30px 40px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.detail-actions {
  width: 100%;
}

.leaderboard-table tr {
  cursor: pointer;
}

.leaderboard-table tr td a, 
.leaderboard-table tr td button {
  position: relative;
  z-index: 2;
}

/* PROFILE SCREEN STYLES */
.profile-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  animation: fadeInUp 0.6s ease-out;
}

.profile-header-card {
  position: relative;
  padding: 40px !important;
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.9) 0%, rgba(28, 25, 23, 0.95) 100%) !important;
  overflow: visible !important;
  z-index: 100 !important;
}

.profile-logout-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  z-index: 10;
}

.profile-logout-btn:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.profile-pfp-section {
  display: flex;
  align-items: center;
  gap: 30px;
}

.profile-pfp-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.profile-pfp-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

.pfp-edit-btn {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--primary);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.pfp-edit-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.profile-title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: var(--title-glow);
  line-height: 1;
}

.profile-country-tag {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.card-icon { font-size: 20px; }
.card-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.char-counter {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  opacity: 0.6;
}

.form-textarea {
  min-height: 150px;
  resize: none;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  width: 100%;
}

.profile-records-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-record-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-record-time {
  font-weight: 800;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
}

.profile-record-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* SPONSOR & SEARCH BOX */
.sponsor-box {
  position: fixed !important;
  top: 140px;
  right: 20px;
  width: 360px;
  max-height: calc(100vh - 160px); 
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 1000;
  box-shadow: var(--shadow);
  animation: slideInRight 0.5s var(--ease-out-expo);
  overflow-y: auto;
  overflow-x: hidden;
}

.toggle-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.search-result-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.search-result-item:hover {
  background: rgba(var(--primary-hover-rgb), 0.1);
  border-color: var(--primary);
  transform: translateX(4px);
}

.search-result-name {
  font-weight: 700;
  color: #fff;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-result-time {
  font-size: 12px;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
}

.sponsor-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.search-btn {
  padding: 8px 16px !important;
  font-size: 11px !important;
  min-width: 65px;
}

.search-feedback {
  font-size: 11px;
  color: var(--error);
  font-weight: 600;
  min-height: 16px;
}

.search-loader {
  display: none;
  justify-content: center;
  padding: 10px 0;
}

.search-loader.show {
  display: flex;
}

.spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(var(--primary-rgb), 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  filter: drop-shadow(var(--text-glow));
}

.highlight-run {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0% { background: rgba(var(--primary-rgb), 0.3); }
  100% { background: rgba(255, 255, 255, 0.03); }
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.sponsor-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sponsor-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  text-shadow: var(--title-glow);
  letter-spacing: 0.5px;
  text-align: right;
}

/* Cursor Glow Effect */
.cursor-glow {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2) 0%, transparent 80%);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
  opacity: 0;
  mix-blend-mode: plus-lighter;
  filter: blur(2px);
}

body:hover .cursor-glow {
  opacity: 1;
}

/* --- RESPONSIVE DESIGN FIXES --- */

@media (max-width: 1024px) {
  nav { width: 220px; padding: 30px 15px; }
  main { margin-left: 220px; padding: 40px; }
}

@media (max-width: 900px) {
  nav {
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 10px;
    z-index: 9999;
    border-right: none;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-nav);
    gap: 0;
  }
  .sidebar-logo, .sidebar-footer { display: none; }
  .nav-links {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    gap: 5px;
  }
  .nav-btn {
    flex-direction: column;
    padding: 10px 5px;
    font-size: 10px;
    gap: 4px;
    min-width: 0;
    text-align: center;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted);
  }
  .nav-btn .emoji { font-size: 18px; margin: 0; }
  .nav-btn:hover { transform: none; background: transparent; }
  .nav-btn.active { 
    transform: scale(1.1); 
    background: transparent !important; 
    color: var(--primary) !important; 
    box-shadow: none !important;
  }

  .play-btn { display: none !important; }
  
  main { margin-left: 0; padding: 30px 20px 100px; }
  
  .sponsor-box {
    position: relative !important;
    top: 0;
    right: 0;
    width: 100%;
    max-height: none;
    margin-bottom: 30px;
    animation: fadeInUp 0.5s ease-out;
  }
  .header-top { display: none; }
  .admin-header-btn { display: none !important; } /* Hide the small header button on mobile */

  .profile-grid { grid-template-columns: 1fr; }
  .profile-pfp-section { flex-direction: column; text-align: center; }
  .profile-username { font-size: 32px; }
}

@media (max-width: 768px) {
  .hero-cta {
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 0 10px;
  }

  .mobile-admin-only {
    display: none;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    border: 1px solid #ea580c !important;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3) !important;
  }

  .mobile-admin-only.show {
    display: flex !important;
  }

  .mobile-admin-only:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  }

  .section-title { font-size: 18px; }
  .stats-bar { grid-template-columns: 1fr; gap: 12px; }
  .stats-bar .stat-box:first-child,
  .stats-bar .stat-box:last-child {
    display: none;
  }
  .stat-num { font-size: 24px; }
  
  /* Responsive Table as Cards */
  .leaderboard-table, .leaderboard-table thead, .leaderboard-table tbody, .leaderboard-table th, .leaderboard-table td, .leaderboard-table tr {
    display: block;
  }
  .leaderboard-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .leaderboard-table tr {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
  }
  .leaderboard-table td {
    border: none;
    position: relative;
    padding-left: 35% !important;
    text-align: right;
    background: transparent !important;
    padding: 12px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .leaderboard-table td:last-child { border-bottom: none; }
  .leaderboard-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 30%;
    white-space: nowrap;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .username-cell { 
    justify-content: flex-end; 
    gap: 6px; 
    flex-wrap: wrap;
    max-width: 100%;
    line-height: 1.2;
    word-break: break-word;
  }
  .username-cell span:not(.team-tag-inline) {
    font-size: 14px;
    font-weight: 800;
  }
  .team-tag-inline {
    font-size: 9px;
    padding: 2px 6px;
  }
  .leaderboard-pfp { width: 22px; height: 22px; }
  .rank-badge { margin-left: auto; width: 40px; height: 28px; font-size: 11px; }
  
  /* Other mobile tweaks */
  .pixel-card { padding: 20px; }
  .play-card { width: 100%; max-width: 320px; padding: 40px 20px !important; }
  .play-character { width: 140px; transform: translate(-50%, -85%); }
  
  /* Modal Mobile Fixes */
  .modal-box { 
    width: 95%; 
    padding: 20px !important; 
    margin: 10px auto;
    max-height: 90vh;
    overflow-y: auto;
  }
  .detail-body { grid-template-columns: 1fr; padding: 15px 0; }
  .detail-user-title { font-size: 24px; }
  .detail-rank-badge { position: relative; top: 0; right: 0; margin-bottom: 15px; width: 70px; height: 45px; }
  .detail-rank-value { font-size: 20px; }
  .detail-user-profile-row { flex-direction: column; text-align: center; gap: 15px; }
  .detail-pfp-wrapper { width: 70px; height: 70px; }
  .detail-info-value.highlight { font-size: 24px; }
  .detail-visual-section { display: none; } /* Hide large icon to save space */
  
  .time-dropdown-container { gap: 5px; }
  .time-separator { font-size: 16px; margin-bottom: 5px; }
  .time-unit-label { font-size: 8px; }
  
  .btn-hero { width: 100%; font-size: 14px; }
}

@media (max-width: 480px) {
  .logo-pixel { font-size: 20px; }
  .nav-btn { font-size: 9px; }
  .nav-btn .emoji { font-size: 16px; }
  .section-title { font-size: 16px; }
  .landing-logo .logo-pixel { font-size: 36px; }
  .landing-btn { width: 100%; margin-bottom: 10px; }
}
