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

/* 🚀 Global Reset & Custom Properties for a Futuristic Aesthetic */
:root {
  --primary-bg: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  --secondary-bg: rgba(255, 255, 255, 0.05);
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.2);
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  --hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
  --font-color: #e0e0e0;
  --accent-color: #ffd700;
  --transition-speed: 0.3s;
}

.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 9;
}

/* 🌌 Body Styling: A Visionary, Immersive Backdrop */
body {
  font-family: 'Roboto', sans-serif;
  background: var(--primary-bg);
  color: var(--font-color);
}

/* 🗂 Container Styles for Stats and Leaderboard Cards */
.all-content {
  line-height: 1.6;
  margin: .7em 1em 5em;
}

#stats-container,
#users-container {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}


.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 60%;
  object-fit: cover;
  margin-right: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* 📊 User Statistics Sections */
.user-info,
.user-stats,
.database-stats {
  margin-bottom: 1.5rem;
}

.user-info p,
.user-stats p,
.database-stats p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

/* 🏆 Leaderboard Title: Bold and Commanding */
.users-title {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  color: var(--font-color);
}

/* 📈 Leaderboard Grid System: Future-Proof, Responsive Layout */
.users-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* 🌟 User Row Card: Sleek, Dynamic, and Ready for Tomorrow */
.user-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background: var(--secondary-bg);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

/* 🔲 Image Placeholder: Set the Stage for Future Profile Pics */
/* .user-row::before {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  background: url('https://via.placeholder.com/50/cccccc/ffffff?text=IMG') center/cover no-repeat;
  border-radius: 50%;
  margin-right: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
} */

/* 💫 Hover Effects: Dynamic Interaction for a Next-Gen Experience */
.user-row:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* 🔠 Text Styling for Rank, Name, and Points */
.user-rank {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  padding-right: 0.5rem;
}

.user-name {
  word-break: break-all;
  font-size: 1rem;
  font-weight: 500;
  padding: 0 0.5rem;
}

.user-points {
  font-size: 0.9rem;
  text-align: right;
  color: var(--accent-color);
}

/* 📱 Responsive Adjustments for Mobile-First Design */
@media (max-width: 480px) {
  .users-table {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 1.5rem;
  }


  .user-row {
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
  }

  .user-row::before {
    grid-row: 1 / 3;
    margin-right: 0.75rem;
  }

  .user-points {
    grid-column: 2;
    text-align: left;
    margin-top: 0.5rem;
  }
}