:root {
  /* Color Palette - Premium Dark Theme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-glass: rgba(20, 20, 20, 0.7);
  --bg-glass-hover: rgba(40, 40, 40, 0.8);
  
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  
  --accent-color: #e50914; /* Netflix Red vibe */
  --accent-hover: #b81d24;
  
  --steam-color: #171a21;
  --steam-blue: #66c0f4;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  
  /* Borders & Shadows */
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --glow-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-section {
  padding: 4rem 0;
  padding-top: 100px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

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

.animate-fade-in {
  animation: fadeIn var(--transition-slow) forwards;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Modals (Popups) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal .close:hover {
  opacity: 1;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 4%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 1000;
  transition: background var(--transition-normal);
  backdrop-filter: blur(5px);
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: 3rem;
  align-items: center;
  flex: 1; /* Pousse les éléments restants */
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.auth-container {
  margin-left: auto; /* Pousse la connexion tout à droite */
}

.mobile-menu-btn {
  display: none;
}

/* Discord Profile Styles */
.discord-color {
  color: #5865F2;
}

.discord-profile-card {
  background-color: #2b2d31;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  max-width: 600px;
  position: relative;
  font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.discord-banner {
  height: 120px;
  background-color: #5865F2; /* Default color if no banner */
  background-size: cover;
  background-position: center;
}

.discord-avatar-wrapper {
  position: absolute;
  top: 76px;
  left: 22px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #2b2d31;
  display: flex;
  justify-content: center;
  align-items: center;
}

.discord-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
}

.discord-badges-container {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  min-height: 48px;
  background-color: #2b2d31;
}

.discord-badges {
  background-color: #111214;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  gap: 4px;
}

.discord-badge {
  width: 22px;
  height: 22px;
}

.discord-user-info {
  background-color: #111214;
  margin: 16px 22px 22px 22px;
  padding: 16px;
  border-radius: 8px;
}

.discord-username {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f2f3f5;
  margin-bottom: 2px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #5865F2;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s;
}

.discord-btn:hover {
  background-color: #4752c4;
}

/* Status Indicator */
.discord-status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #80848e; /* Offline by default */
  border: 5px solid #2b2d31; /* Match avatar wrapper bg */
  transition: background-color 0.3s, border-radius 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Online */
.discord-status-indicator.online {
  background-color: #23a559;
}

/* Idle (Moon) */
.discord-status-indicator.idle {
  background-color: transparent;
  border-radius: 50%;
  box-shadow: -6px -6px 0 0 #f0b132 inset;
}
.discord-status-indicator.idle::after {
  content: ""; /* Just to make sure the shape holds */
}

/* Do Not Disturb (Minus sign) */
.discord-status-indicator.dnd {
  background-color: #f23f42;
}
.discord-status-indicator.dnd::after {
  content: "";
  width: 14px;
  height: 4px;
  background-color: #2b2d31;
  border-radius: 2px;
}

/* Offline (Hole) */
.discord-status-indicator.offline {
  background-color: #80848e;
}
.discord-status-indicator.offline::after {
  content: "";
  width: 10px;
  height: 10px;
  background-color: #2b2d31;
  border-radius: 50%;
}

/* Activity Block */
.discord-activity {
  background-color: #111214;
  margin: 0 22px 22px 22px;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.activity-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}
.activity-info h4 {
  color: #f2f3f5;
  margin: 0 0 4px 0;
  font-size: 1rem;
}
.activity-info p {
  color: #b5bac1;
  margin: 0;
  font-size: 0.85rem;
}

/* ==================================
   RESPONSIVE DESIGN (MOBILE-FIRST)
   ================================== */
@media screen and (max-width: 900px) {
  /* Navbar Mobile */
  .mobile-menu-btn {
    display: block;
    margin-left: auto;
    z-index: 1001;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding-top: 80px;
    margin-left: 0;
    align-items: flex-start;
    padding-left: 20px;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255,255,255,0.1);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .auth-container {
    margin-left: 0;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 90%;
  }
  
  .auth-container > div {
    border-left: none !important;
    padding-left: 0 !important;
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .search-container {
    padding: 0;
    width: 90%;
    margin: 10px 0 20px 0;
    justify-content: flex-start;
  }
  
  .search-form {
    max-width: 100%;
    margin: 0 !important;
  }
  
  .nav-link {
    padding: 10px 0;
    font-size: 1.2rem;
  }

  /* Grid Layouts */
  .container {
    padding: 0 1rem;
  }
  
  .games-grid {
    grid-template-columns: 1fr !important; /* 1 carte par ligne sur tel */
  }
  
  /* Accueil - Steam & Discord side by side */
  div[style*="display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr))"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem !important;
  }
  
  .discord-profile-card {
    max-width: 100%;
  }
}

/* Admin Input Styles */
.admin-input-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.admin-input-group label { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 600; }
.admin-input { width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.4); color: #fff; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; font-family: var(--font-main); transition: all 0.2s; }
.admin-input:focus { border-color: #fbbf24; outline: none; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1); }
.admin-btn-icon { padding: 8px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 1.2rem; background: transparent; color: white; border: none; cursor: pointer; }
.admin-btn-icon:hover { transform: scale(1.1); }

/* Search Bar */
.search-container { flex: 1; display: flex; justify-content: center; padding: 0 20px; }
.search-form { display: flex; width: 100%; max-width: 400px; position: relative; align-items: center; }
.search-input { width: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 8px 16px 8px 40px; color: #fff; font-size: 0.9rem; outline: none; transition: all 0.3s; }
.search-input:focus { background: rgba(255,255,255,0.15); border-color: var(--accent-color); box-shadow: 0 0 10px rgba(229, 9, 20, 0.3); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #aaa; width: 16px; height: 16px; pointer-events: none; }
