@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;800&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    overflow-y: scroll; /* Ensure vertical scrolling is enabled */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.sidebar {
    width: 250px;
    background: #1e1e1e;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    position: fixed;
    height: 100%;
    overflow-y: auto; /* Ensure sidebar can scroll if content overflows */
    animation: slideInLeft 0.5s ease-in-out;
}

.sidebar img
{
    width: 70%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sidebar h2 {
    color: #ff6347;
    text-align: center;
    font-weight: 800; /* Poppins Extrabold */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #e0e0e0;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.sidebar ul li a:hover {
    background: #333;
}

.container {
    margin-left: 270px; /* Adjusted to ensure it doesn't overlap with the sidebar */
    width: calc(100% - 350px); /* Adjusted to ensure it doesn't overlap with the sidebar */
    background: #1e1e1e;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    position: relative;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #fff;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ff6347;
    animation: slideIn 1s ease-in-out;
    font-weight: 800; /* Poppins Extrabold */
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #e0e0e0;
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    box-sizing: border-box;
    background: #2c2c2c;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
    font-weight: 400; /* Poppins Regular */
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #ff6347;
}

button {
    background: #ff6347;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1em;
    margin: 10px 0;
    width: 100%;
    max-width: 200px;
    font-weight: 400; /* Poppins Regular */
}

button a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

button:hover {
    background: #ff4500;
    transform: translateY(-2px);
}

.inventory-item {
    background: #2c2c2c;
    margin: 10px 0;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeInUp 0.5s ease-in-out;
}

.inventory-item:hover {
    transform: scale(1.05);
    background: #3a3a3a;
}

.inventory-image {
    max-width: 80px;
    max-height: 80px;
    margin-right: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.inventory-image:hover {
    transform: rotate(10deg);
}

.inventory-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.inventory-details div {
    margin-right: 20px;
    color: #e0e0e0;
}

/* Styles pour les boutons avec la classe "btn" */
.btn {
    width: 320px; /* Largeur du bouton */
    height: 60px; /* Hauteur du bouton */
    display: block; /* Assurez-vous que le bouton est un bloc */
    background-color: #ff6347; /* Couleur de fond */
    color: #ffffff; /* Couleur du texte */
    padding: 10px 20px; /* Espacement interne */
    border: none; /* Pas de bordure */
    border-radius: 5px; /* Coins arrondis */
    text-align: center; /* Centrer le texte */
    text-decoration: none; /* Supprimer le soulignement */
    font-family: 'Poppins', sans-serif; /* Police */
    font-size: 16px; /* Taille de la police */
    font-weight: 600; /* Poids de la police */
    cursor: pointer; /* Curseur en forme de main */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Transition fluide */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ombre */
    margin: 10px auto; /* Centre le bouton horizontalement */
}

.btn:hover {
    background-color: #ff4500; /* Couleur de fond au survol */
    transform: translateY(-2px); /* Légère élévation au survol */
}

.btn-remove {
    background: #ff4500;
    padding: 10px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    width: 100%;
    max-width: 200px;
    font-weight: 400; /* Poppins Regular */
}

.btn-remove:hover {
    background: #ff6347;
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-in-out;
}

.modal-content {
    background-color: #1e1e1e;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    animation: slideIn 0.5s ease-in-out;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 20px;
}

#slotMachine {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center vertically */
    overflow: hidden;
    height: 200px;
    width: 555px;
    margin: auto; /* Center horizontally */
}

.slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.slot img {
    max-width: 100px;
    max-height: 100px;
    margin-bottom: 10px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ff6347;
    min-width: 160px;
    border-radius: 15px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-10px);
}

.dropdown-content a {
    color: rgb(255, 255, 255);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #ff4500;
    border-radius: 15px;
    transition: background 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.profile-image {
    cursor: pointer;
}

.rarity {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    min-width: 80px; /* Ensure consistent width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.rarity-1 {
    background-color: #A9A9A9; /* Commun */
}

.rarity-2 {
    background-color: #2AAA8A; /* Peu Commun */
}

.rarity-3 {
    background-color: #4169E1; /* Rare */
}

.rarity-4 {
    background-color: #BF40BF; /* Épique */
}

.rarity-5 {
    background-color: #FFAA33; /* Légendaire */
}

.rarity-6 {
    background-color: #DE3163; /* Mythique */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chest-option {
    display: inline-block;
    margin: 20px;
    text-align: center;
}

.chest-option button {
    margin-top: 10px;
    display: block;
    width: 100%;
    max-width: 200px;
    font-size: 1em;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chest-option button img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

.chest-image {
    width: 150px;
    height: 150px;
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 10px;
    background-color: #2c2c2c;
}

.slot-machine {
    border: 2px solid #fff;
    padding: 10px;
    border-radius: 10px;
    background-color: #2c2c2c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the images vertically */
    height: 200px; /* Adjust height as needed */
}

.slot img {
    border: 2px solid #fff;
    padding: 5px;
    border-radius: 5px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(50px);
        opacity: 0;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
    100% {
        transform: translateY(0);
    }
}

.obtained-loot {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.obtained-loot-content {
    text-align: center;
    background: #2c2c2c;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    color: #fff;
    animation: slideIn 0.5s ease-in-out;
}

.obtained-loot-content.slide-out {
    animation: slideOut 0.5s ease-in-out;
}

.obtained-loot-content img {
    width: auto;
    height: 512px;
    margin: 40px auto;
    display: block;
    animation: float 3s infinite ease-in-out; /* Ajout du mouvement constant */
}

.obtained-loot-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}
/* Bouton pour ouvrir/fermer la sidebar */
#sidebarToggle {
    width: 40px;
    height: fit-content;
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #ff6347;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1002; /* Assurez-vous qu'il est au-dessus de la sidebar */
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#sidebarToggle:hover {
    background-color: #ff4500;
    transform: scale(1.1);
}

/* Transition pour la sidebar */
.sidebar {
    width: 350px; /* Assurez-vous que la largeur de la sidebar est suffisante */
    z-index: 1001; /* Assurez-vous qu'elle est au-dessus du contenu principal */
    background: #1e1e1e;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column; /* Aligne les éléments verticalement */
    align-items: center; /* Centre les éléments horizontalement */
    transform: translateX(0);
    animation: slideInLeft 0.5s ease-in-out;
    transition: transform 0.3s ease-in-out;
}

.sidebar.hidden {
    transform: translateX(-100%); /* Cache la sidebar en la déplaçant vers la gauche */
    transition: transform 0.3s ease-in-out;
    animation: slideOut 0.5s ease-in-out;
}


