/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Lexend', sans-serif;
  background-color: #080D16;
  color: #ffffff;
  font-size: 18px; /* taille de base augmentée */
}

/* Header */
header {
  background-color: #121019;
  height: 64px;
  position: fixed;
  width: 100%;
  padding-bottom: 3%;
}

#menu {
  border-bottom: thin solid #777160;
  height: 64px;
}

ul {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 64px;
  list-style: none;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  transition: color 300ms;
  font-family: 'Lexend', sans-serif;
}

a:hover {
  color: #E7B783;
}

#log {
  background-color: #E7B783;
  color: #000000;
  font-weight: bold;
  font-size: 18px;
  font-family: 'Lexend', sans-serif;
  width: 135px;
  height: 35px;
  border-radius: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main layout */
.container {
  max-width: 1400px;
  margin: auto;
  padding: 60px 30px;
  
}

.leaderboard-ranking {
  width: 35%;
}

.leaderboard-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 6%;
}

/* Cards */
.profile-card,
.ranking-card {
  background-color: #121019;
  border: thin solid #404040;
  border-radius: 16px;
  padding: 40px;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 25px;
}

.profile-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #E7B783;
}

.profile-name {
  font-size: 32px;
  color: #ffffff;
}

.profile-rank {
  font-size: 18px;
  color: #E7B783;
  font-weight: 500;
}

.progress-container {
  margin-top: 25px;
}

.level-info {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

.progress-bar {
  background-color: #404040;
  height: 18px;
  border-radius: 9px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #E7B783;
  transition: width 0.4s ease;
}

.stats-grid {
  display: flex;
  justify-content: space-between;
  margin-top: 35px;
  gap: 20px;
}

.stat-box {
  background-color: #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 26px;
  font-weight: bold;
  color: #E7B783;
}

.stat-label {
  font-size: 16px;
  color: #ffffff;
  margin-top: 8px;
}

/* Badges */
.badges-section {
  margin-top: 40px;
}

.badges-section h3 {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 16px;
}

.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.badge {
  background-color: #1a1a1a;
  border: 1px solid #404040;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #ffffff;
}

/* Activity */
.activity-section {
  margin-top: 40px;
}

.activity-section h3 {
  margin-bottom: 20px;
  font-size: 22px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  background-color: #1a1a1a;
  border: 1px solid #404040;
  border-radius: 10px;
  padding: 16px;
}

.activity-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.activity-text {
  font-size: 16px;
}

.activity-xp {
  color: #E7B783;
  font-weight: bold;
  font-size: 16px;
}

.activity-date {
  font-size: 14px;
  color: #aaa;
  padding-top: 4px; /* ← Ajout du padding demandé */
}

/* Leaderboard */
.ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  margin-bottom: 25px;
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.tab-button {
  padding: 12px 18px;
  background-color: #1a1a1a;
  border: 1px solid #404040;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 16px;
}

.tab-button.active {
  background-color: #E7B783;
  color: #000000;
}

.tab-content {
  margin-top: 12px;
}

.hidden {
  display: none;
}

.empty-state {
  text-align: center;
  padding: 40px 0;
  color: #aaa;
}

/* Icônes */
.icon,
.badge-icon,
.trophy-icon,
.empty-icon {
  color: #E7B783;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1c1a28; /* Fond légèrement plus clair que #121019 */
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.leaderboard-entry:hover {
  background-color: #252232;
  transform: translateY(-2px);
}

.leaderboard-entry .rank {
  font-weight: bold;
  font-size: 1.2rem;
  color: #E7B783; /* Or */
  min-width: 50px;
}

.leaderboard-entry .username {
  flex: 1;
  text-align: left;
  font-weight: 500;
  font-size: 1.1rem;
  color: #f0f0f0;
  margin-left: 0.6rem;
}

.leaderboard-entry .xp {
  font-weight: bold;
  color: #aaa;
  font-size: 1rem;
}


/* Responsive */
@media (max-width: 1000px) {
  .leaderboard-container {
    flex-direction: column;
    align-items: center;
  }

  .profile-card,
  .ranking-card {
    width: 90%;
  }
}
