/* Style général */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2a9d8f;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Conteneur principal */
.container {
    max-width: 1200px;
    padding: 20px;
    text-align: center;
    z-index: 2;
    margin-top: 5%;
}



/* Formulaire et Inputs */
.input-group {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
label{
    color:#e9c46a;
}
h1{
    color: #e9c46a;
}






/* Particle Background */
#particle-background {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: url('https://www.transparenttextures.com/patterns/dark-matter.png');
    animation: particleAnimation 30s linear infinite;
  
  }
  
  @keyframes particleAnimation {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
  }
  
 /* Navbar styling */
 .navbar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 40px;
    backdrop-filter: blur(15px);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.6);
    transition: width 0.4s ease, padding 0.4s ease;
    gap: 15px;
    width: 60px;
    overflow: hidden;
    position: relative;
    z-index: 3;
    margin: auto;
    margin-top: 10px;
  }
  
  /* Navbar expanded state */
  .navbar.expanded {
    width: 360px;
    padding: 15px 20px;
    height: 100px;
    justify-content: flex-start;
  }
  
  /* Toggle button styling */
  .toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
  }
  
  .toggle-button:hover {
    color: #f4a261;
    transform: rotate(90deg);
  }
  
  /* Nav item styling */
  .nav-item {
    position: relative;
    padding: 12px;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0px 8px 20px rgba(255, 255, 255, 0.1);
  }
  
  .nav-item i {
    transition: transform 0.3s ease, color 0.3s ease;
    color: #ffffff;
  }
  
  /* Hover effect with gradient */
  .nav-item:hover {
    background: linear-gradient(135deg, #e9c46a(255, 0, 204, 0.4), #e76f51(51, 51, 255, 0.4));
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.8);
    transform: translateY(-5px) scale(1.05);
  }
  
  /* Active effect with glow and scale */
  .nav-item.active {
    color: #264653;
    background: #2a9d8f(255, 0, 204, 0.3);
    box-shadow: 0px 0px 30px #264653(255, 0, 204, 0.8), inset 0px 0px 20px #2a9d8f(255, 0, 204, 0.5);
    padding: 18px;
    border-radius: 20px;
    margin-top: -15px;
    z-index: 2;
    animation: glow 1.5s infinite alternate ease-in-out;
  }
  
  @keyframes glow {
    0% {
      box-shadow: 0px 0px 25px #e9c46a(255, 0, 204, 0.8), 0px 0px 20px #f4a261(255, 0, 204, 0.6), 0px 0px 35px #e76f51(255, 0, 204, 0.5);
    }
    100% {
      box-shadow: 0px 0px 35px #e9c46a(255, 0, 204, 1), 0px 0px 25px #f4a261(255, 0, 204, 0.8), 0px 0px 45px #e76f51(255, 0, 204, 0.7);
    }
  }
  
  .nav-item.active i {
    transform: scale(1.8);
    color: #264653;
  }
  
  /* Tooltip styling */
  .nav-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #ffffff;
    background: rgba(30, 30, 30, 0.85);
    padding: 8px 12px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 3;
    backdrop-filter: blur(8px);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
  }
  
  /* Tooltip visible on hover */
  .nav-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
  }
  
  /* Tooltip triangle */
  .nav-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(30, 30, 30, 0.85) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
  }
  
  .nav-item:hover::after {
    opacity: 1;
  }
  
  /* Notification Badge */
  .notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(45deg, #ff0000, #ff4d4d);
    color: #ffffff;
    border-radius: 50%;
    padding: 4px 7px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 1.8s infinite ease-in-out;
  }
  
  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
  }
  
  /* Selection Indicator */
  .selection-indicator {
    position: absolute;
    bottom: 10px;
    height: 4px;
    width: 30px;
    background: linear-gradient(90deg, #e76f51, #264653);
    border-radius: 2px;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: -1;
  }
  
  .nav-item.active ~ .selection-indicator {
    width: 40px; /* Adjust indicator width for active item */
  }
  
  /* Show and hide nav items */
  .navbar:not(.expanded) .nav-item {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
  }
  
  .navbar.expanded .nav-item {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  /* Icon hover adjustments */
  .nav-item:not(.active):hover i {
    color: #1de9b6;
    transform: scale(1.2);
  }
  














  /* Timer */
.timer {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #e9c46a;
}

/* Memory Game */
.memory-game {
  display: grid;
  grid-template-columns: repeat(4, 150px);
  grid-gap: 15px;
  justify-content: center;
  align-items: center;
}

.card {
  width: 150px;
  height: 150px;
  background-color: #264653;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  perspective: 1000px;
  transition: transform 0.4s ease;
}

.card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.card-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s;
}

.card.is-matched > .card.is-matched {
  background-color: #2a9d8f; /* Couleur plus claire ou différente */
  cursor: default; /* Empêche de cliquer dessus */
}

.card.is-matched .card-inner {
  transform: rotateY(180deg); /* Garde les cartes retournées */
}
.card.is-matched{
  background-color: #2a9d8f !important; /* Couleur plus claire ou différente */
  cursor: default; /* Empêche de cliquer dessus */
}

.card.is-matched .card-inner {
  transform: rotateY(180deg); /* Garde les cartes retournées */
}


.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: #fff;
}

.card-front {
  background-color: #264653;
}

.card-back {
  background-color: #e76f51;
  transform: rotateY(180deg);
}
#replay-button{
  font-family: "Open Sans", sans-serif;
font-size: 16px;
letter-spacing: 2px;
text-decoration: none;
text-transform: uppercase;
color: #264653;
cursor: pointer;
border: 3px solid;
padding: 0.25em 0.5em;
box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
position: relative;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
#replay-button:active{
  box-shadow: 0px 0px 0px 0px;
top: 5px;
left: 5px;
}







/* Style de la section des scores */
#scoreSection {
  background-color: #18534F; /* Couleur de fond */
  border-radius: 8px;        /* Coins arrondis */
  padding: 20px;             /* Espacement interne */
  max-width: 400px;          /* Largeur maximale */
  margin: 20px auto;         /* Centré avec marges en haut et en bas */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Légère ombre pour un effet de profondeur */
  color: #ECF8F6;            /* Couleur de texte contrastante */
  font-family: Arial, sans-serif; /* Police claire */
}

/* Style du titre "Meilleurs Scores" */
#scoreSection h2 {
  text-align: center;        /* Centrer le texte */
  margin-bottom: 15px;       /* Espacement sous le titre */
  color: #FEEAA1;            /* Couleur du titre */
  font-size: 24px;           /* Taille de la police */
  font-weight: bold;         /* Gras pour le titre */
}

/* Style de la liste des scores */
#scoreList {
  list-style-type: none;     /* Supprime les puces de la liste */
  padding: 0;                /* Supprime le padding par défaut */
  margin: 0;                 /* Supprime la marge par défaut */
}

/* Style de chaque élément de la liste */
#scoreList li {
  background-color: #226D68; /* Couleur de fond des éléments de la liste */
  margin-bottom: 10px;       /* Espacement entre les éléments */
  padding: 12px;             /* Espacement interne des éléments */
  border-radius: 5px;        /* Coins arrondis */
  color: #ECF8F6;            /* Couleur du texte */
  font-size: 18px;           /* Taille de la police */
  display: flex;             /* Flex pour alignement */
  justify-content: space-between; /* Équilibre les éléments à gauche et à droite */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Légère ombre pour chaque élément */
}

/* Style survol des éléments de la liste */
#scoreList li:hover {
  background-color: #D6955B; /* Change la couleur de fond au survol */
  cursor: pointer;           /* Change le curseur en main */
}

  

@media screen and (max-width: 2000px) {
  #particle-background {
    position: absolute;
    
    height: 180%;
    
  
  }
  .container {

    margin-top: 12%;
}
}