/* ==========================================================================
   STYLE GLOBAL & VARIABLES (THÈME XBOX OFFICIEL)
   ========================================================================== */
:root {
  --bg-principal: #0b0c0d;
  --bg-card: #111214;
  --accent-gaming: #107C10;
  --accent-hover: #199e19;
  --text-main: #f2f2f2;
  --text-muted: #91969c;
  --border-color: #202225;
  --font-stack: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
  font-family: var(--font-stack);
  background-color: var(--bg-principal);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  background-image: radial-gradient(circle at top center, #161a1d 0%, #0b0c0d 100%);
}

/* ==========================================================================
   BARRE SUPÉRIEURE (TOP BAR)
   ========================================================================== */
.top-bar {
  background-color: rgba(17, 18, 20, 0.95);
  border-bottom: 2px solid var(--accent-gaming);
  padding: 14px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.top-bar .nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.top-bar .nav-links {
  display: flex; 
  align-items: center; 
  gap: 20px;
}

.top-bar .nav-item {
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.1s ease;
}

.top-bar .nav-item:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

.top-bar .nav-item:active {
  transform: translateY(0);
}

.top-bar .nav-item:not(.nav-gold):not(.nav-green):hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(25, 158, 25, 0.4);
}

.top-bar .nav-gold {
  color: #ffd700;
}

.top-bar .nav-gold:hover {
  color: #fff099;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.top-bar .nav-green {
  color: var(--accent-gaming);
}

.top-bar .nav-green:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 10px rgba(25, 158, 25, 0.5);
}

.top-bar .user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar .user-status {
  color: var(--text-main);
}

.top-bar .user-status strong {
  color: var(--accent-hover);
}

.top-bar .user-status.guest {
  color: var(--text-muted);
  font-style: italic;
}

.top-bar .user-info a {
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}

.top-bar .btn-logout {
  color: var(--text-muted);
  font-size: 13px;
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.top-bar .btn-logout:hover {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
  border-color: #ff4d4d;
}

.top-bar .btn-login {
  color: var(--text-main);
  font-size: 13px;
  border: 1px solid var(--accent-gaming);
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(16, 124, 16, 0.1);
}

.top-bar .btn-login:hover {
  color: #ffffff;
  background: var(--accent-gaming);
  box-shadow: 0 0 10px rgba(16, 124, 16, 0.4);
}

.top-bar .btn-register {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 4px;
}

.top-bar .btn-register:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* ==========================================================================
   STRUCTURE & LAYOUT
   ========================================================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

header,
.game-header {
  margin-bottom: 35px;
  border-left: 5px solid var(--accent-gaming);
  padding-left: 20px;
}

header h1,
.game-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.4rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

header p,
.game-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

.game-layout {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

/* ==========================================================================
   COMPOSANTS : GRILLE & CARTES DE JEUX
   ========================================================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.game-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-hover);
  box-shadow: 0 10px 25px rgba(16, 124, 16, 0.15);
}

.game-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  color: #ffffff;
}

.game-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.game-meta {
  font-size: 0.8rem;
  color: var(--accent-hover);
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

/* ==========================================================================
   COMPOSANTS : AREA JEU & IFRAME
   ========================================================================== */
.game-area {
  flex: 3;
  min-width: 600px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.iframe-wrapper {
  width: 100%;
  max-width: 800px;
  background: #000000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 2px solid #1e2024;
}

iframe {
  border: none;
  width: 100%;
  height: 480px;
  display: block;
}

/* ==========================================================================
   COMPOSANTS : LEADERBOARD / TABLEAUX
   ========================================================================== */
.sidebar {
  flex: 1;
  min-width: 320px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  height: fit-content;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.sidebar h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #ffffff;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
}

th {
  background-color: rgba(255, 255, 255, 0.01);
  color: var(--accent-hover);
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

td {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.rank-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
  background-color: #202225;
  color: var(--text-main);
}

tr:nth-child(1) .rank-badge {
  background-color: #ffd700;
  color: #000;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

tr:nth-child(2) .rank-badge {
  background-color: #c0c0c0;
  color: #000;
}

tr:nth-child(3) .rank-badge {
  background-color: #cd7f32;
  color: #000;
}

/* ==========================================================================
   BOUTONS D'ACTION
   ========================================================================== */
.btn-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  align-items: center;
}

.btn-play,
.btn-fav {
  flex: 0.5;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-play {
  background: var(--accent-gaming);
  color: #ffffff;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  border: 1px solid var(--accent-gaming);
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(16, 124, 16, 0.1);
}

.btn-play:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 12px rgba(25, 158, 25, 0.4);
}

.btn-fav {
  background: #202225;
  color: #ff4d4d;
  border: 1px solid var(--border-color);
}

.btn-fav:hover {
  background: #2a2d32;
  border-color: #ff4d4d;
}

/* ==========================================================================
   FORMULAIRES D'AUTHENTIFICATION
   ========================================================================== */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-box {
  background: var(--bg-card);
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 350px;
  border: 1px solid var(--border-color);
}

.auth-box h2 {
  color: var(--accent-hover);
  margin: 0 0 20px 0;
  font-size: 1.6rem;
}

.auth-box label {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--text-muted);
}

.auth-box input[type="text"],
.auth-box input[type="password"] {
  width: 100%;
  padding: 11px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  background: #16171a;
  color: #ffffff;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, background-color 0.2s;
}

.auth-box input:focus {
  outline: none;
  border-color: var(--accent-gaming);
  background: #1c1d22;
}

.auth-box button {
  width: 100%;
  padding: 12px;
  background: var(--accent-gaming);
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.auth-box button:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 10px rgba(25, 158, 25, 0.4);
}

.error,
.success,
.no-games,
.no-score {
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.error {
  background: rgba(220, 53, 69, 0.15);
  color: #ea868f;
  border: 1px solid #842029;
}

.success {
  margin-bottom: 25px;
  text-align: left;
  padding: 15px 20px;
  font-size: 16px;
  background: #189c18;
  border-left: 5px solid #189c18;
}

.no-games {
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.no-score {
  font-style: italic;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .game-layout {
    flex-direction: column;
  }

  .game-area {
    min-width: 100%;
    flex: 1;
  }

  .top-bar {
    padding: 12px 20px;
  }
}

.game-title-flex {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 10px 0;
}

.game-title-flex img {
  display: block;
  max-height: 48px;
  width: auto;
  border-radius: 6px;
}

/* ==========================================================================
   BLOC ACTIVITÉ RÉCENTE
   ========================================================================== */
.recent-scores-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.recent-scores-box h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.recent-scores-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, #222);
}

.recent-score-item:hover {
  background: #1e1f24;
}

.recent-score-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-game-gif {
  width: 50px; 
  height: 50px; 
  object-fit: contain; 
  border-radius: 6px; 
  background: #111; 
  border: 1px solid var(--border-color, #333); 
  flex-shrink: 0;
}

.recent-score-text {
  font-size: 14px;
  color: var(--text-muted);
}

.recent-score-text strong {
  color: #ffffff;
}

.recent-score-text a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
}

.recent-score-text a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.recent-score-val {
    display: flex;
    align-items: center;
    padding-right: 15px;
    min-width: 120px;
    justify-content: flex-end;
}

.no-activity {
  font-style: italic;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 10px 0;
}

/* ==========================================================================
   WIDGETS COMPTEURS ET STATS
   ========================================================================== */
.dashboard-widgets {
  display: flex;
  gap: 25px;
  margin-bottom: 35px;
  width: 100%;
}

.widget-box {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.widget-box h3 {
  margin: 0 0 15px 0;
  font-size: 15px;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-widget-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  flex-grow: 1;
}

.stat-widget-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #16171a;
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  border-radius: 6px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.stat-count {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
}

@media (max-width: 768px) {
  .dashboard-widgets {
    flex-direction: column;
    gap: 20px;
  }
}

.profile-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.tab-btn {
  background: #16171a;
  color: var(--text-muted);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: bold;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #202225;
  color: #ffffff;
}

.tab-btn.active {
  background: var(--accent-gaming);
  color: #ffffff;
  border-color: var(--accent-gaming);
  box-shadow: 0 0 8px rgba(16, 124, 16, 0.4);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ffffff;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 10px;
  background: #16171a;
  border: 1px solid var(--border-color);
  color: #ffffff;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-gaming);
  outline: none;
}

.btn-submit {
  background: var(--accent-gaming);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 10px rgba(25, 158, 25, 0.4);
}

.alert {
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background: rgba(25, 135, 84, 0.15);
  color: #75b798;
  border: 1px solid #0f5132;
}

.alert-error {
  background: rgba(220, 53, 69, 0.15);
  color: #ea868f;
  border: 1px solid #842029;
}

/* ==========================================================================
   BADGES & CATÉGORIES
   ========================================================================== */
.categories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  background: #16171a;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.category-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.category-badge:hover {
  background: var(--accent-gaming);
  border-color: var(--accent-gaming);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 124, 16, 0.3);
}

.category-badge.active {
  background: var(--accent-gaming);
  border-color: var(--accent-gaming);
  color: #fff;
  box-shadow: 0 0 8px rgba(16, 124, 16, 0.4);
}

.game-table-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 2px;
  border-radius: 4px;
}

.cat-tag {
  padding: 4px 8px;
  background: #202225;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 25px;
  margin-bottom: 15px;
}

.pagination a,
.pagination span {
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  background: #16171a;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.pagination a:hover {
  background: var(--accent-gaming);
  border-color: var(--accent-gaming);
  color: #ffffff;
}

.pagination .active {
  background: var(--accent-gaming);
  border-color: var(--accent-gaming);
  color: #ffffff;
  cursor: default;
}

.pagination .disabled {
  background: #0b0c0d;
  color: #495057;
  border-color: var(--border-color);
  cursor: not-allowed;
}

/* ==========================================================================
   CONTRÔLES JEU / FULLSCREEN
   ========================================================================== */
.game-controls {
  margin-top: 15px;
  text-align: center;
}

.fullscreen-btn {
  background-color: var(--accent-gaming);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.fullscreen-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 10px rgba(25, 158, 25, 0.4);
}

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

.iframe-wrapper:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.iframe-wrapper:fullscreen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   DROPDOWN MENU
   ========================================================================== */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.dropdown-btn {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-weight: bold;
  padding: 0;
  transition: color 0.2s ease, transform 0.1s ease;
}

.dropdown:hover .dropdown-btn {
  transform: translateY(-1px);
  color: #ffffff;
}

.dropdown .arrow {
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background-color: var(--bg-card);
  min-width: 240px;
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  z-index: 10000;
  padding: 6px 0;
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 15px;
  background: transparent;
}

.dropdown-content a {
  padding: 10px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  color: var(--text-main);
  transition: background-color 0.2s;
}

.dropdown-content a.nav-gold {
  color: #ffd700;
}

.dropdown-content a.nav-green {
  color: var(--accent-hover);
}

.dropdown-content a:hover {
  background-color: #16171a;
  color: #ffffff;
}

.dropdown-content a.nav-gold:hover {
  color: #fff099;
}

.dropdown-content a.nav-green:hover {
  color: var(--accent-hover);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropdown-btn .arrow {
  transform: rotate(180deg);
}

/* ==========================================================================
   SHOUTBOX (CHATBOX)
   ========================================================================== */
.shoutbox-chat {
  background: #16171a;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  height: 200px;
  overflow-y: auto;
  padding: 10px;
  font-family: monospace;
  font-size: 0.95em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shoutbox-chat::-webkit-scrollbar {
  width: 6px;
}

.shoutbox-chat::-webkit-scrollbar-track {
  background: #111214;
}

.shoutbox-chat::-webkit-scrollbar-thumb {
  background: #202225;
  border-radius: 4px;
}

.shoutbox-chat::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gaming);
}

.shout-msg {
  line-height: 1.4;
  word-break: break-word;
  display: flex;
}

.shout-time {
  color: var(--text-muted);
  font-size: 0.85em;
  flex: 0 0 100px;
}

.shout-user {
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  flex: 0 0 100px;
}

.shout-user:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.shout-text {
  color: var(--text-main);
}

.shoutbox-form-container {
  margin-top: 10px;
}

#shoutbox-form {
  display: flex;
  gap: 8px;
}

#shout-message {
  flex: 1;
  background: #16171a;
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
}

#shout-message:focus {
  border-color: var(--accent-gaming);
  outline: none;
}

#shoutbox-form button {
  background: var(--accent-gaming);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#shoutbox-form button:hover {
  background: var(--accent-hover);
}

#shoutbox-emoji-btn {
  background: #16171a;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 1.1em;
}

#shoutbox-emoji-btn:hover {
  background: #202225;
}

.shoutbox-emoji-picker {
  display: none;
  position: absolute;
  bottom: 45px;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 100;
  box-sizing: border-box;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  text-align: center;
}

.emoji-grid span {
  font-size: 1.35em;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease;
  display: inline-block;
  padding: 4px;
  border-radius: 4px;
}

.emoji-grid span:hover {
  transform: scale(1.3);
  background: #16171a;
}

.shoutbox-guest-nag {
  background: #16171a;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  border: 1px dashed var(--border-color);
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ==========================================================================
   STATISTIQUES GLOBALES
   ========================================================================== */
.stats-summary-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 15px;
  padding: 10px 0;
}

.stat-summary-box {
  text-align: center;
  flex: 1;
  min-width: 100px;
  background-color: #16171a;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.stat-summary-box.stat-highlight {
  border-color: var(--accent-gaming);
}

.stat-icon {
  font-size: 1.8em;
  margin-bottom: 5px;
}

.stat-value {
  font-weight: bold;
  font-size: 1.2em;
  color: #ffffff;
}

.stat-highlight .stat-value {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(25, 158, 25, 0.3);
}

.stat-label {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 3px;
}

#shoutbox-sound-lbl {
  background-color: #16171a;
  border: 1px solid var(--accent-gaming);
  color: var(--accent-hover);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

#shoutbox-sound-chk {
  cursor: pointer;
  margin: 0;
}

.form-select {
  width: 100%;
  padding: 10px;
  background-color: #16171a;
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box;
}

/* ==========================================================================
   MÉDAILLES ET CLASSEMENTS PROFIL
   ========================================================================== */
.rank-stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 15px;
  padding: 10px 0;
}

.rank-stat-box {
  text-align: center;
  flex: 1;
  min-width: 100px;
  background: #16171a;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.rank-val {
  font-weight: bold;
  font-size: 1.2em;
}

.rank-1st {
  color: #ffd700;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.rank-2nd {
  color: #c0c0c0;
}

.rank-3rd {
  color: #cd7f32;
}

.rank-top10 {
  color: var(--accent-hover);
}

.rank-label {
  font-size: 0.85em;
  color: var(--text-muted);
}

/* ==========================================================================
   FORMULAIRE ÉDITION PROFIL
   ========================================================================== */
.profile-edit-form {
  max-width: 500px;
}

.form-group-avatar {
  margin-bottom: 25px;
}

.avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #16171a;
  border: 2px solid var(--border-color);
}

.file-input {
  color: var(--text-main);
}

.form-hint {
  color: var(--text-muted);
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
}

.form-control {
  width: 100%;
  padding: 10px;
  background-color: #16171a;
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box;
}

.form-control:disabled {
  background-color: #0b0c0d;
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: #16171a;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  margin-top: 5px;
  padding: 20px 0;
  font-family: sans-serif;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  text-align: center;
}

.footer-brand {
  font-size: 14px;
  margin-bottom: 12px;
  color: #ffffff;
}

.footer-divider {
  border-top: 1px solid var(--border-color);
  max-width: 800px;
  margin: 0 auto 12px auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.footer-left {
  text-align: left;
}

.footer-right {
  text-align: right;
  font-family: monospace;
  color: #495057;
}

/* ==========================================================================
   PAGE PROFIL COHÉRENTE
   ========================================================================== */
.profile-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.profile-avatar-big {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-gaming);
  background-color: #16171a;
  box-shadow: 0 4px 15px rgba(16, 124, 16, 0.2);
  transition: transform 0.2s ease;
}

.profile-avatar-big:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   NOTIFICATIONS & MESSAGERIE (CLEAN DARK)
   ========================================================================== */
.notifications-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
  box-sizing: border-box;
}

.notifications-list::-webkit-scrollbar {
  width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
  background: #111214;
}

.notifications-list::-webkit-scrollbar-thumb {
  background: #202225;
  border-radius: 4px;
}

.mail-tabs {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  padding: 0 10px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  gap: 5px;
}

.mail-tab-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
}

.mail-tab-item:hover {
  color: #ffffff;
  background-color: #16171a;
}

.mail-tab-item.active {
  color: var(--accent-hover);
  background-color: #16171a;
  border-bottom: 2px solid var(--accent-gaming);
}

.mail-tab-badge {
  background-color: #dc3545;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mail-header {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mail-header-subject {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  word-break: break-word;
}

.mail-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.mail-header-info {
  font-size: 14px;
  color: var(--text-muted);
}

.mail-header-author {
  font-weight: bold;
  color: var(--accent-hover);
}

.mail-header-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-action {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 20px;
  background-color: #16171a;
  color: #ffffff;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background-color: #202225;
  border-color: var(--accent-gaming);
}

.btn-delete {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 20px;
  background-color: rgba(220, 53, 69, 0.1);
  color: #ea868f;
  border: 1px solid #842029;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background-color: #dc3545;
  color: #ffffff;
  border-color: #dc3545;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.4);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 15px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-link:hover {
  color: #ffffff;
  background-color: #16171a;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border-left: 4px solid #495057;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  width: 100%;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.notification-item:hover {
  background-color: #16171a;
  transform: translateX(2px);
}

.notification-content {
  flex: 1;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.4;
}

.notification-author {
  font-weight: bold;
  color: var(--accent-hover);
  margin-right: 8px;
}

.notification-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 15px;
}

.notification-item.success {
  border-left-color: var(--accent-gaming);
}

.notification-item.danger {
  border-left-color: #dc3545;
}

.notification-item.info {
  border-left-color: #0dcaf0;
}

/* ==========================================================================
   WIDGET : JOUEURS EN LIGNE (XBOX STYLE)
   ========================================================================== */
.online-widget-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.online-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 5px;
}

.online-widget-header h3 {
  margin: 0;
  font-size: 15px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: var(--accent-hover);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px var(--accent-hover);
  animation: pulse-online 2s infinite ease-in-out;
}

@keyframes pulse-online {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 0.5;
  }
}

.online-badge-count {
  background-color: #202225;
  color: var(--text-main);
  font-size: 12px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-family: monospace;
}

.online-user-item {
  background: #16171a;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s ease-in-out;
}

.online-user-item:hover {
  background-color: #202225;
  border-color: var(--accent-gaming);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 124, 16, 0.2);
}

.online-user-item:hover .online-username {
  color: #ffffff;
}

.online-user-item:hover .online-avatar-mini {
  border-color: var(--accent-hover);
}

.no-online {
  text-align: center;
  padding: 10px 0;
  margin: 0;
}

.main-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin-top: 30px;
}

.user-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gaming, #107c10);
  vertical-align: middle;
}

.td-gaming {
  color: var(--accent-gaming);
  font-weight: bold;
}

.td-muted {
  font-size: 14px;
  opacity: 0.8;
}

.text-center {
  text-align: center;
}

.medal {
  font-size: 1.2rem;
  cursor: help;
  display: inline-block;
  transition: transform 0.2s ease;
}

.medal:hover {
  transform: scale(1.2) rotate(5deg);
}

.th-small-center {
  text-align: center;
  width: 100px;
}

.th-numeric {
  text-align: right;
  padding-right: 20px;
}

.username-highlight {
  font-size: 16px;
  transition: color 0.2s ease;
  vertical-align: middle;
}

.username-highlight:hover {
  color: var(--accent-gaming);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.player-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color, #444);
  background: #222;
}

.rank-display {
  font-size: 16px;
  font-weight: bold;
}

.medal {
  font-size: 20px;
}

.podium-col {
  text-align: center;
  font-weight: bold;
  width: 60px;
}

.podium-count-1 {
  color: #f1c40f;
}

.podium-count-2 {
  color: #b2bec3;
}

.podium-count-3 {
  color: #e67e22;
}
.td-score-gold {
    text-align: center;
    color: #ffd700; /* Couleur Or */
    font-weight: bold;
    font-size: 16px;
}
.custom-link {
    color: var(--text-main);
    text-decoration: none;
}
.flex-align-center {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* --- BLOC DÉFI DU JOUR --- */
.defi-box {
    background: linear-gradient(135deg, #2b2b2b, #1a1a1a);
    border: 2px solid var(--accent-gaming);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.2);
}

.defi-title {
    color: var(--accent-gaming);
    margin-top: 0;
    text-transform: uppercase;
    font-size: 18px;
}

.defi-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.defi-thumb {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    border: 1px solid #444;
}

.defi-details {
    text-align: left;
}

.defi-game-name {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}

.defi-leader {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #ccc;
}

.defi-leader-name {
    color: #fff;
    font-weight: bold;
}

.defi-countdown-box {
    background: #000;
    color: var(--accent-gaming);
    padding: 8px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}
