/* ============================================
   KANXO DAI STORE - ENHANCED LEADERBOARD CSS
   ============================================ */

/* CSS Variables for consistent theming */
:root {
  /* Color Palette */
  --primary-color: #4f46e5;
  --primary-dark: #3730a3;
  --secondary-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* Rank Colors */
  --gold-gradient: linear-gradient(135deg, #ffd700 0%, #ffed4a 50%, #fbbf24 100%);
  --silver-gradient: linear-gradient(135deg, #c0c0c0 0%, #e5e7eb 50%, #9ca3af 100%);
  --bronze-gradient: linear-gradient(135deg, #cd7f32 0%, #d97706 50%, #92400e 100%);
  
  /* Background Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-dark: #1e293b;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
}

/* ============================================
   RESET AND BASE STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

/* ============================================
   LEADERBOARD HEADER SECTION
   ============================================ */

.leaderboard-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-white);
  padding: var(--spacing-2xl) 0;
  position: relative;
  overflow: hidden;
}

.leaderboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
  opacity: 0.3;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 var(--spacing-sm) 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-title i {
  color: #ffd700;
  margin-right: var(--spacing-sm);
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.header-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin: 0 0 var(--spacing-lg) 0;
}

.stats-row {
  display: flex;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.stat-item {
  text-align: left;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.8;
}

.user-position-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  min-width: 280px;
}

.user-position-card h6 {
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 600;
  opacity: 0.9;
}

.position-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.position-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
}

.position-item i {
  width: 16px;
  opacity: 0.8;
}

/* ============================================
   LEADERBOARD TABS
   ============================================ */

.leaderboards-section {
  padding: var(--spacing-2xl) 0;
  background: var(--bg-primary);
  min-height: 70vh;
}

.leaderboard-tabs {
  margin-bottom: var(--spacing-xl);
}

.nav-pills .nav-link {
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  margin: 0 var(--spacing-xs);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  position: relative;
  overflow: hidden;
}

.nav-pills .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
  transition: left var(--transition-slow);
}

.nav-pills .nav-link:hover::before {
  left: 100%;
}

.nav-pills .nav-link i {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.nav-pills .nav-link span {
  font-weight: 600;
  font-size: 1rem;
}

.nav-pills .nav-link small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.nav-pills .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-pills .nav-link.active {
  background: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   LEADERBOARD CARDS
   ============================================ */

.leaderboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.card-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  z-index: 0;
}

.weekly-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--text-white);
}

.monthly-header {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: var(--text-white);
}

.alltime-header {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: var(--text-white);
}

.header-info {
  position: relative;
  z-index: 1;
}

.header-info h3 {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-info p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.875rem;
}

.reset-timer, .hall-of-fame-badge {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: rgba(255, 255, 255, 0.15);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.card-body {
  padding: var(--spacing-xl);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--text-primary);
}

.empty-state p {
  margin: 0 0 var(--spacing-lg) 0;
  font-size: 1rem;
}

/* ============================================
   LEADERBOARD ROWS
   ============================================ */

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.leaderboard-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.leaderboard-row:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.leaderboard-row:hover::before {
  transform: translateX(100%);
}

/* Top 3 Special Styles */
.leaderboard-row.top-1 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  position: relative;
}

.leaderboard-row.top-1::after {
  content: '👑';
  position: absolute;
  top: 0px;
  left: 4px;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

.leaderboard-row.top-2 {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px solid #9ca3af;
}

.leaderboard-row.top-3 {
  background: linear-gradient(135deg, #fef2e2 0%, #fed7aa 100%);
  border: 2px solid #d97706;
}

/* Current User Highlight */
.leaderboard-row.current-user {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid var(--success-color);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* ============================================
   RANK SECTION
   ============================================ */

.rank-section {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rank-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.rank-badge i {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
}

.rank-1 i {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: glow 2s ease-in-out infinite alternate;
}

.rank-2 i {
  color: #c0c0c0;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.rank-3 i {
  color: #cd7f32;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

.badge-label {
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rank-1 .badge-label {
  background: var(--gold-gradient);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
  padding-top: 1.5rem; /* add space for the crown above */
}

.rank-2 .badge-label {
  background: var(--silver-gradient);
  color: #374151;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-3 .badge-label {
  background: var(--bronze-gradient);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-number {
  display: flex;
  justify-content: center;
  align-items: center;
}

.position-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

/* ============================================
   USER SECTION
   ============================================ */

.user-section {
  flex: 1;
  min-width: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.username {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.you-badge {
  background: var(--success-color);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse 2s infinite;
}

.legend-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.user-stats {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   AMOUNT SECTION
   ============================================ */

.amount-section {
  flex-shrink: 0;
  text-align: right;
  min-width: 120px;
}

.amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

.progress-fill.legendary {
  background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* ============================================
   ENGAGEMENT SECTION
   ============================================ */

.engagement-section {
  padding: var(--spacing-2xl) 0;
  background: var(--bg-card);
}

.cta-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.cta-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 var(--spacing-sm) 0;
}

.cta-content p {
  font-size: 1.125rem;
  margin: 0;
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  gap: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.btn {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.btn-primary {
  background: var(--text-white);
  color: var(--primary-color);
  border-color: var(--text-white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  background: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.btn-outline-primary:hover {
  background: var(--text-white);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  to {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Styles */
@media (max-width: 1024px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-lg);
  }
  
  .user-position-card {
    width: 100%;
    max-width: 400px;
  }
  
  .stats-row {
    justify-content: center;
  }
  
  .cta-card {
    flex-direction: column;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .nav-pills .nav-link {
    margin: 0 2px;
  }
}

/* Mobile Styles *//* ============================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATION
   ============================================ */

/* Mobile Styles - COMPACT VERSION */
@media (max-width: 768px) {
  .header-title {
    font-size: 1.5rem;
  }
  
  .header-subtitle {
    font-size: 0.875rem;
  }
  
  .leaderboard-header {
    padding: var(--spacing-lg) 0;
  }
  
  .leaderboards-section {
    padding: var(--spacing-md) 0;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stats-row {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  /* CRITICAL: Compact leaderboard rows */
  .leaderboard-row {
    flex-direction: row;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
  }
  
  .leaderboard-list {
    gap: var(--spacing-xs);
  }
  
  .rank-section {
    width: 50px;
    flex-shrink: 0;
  }
  
  .user-section {
    flex: 1;
    min-width: 0;
  }
  
  .username {
    font-size: 0.875rem;
    line-height: 1.2;
    margin-bottom: 2px;
  }
  
  .user-stats {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  
  .amount-section {
    width: auto;
    text-align: right;
    flex-shrink: 0;
  }
  
  .amount {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1;
  }
  
  .progress-bar {
    width: 60px;
    height: 4px;
  }
  
  .position-badge {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
  
  .rank-badge i {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  
  .badge-label {
    font-size: 0.625rem;
    padding: 2px 6px;
  }
  
  .you-badge, .legend-badge {
    font-size: 0.625rem;
    padding: 2px 6px;
  }
  
  /* Compact card body */
  .card-body {
    padding: var(--spacing-md);
  }
  
  .card-header {
    padding: var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .header-info h3 {
    font-size: 1.125rem;
    margin-bottom: 4px;
  }
  
  .header-info p {
    font-size: 0.75rem;
  }
  
  .reset-timer, .hall-of-fame-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  
  /* Compact tabs */
  .nav-pills .nav-link {
    flex: 1;
    margin: 0 2px;
    padding: 8px 4px;
    min-height: auto;
  }
  
  .nav-pills .nav-link i {
    font-size: 1rem;
    margin-bottom: 2px;
  }
  
  .nav-pills .nav-link span {
    font-size: 0.75rem;
  }
  
  .nav-pills .nav-link small {
    font-size: 0.625rem;
  }
  
  .leaderboard-tabs {
    margin-bottom: var(--spacing-md);
  }
  
  /* Compact CTA */
  .cta-card {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
  }
  
  .cta-content h3 {
    font-size: 1.25rem;
  }
  
  .cta-content p {
    font-size: 0.875rem;
  }
  
  .cta-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-sm);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  /* Remove excessive animations on mobile */
  .leaderboard-row:hover {
    transform: none;
  }
  
  .leaderboard-row::before {
    display: none;
  }
}

/* Small Mobile Styles - EXTRA COMPACT */
@media (max-width: 480px) {
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.375rem;
    --spacing-md: 0.625rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;
    --spacing-2xl: 1.5rem;
  }
  
  .header-title {
    font-size: 1.25rem;
  }
  
  .header-subtitle {
    font-size: 0.75rem;
  }
  
  .leaderboard-header {
    padding: var(--spacing-md) 0;
  }
  
  .leaderboards-section {
    padding: var(--spacing-sm) 0;
  }
  
  /* Ultra compact rows */
  .leaderboard-row {
    padding: 6px 10px;
    gap: 8px;
  }
  
  .leaderboard-list {
    gap: 4px;
  }
  
  .rank-section {
    width: 40px;
  }
  
  .position-badge {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .rank-badge i {
    font-size: 1.25rem;
  }
  
  .badge-label {
    font-size: 0.5rem;
    padding: 1px 4px;
  }
  
  .username {
    font-size: 0.8rem;
    margin-bottom: 1px;
  }
  
  .user-stats {
    font-size: 0.65rem;
  }
  
  .amount {
    font-size: 0.875rem;
    margin-bottom: 3px;
  }
  
  .progress-bar {
    width: 50px;
    height: 3px;
  }
  
  .you-badge, .legend-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
  }
  
  .card-body {
    padding: 10px;
  }
  
  .card-header {
    padding: 10px;
  }
  
  .header-info h3 {
    font-size: 1rem;
  }
  
  .header-info p {
    font-size: 0.7rem;
  }
  
  .nav-pills .nav-link {
    padding: 6px 2px;
  }
  
  .nav-pills .nav-link i {
    font-size: 0.875rem;
  }
  
  .nav-pills .nav-link span {
    font-size: 0.7rem;
  }
  
  .nav-pills .nav-link small {
    display: none;
  }
  
  /* Top 1-3 badges minimal spacing */
  .leaderboard-row.top-1::after {
    font-size: 1.5rem;
    top: 2px;
    left: 15px;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .leaderboard-header {
    padding: var(--spacing-sm) 0;
  }
  
  .header-content {
    gap: var(--spacing-sm);
  }
  
  .user-position-card {
    display: none; /* Hide position card in landscape to save space */
  }
  
  .leaderboard-row {
    padding: 4px 8px;
  }
}
/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
