/**
 * LEADERBOARD STYLES - Unified stylesheet
 * @version 2.0.0
 * 
 * Consolidated from leaderboard.css and leaderboard-inline.css
 * - Removed duplicates
 * - Standardized values
 * - Improved organization
 */

/* ==========================================================================
   CSS VARIABLES - Single source of truth
   ========================================================================== */

:root {
  /* Layout */
  --header-height: 70px;
  --row-height: 60px;
  --row-height-mobile: 60px;
  --flag-size: 58px;
  --flag-size-mobile: 50px;
  
  /* Colors - Primary */
  --primary: #7c3aed;
  --primary-hover: #5b21b6;
  --primary-light: rgba(124, 58, 237, 0.1);
  
  /* Colors - Semantic */
  --success: #28a745;
  --warning: #ff9500;
  --error: #ff3b30;
  --info: #007aff;
  
  /* Colors - Text */
  --text-primary: #1c1c1e;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  
  /* Colors - Background */
  --bg-page: #f2f2f7;
  --bg-primary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.98);
  --bg-glass-light: rgba(255, 255, 255, 0.95);
  
  /* Colors - Border */
  --border-light: #e5e5ea;
  --border-medium: #d1d5db;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.08);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(8, 14, 26, 0.05);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #6b7280, #9ca3af);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   FONT FACES
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-v19-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-v19-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/inter-v19-latin-800.woff2') format('woff2');
}

/* ==========================================================================
   BASE RESET
   ========================================================================== */

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

/* html et body : rÃƒÂ¨gles de layout dÃƒÂ©finies dans le CSS inline de index.html */

body {
  font-family: var(--font-family);
  font-weight: 600;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
}

/* Background gradient effect */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background: 
    radial-gradient(700px 700px at 12% 18%, rgba(124, 58, 237, 0.14), transparent 62%),
    radial-gradient(800px 800px at 86% 12%, rgba(124, 58, 237, 0.18), transparent 66%),
    radial-gradient(760px 760px at 40% 88%, rgba(245, 158, 11, 0.14), transparent 64%);
  filter: blur(42px) saturate(115%);
  animation: aurora-drift 32s linear infinite;
}

@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   SKIP LINK (Accessibility)
   ========================================================================== */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transform: translateY(-200%);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  font-family: var(--font-family);
}

.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   LAYOUT - DÃƒÂ©fini dans le CSS inline de index.html
   ========================================================================== */

/* #header-container : rÃƒÂ¨gles de layout dÃƒÂ©finies dans le CSS inline de index.html */

/* ==========================================================================
   LEADERBOARD CONTAINER
   ========================================================================== */

.leaderboard-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 12px;
  contain: layout;
  transform: translateZ(0);
}

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

.lb-header-container {
  background: var(--bg-glass-light);
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin: 8px 0 26px;
  position: relative;
  z-index: 100;
}

.lb-header-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-inset);
  pointer-events: none;
}

.lb-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}

.lb-title-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.lb-logo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.3));
  flex-shrink: 0;
}

.lb-title-text h1 {
  font-size: 36px;
  font-weight: 800;
  color: #363636;
  margin: 0 0 6px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lb-title-text p {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  margin: 0;
}

.lb-stats-section {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  flex-shrink: 0;
}

.total-players {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  line-height: 1.3;
}

#lb-updated {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-soft) !important;
  opacity: 0.8;
}

/* ==========================================================================
   SEARCH SECTION
   ========================================================================== */

.lb-search-section {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 16px;
  align-items: end;
}

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

.search-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Country/Player Search Input */
.country-search-container {
  position: relative;
  --arrow-right: 16px;
}

.country-search-container:has(.clear-search.show),
.country-search-container.has-clear {
  --arrow-right: 48px;
}

.country-search-input,
.player-search-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.country-search-input:focus,
.player-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: #fff;
}

.country-search-input::placeholder,
.player-search-input::placeholder {
  color: var(--text-soft);
  font-weight: 400;
}

/* Dropdown Arrow */
.dropdown-arrow {
  position: absolute;
  right: var(--arrow-right);
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.dropdown-arrow svg {
  transition: transform var(--transition-normal);
}

.country-search-container.show .dropdown-arrow svg {
  transform: rotate(180deg);
}

/* Clear Button */
.clear-search {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  display: none;
  z-index: 3;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.clear-search.show {
  display: block;
}

.clear-search:hover {
  color: var(--error);
  transform: translateY(-50%) scale(1.1);
}

/* Country Dropdown */
.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  user-select: none;
}

.country-dropdown.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 9999;
}

.country-option {
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform 0.1s ease;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.country-option:hover,
.country-option.highlighted {
  background-color: var(--primary-light);
  transform: translateX(2px);
}

.country-option:last-child {
  border-bottom: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.country-option:first-child {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.country-separator {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.02);
  cursor: default;
  pointer-events: none;
}

/* Find My Rank Button */
.find-rank-btn {
  padding: 14px 24px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  white-space: nowrap;
}

.find-rank-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.find-rank-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   TABLE WRAPPER
   ========================================================================== */

.lb-table-wrap {
  position: relative;
  min-height: 600px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  contain: layout;
  transform: translateZ(0);
}

/* Loading Overlay */
.table-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
}

.spinner-large {
  width: 90px;
  height: 90px;
  border: 6px solid #e5e7eb;
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   TABLE STYLES
   ========================================================================== */

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-family);
}

.lb-table thead {
  background: #fff;
}

/* Column Header */
.col-header-text {
  font-size: 32px !important;
  font-weight: 800 !important;
  padding: 16px !important;
  text-align: center !important;
  color: #363636 !important;
  transition: background-color var(--transition-fast);
}

.col-header-text.clickable-header {
  cursor: pointer;
}

.col-header-text.clickable-header:hover {
  background-color: var(--primary-light);
}

/* Table Body */
#lb-body {
  min-height: 500px !important;
  contain: layout;
  will-change: contents;
}

/* Table Rows */
.lb-row {
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  overflow: visible;
  contain: layout style paint;
  transition: background-color var(--transition-fast);
}

.lb-row:hover {
  background: #f0f4ff;
}

.lb-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.lb-row.current-user {
  background-color: rgba(124, 58, 237, 0.15);
  animation: highlight-pulse 1s ease-out;
}

@keyframes highlight-pulse {
  0% { background-color: rgba(124, 58, 237, 0.3); }
  100% { background-color: rgba(124, 58, 237, 0.15); }
}

/* Table Cells */
.lb-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
}

/* Column: Rank */
.col-rank {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  text-align: center;
  padding: 12px 10px;
  color: #1e293b;
  font-size: 21px;
  font-weight: 600;
}

/* Column: User (Avatar + Name + Games) */
.col-user {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  padding: 8px 12px;
  overflow: visible;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-games {
  font-size: 14px;
  color: #64748b;
}

.privacy-lock {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.7;
}

/* Avatar */
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

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

.avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 21px;
  flex-shrink: 0;
}

/* Column: Flag (Rectangle) */
.col-flag {
  width: 65px;
  min-width: 65px;
  max-width: 65px;
  text-align: center;
  padding: 12px 4px;
}

.flag-rect {
  width: 50px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.flag-placeholder {
  font-size: 30px;
  opacity: 0.6;
}

/* Column: Value (Rating) */
.col-value {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  text-align: right;
  padding: 12px 8px;
  color: #1e293b;
  font-size: 20px;
  font-weight: 700;
}

/* Column: Date */
.col-date {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: center;
  padding: 12px 15px;
  color: #64748b;
  font-size: 16px;
}

/* Column: Visibility */
.col-visibility {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: center;
  padding: 12px 15px;
}

.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 500;
}

.visibility-badge.public {
  background: #dcfce7;
  color: #166534;
}

.visibility-badge.private {
  background: #fee2e2;
  color: #991b1b;
}

/* Skeleton Loading */
.skeleton-row {
  height: var(--row-height) !important;
  animation: pulse-skeleton 1.5s ease-in-out infinite alternate;
  contain: layout style paint;
}

@keyframes pulse-skeleton {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

body.page-ready #lb-body .skeleton-row {
  display: none !important;
}

/* ==========================================================================
   DESCRIPTION ROW
   ========================================================================== */

.lb-table-description-row {
  background: rgba(124, 58, 237, 0.05);
}

.lb-table-description {
  padding: 20px 24px;
  font-size: 14px;
  color: var(--text-secondary);
  background: rgba(124, 58, 237, 0.05);
}

.countries-description {
  line-height: 1.6;
  padding: 8px 0;
}

.countries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  line-height: 2;
}

.country-link,
.region-link {
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.country-link:hover,
.region-link:hover {
  color: var(--primary-hover);
  background-color: var(--primary-light);
  text-decoration: underline;
}

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 15px;
  color: var(--text-muted);
}

/* ==========================================================================
   ERROR STATE
   ========================================================================== */

.error-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-glass);
  border-radius: var(--radius-xl);
  margin: 20px 0;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

.error-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.lb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  margin-top: 16px;
  height: 64px;
  min-height: 64px;
}

.pagination-btn {
  padding: 10px 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 100px;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#lb-page {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 120px;
  text-align: center;
}

.lb-go {
  display: flex;
  gap: 8px;
  align-items: center;
}

#lb-goto {
  width: 100px;
  padding: 10px 12px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  outline: none;
}

#lb-goto:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

#lb-gobtn {
  padding: 10px 16px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

#lb-gobtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==========================================================================
   BUTTONS (General)
   ========================================================================== */

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  font-family: var(--font-family);
  user-select: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   MEDAL SVG
   ========================================================================== */

.medal-svg {
  display: inline-block;
  vertical-align: middle;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 768px) {
  .leaderboard-container {
    padding: 12px 8px;
  }
  
  .lb-header-container {
    padding: 20px;
    margin: 6px 0 20px;
  }
  
  .lb-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .lb-stats-section {
    text-align: left;
    width: 100%;
  }
  
  .lb-search-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .lb-logo {
    width: 60px;
    height: 60px;
  }
  
  .lb-title-text h1 {
    font-size: 28px;
  }
  
  .lb-title-text p {
    font-size: 14px;
  }
  
  .col-rank {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    font-size: 22px !important;
  }
  
  .col-flag {
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
  }
  
  .col-user {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
  }
  
  .user-name {
    font-size: 15px !important;
  }
  
  .user-games {
    font-size: 12px !important;
  }
  
  .col-value {
    width: 90px !important;
    min-width: 90px !important;
    font-size: 17px !important;
  }
  
  .flag-rect {
    width: 40px !important;
    height: 32px !important;
  }
  
  .avatar,
  .avatar-placeholder {
    width: 48px !important;
    height: 48px !important;
    font-size: 17px !important;
  }
  
  .col-date {
    width: 110px !important;
    min-width: 110px !important;
    font-size: 14px !important;
  }
  
  .col-visibility {
    width: 110px !important;
    min-width: 110px !important;
  }
  
  .visibility-badge {
    font-size: 0.85rem !important;
    padding: 4px 10px !important;
  }
  
  .medal-svg {
    width: 42px !important;
    height: 42px !important;
  }
  
  .lb-row {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
  }
  
  .lb-pagination {
    flex-wrap: wrap;
    gap: 12px;
    height: auto;
    min-height: auto;
  }
  
  .pagination-btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 480px) {
  .leaderboard-container {
    padding: 8px !important;
  }
  
  .lb-header-container {
    padding: 16px !important;
    margin: 6px 0 16px !important;
  }
  
  .lb-logo {
    width: 50px;
    height: 50px;
  }
  
  .lb-title-text h1 {
    font-size: 24px;
  }
  
  .country-search-input,
  .player-search-input,
  .find-rank-btn {
    min-height: 48px !important;
    font-size: 16px !important;
  }
  
  .col-rank {
    width: 50px !important;
    min-width: 50px !important;
    font-size: 20px !important;
  }
  
  .col-flag {
    width: 48px !important;
    min-width: 48px !important;
  }
  
  .flag-rect {
    width: 38px !important;
    height: 30px !important;
  }
  
  .col-user {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }
  
  .user-name {
    font-size: 14px !important;
  }
  
  .user-games {
    font-size: 11px !important;
  }
  
  .col-value {
    width: 80px !important;
    min-width: 80px !important;
    font-size: 15px !important;
  }
  
  .avatar,
  .avatar-placeholder {
    width: 44px !important;
    height: 44px !important;
    font-size: 15px !important;
  }
  
  .col-date {
    display: none !important;
  }
  
  .col-visibility {
    width: 90px !important;
    min-width: 90px !important;
  }
  
  .visibility-badge {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
  }
  
  .medal-svg {
    width: 38px !important;
    height: 38px !important;
  }
  
  .lb-row {
    height: 55px !important;
    min-height: 55px !important;
    max-height: 55px !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  
  .skeleton-row {
    animation: none;
    opacity: 0.8;
  }
}

@media (prefers-contrast: high) {
  .country-search-input,
  .player-search-input {
    border-width: 3px;
    border-color: #000;
  }
  
  .country-option:focus,
  .pagination-btn:focus {
    outline: 3px solid #000;
    background: #fff;
    color: #000;
  }
}

/* Focus visible */
*:focus:not(:focus-visible) {
  outline: none !important;
}

/* ==========================================================================
   RTL SUPPORT
   ========================================================================== */

.rtl-language .leaderboard-container,
.rtl-language #main-content,
.rtl-language .lb-header-container,
.rtl-language .lb-table-wrap,
.rtl-language .lb-table,
.rtl-language .lb-pagination {
  direction: ltr;
  text-align: left;
}

.rtl-language .lb-table th,
.rtl-language .lb-table td {
  text-align: left;
}

.rtl-language .col-rank {
  text-align: right;
}

.rtl-language .country-search-container,
.rtl-language .search-group {
  direction: ltr;
}

.rtl-language .search-group input {
  text-align: left;
}