/* Reset & base */
* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  min-height: 100vh;
}
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: #EAF0FF;
  background: radial-gradient(1200px 800px at 20% 10%, rgba(132, 56, 255, 0.35), transparent 60%),
              radial-gradient(900px 700px at 80% 20%, rgba(0, 220, 255, 0.25), transparent 60%),
              radial-gradient(1000px 700px at 60% 80%, rgba(255, 75, 180, 0.25), transparent 60%),
              #0B0E1A;
  background-attachment: fixed;
  background-size: cover;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Contrôle de la musique de fond */
.music-control {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.music-btn {
  width: 48px;
  height: 48px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, rgba(19, 24, 48, 0.95), rgba(14, 18, 36, 0.95)) padding-box,
              linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5) border-box;
  color: #8AB4FF;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.music-btn:hover {
  background: linear-gradient(135deg, rgba(138, 180, 255, 0.25), rgba(107, 140, 255, 0.25));
  color: #EAF0FF;
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(138, 180, 255, 0.4);
  border-color: rgba(138, 180, 255, 0.6);
}

.music-btn:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

.music-btn.playing {
  background: linear-gradient(135deg, rgba(138, 180, 255, 0.4), rgba(107, 140, 255, 0.4));
  color: #EAF0FF;
  box-shadow: 0 8px 25px rgba(138, 180, 255, 0.6);
}

.music-icon {
  transition: all 0.3s ease;
}

.music-btn:hover .music-icon {
  transform: scale(1.1);
}

.volume-control {
  display: flex; /* Contrôle du volume réactivé */
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.music-control:hover .volume-control {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Toujours afficher le contrôle du volume au survol */
.music-control:hover .volume-control {
  opacity: 1 !important;
  pointer-events: all !important;
}

.volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(120, 128, 180, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #8AB4FF, #6070A0);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(138, 180, 255, 0.4);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #8AB4FF, #6070A0);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.volume-value {
  font-size: 12px;
  color: #8AB4FF;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(138, 180, 180, 0.3);
  background: rgba(19, 24, 48, 0.8);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(rgba(19, 24, 48, 0.8), rgba(19, 24, 48, 0.8)) padding-box,
              linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5) border-box;
  backdrop-filter: blur(10px);
}

/* Nebula starfield */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
}
.nebula-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.08) 0, rgba(255,255,255,0) 40%),
              radial-gradient(circle at 30% 70%, rgba(255,255,255,0.06) 0, rgba(255,255,255,0) 45%);
  pointer-events: none;
  z-index: -1;
  backdrop-filter: blur(0.3px) saturate(1.05);
}

.site-header {
  text-align: center;
  padding: 48px 16px 12px;
}
.topbar { position: absolute; top: 12px; right: 16px; display:flex; gap:10px; }
.title {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #c084fc, #60a5fa, #22d3ee, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { opacity: 0.85; margin: 0; }

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 16px; 
  min-height: 100vh;
  position: relative;
  z-index: 1;
}







.status { min-height: 22px; margin-top: 8px; font-size: 14px; opacity: 0.9; }


.profile {
  margin-top: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 96px;
  align-items: start;
  background: linear-gradient(180deg, rgba(19, 24, 48, 0.62), rgba(14, 18, 36, 0.62));
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 16px;
  position: relative;
}

.profile::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5);
  border-radius: 16px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
  z-index: -1;
}
.profile .avatar { 
  width: 96px; 
  height: 96px; 
  border-radius: 50%; 
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5) border-box;
  order: 2;
  justify-self: end;
  align-self: start;
}
.profile .meta { 
  display: grid; 
  gap: 6px;
  order: 1;
}
.profile .name { font-size: 22px; font-weight: 700; }
.profile .line { opacity: 0.85; font-size: 14px; margin: 4px 0; }


.games { margin-top: 22px; }
.games-header { 
  display: flex; 
  flex-direction: column;
  gap: 15px; 
  margin-bottom: 20px; 
  padding: 20px;
  background: rgba(19, 24, 48, 0.6);
  border: 2px solid transparent;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  position: relative;
}

.games-header::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5);
  border-radius: 12px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
  z-index: -1;
}

.games-header h2 {
  margin: 0;
  color: #8ab4ff;
  text-align: center;
  font-size: 1.5rem;
  text-shadow: 0 0 15px rgba(138, 180, 255, 0.3);
}
.games-header h2 { margin: 0; }
.controls { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px; 
  align-items: end;
}

.search-section,
.sort-section,
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-section label,
.sort-section label,
.filter-section label {
  font-size: 0.85rem;
  color: #EAF0FF;
  opacity: 0.8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.controls input, 
.controls select { 
  padding: 12px 16px; 
  border-radius: 10px; 
  border: 1px solid #e91e63;
  background: rgba(19, 24, 48, 0.8);
  color: #EAF0FF; 
  font-size: 0.9rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.controls input:focus, 
.controls select:focus { 
  outline: none; 
  border-color: #8ab4ff; 
  box-shadow: 0 0 15px rgba(138, 180, 255, 0.2);
  transform: translateY(-1px);
}

.controls input::placeholder {
  color: rgba(234, 240, 255, 0.5);
  font-style: italic;
}

.controls select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238ab4ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* ===== INDICATEUR DE RÉSULTATS ===== */
.results-indicator {
  margin-bottom: 15px;
  padding: 12px 16px;
  background: rgba(19, 24, 48, 0.6);
  border: 1px solid #e91e63;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  text-align: center;
}

.results-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.results-count {
  color: #8ab4ff;
  font-weight: 600;
  font-size: 1rem;
}

.results-total {
  color: #EAF0FF;
  opacity: 0.7;
  font-size: 0.9rem;
}

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.game-card {
  background: linear-gradient(180deg, rgba(13, 17, 34, 0.75), rgba(9, 12, 24, 0.75));
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5);
  border-radius: 12px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
  z-index: -1;
}
.game-card:hover { 
  transform: translateY(-4px) rotate(2deg); 
  box-shadow: 0 12px 30px rgba(138, 180, 255, 0.3);
  border-color: rgba(138, 180, 255, 0.4);
  background: linear-gradient(180deg, rgba(19, 24, 48, 0.8), rgba(14, 18, 36, 0.8));
}

.game-card:active {
  transform: translateY(-2px) rotate(1deg);
  transition: all 0.1s ease;
}
.game-art { 
  width: 100%; 
  height: 100px; 
  object-fit: cover; 
  background: rgba(255,255,255,0.06); 
  transition: all 0.3s ease;
}

.game-card:hover .game-art {
  filter: brightness(1.1) contrast(1.05);
  transform: scale(1.02);
}
.game-body { padding: 10px; display: grid; gap: 6px; }
.game-title { 
  font-size: 14px; 
  font-weight: 600; 
  transition: color 0.3s ease;
}

.game-sub { 
  font-size: 12px; 
  opacity: 0.8; 
  transition: opacity 0.3s ease;
}

.game-card:hover .game-title {
  color: #8ab4ff;
}

.game-card:hover .game-sub {
  opacity: 1;
}

/* ===== BADGES DE STATUT DES SUCCÈS ===== */
.achievement-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-left: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.achievement-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.achievement-status:hover::before {
  left: 100%;
}

.achievement-status.unlocked {
  background: linear-gradient(135deg, rgba(180, 255, 180, 0.25), rgba(120, 255, 120, 0.25));
  color: #b4ffb4;
  border: 1px solid rgba(180, 255, 180, 0.4);
  box-shadow: 0 2px 8px rgba(180, 255, 180, 0.2);
}

.achievement-status.unlocked:hover {
  background: linear-gradient(135deg, rgba(180, 255, 180, 0.35), rgba(120, 255, 120, 0.35));
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 15px rgba(180, 255, 180, 0.3);
  border-color: rgba(180, 255, 180, 0.6);
}

.achievement-status.locked {
  background: linear-gradient(135deg, rgba(255, 180, 180, 0.25), rgba(255, 120, 120, 0.25));
  color: #ffb4b4;
  border: 1px solid rgba(255, 180, 180, 0.4);
  box-shadow: 0 2px 8px rgba(255, 180, 180, 0.2);
}

.achievement-status.locked:hover {
  background: linear-gradient(135deg, rgba(255, 180, 180, 0.35), rgba(255, 120, 120, 0.35));
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 180, 180, 0.3);
  border-color: rgba(255, 180, 180, 0.6);
}

.site-footer { text-align: center; padding: 40px 16px 24px; opacity: 0.7; }

.hidden { display: none; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr 72px; }
  .profile .avatar { width: 72px; height: 72px; }
}

/* Cartes amis (style similaire aux jeux) */
.friend-card {
  background: linear-gradient(180deg, rgba(13, 17, 34, 0.75), rgba(9, 12, 24, 0.75));
  border: 1px solid #e91e63;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.08s ease, filter 0.2s ease, box-shadow 0.2s ease;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
}
.friend-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.35); }
.friend-avatar { width: 72px; height: 72px; object-fit: cover; display: block; }
.friend-body{ padding:10px; display:grid; gap:6px; }
.friend-name{ font-size:14px; font-weight:600; }
.friend-sub{ font-size:12px; opacity:0.8; }

/* Modal */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6,8,18,0.7); backdrop-filter: blur(2px); }
.modal-card {
  position: relative;
  width: min(920px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, rgba(19, 24, 48, 0.92), rgba(14, 18, 36, 0.92));
  border: 1px solid #e91e63;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.modal-card{ scrollbar-width: thin; scrollbar-color: rgba(120,128,180,0.6) rgba(19,24,48,0.6); }
.modal-card::-webkit-scrollbar{ width: 10px; height: 10px; }
.modal-card::-webkit-scrollbar-track{ background: rgba(19,24,48,0.35); border-radius: 12px; }
.modal-card::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(124,58,237,0.9), rgba(37,99,235,0.9));
  border-radius: 12px;
  border: 2px solid rgba(19,24,48,0.6);
}

.modal-content { padding: 18px; position: relative; }

/* ===== BOUTON DE FERMETURE STYLISÉ ===== */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border: none;
  background: linear-gradient(135deg, rgba(19, 24, 48, 0.95), rgba(14, 18, 36, 0.95));
  color: #EAF0FF;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  border: 1px solid #e91e63;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
  background: linear-gradient(135deg, rgba(138, 180, 255, 0.25), rgba(107, 140, 255, 0.25));
  color: #8ab4ff;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 25px rgba(138, 180, 255, 0.4);
  border-color: rgba(138, 180, 255, 0.6);
}

.modal-close:active {
  transform: scale(0.95) rotate(90deg);
  transition: all 0.1s ease;
}

.modal-close svg {
  transition: all 0.3s ease;
}

.modal-close:hover svg {
  stroke-width: 2.5;
}
.modal-body { display: grid; gap: 10px; }

.mini { font-size: 12px; opacity: 0.85; }



















