/* 🌑 Arrière-plan principal */
body {
    font-family: Arial, sans-serif;
    background-color: #131722;
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
}

/* 🏆 Titre principal */
h1 {
    font-size: 2.2rem;
    color: #f0f0f0;
}

.highlight {
    color: #ffcc00;
}

/* 📌 Conteneur principal */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* 🌍 Sélection du pays */
.country-selection {
    margin: 10px 0;
}

#countrySelect {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ffcc00;
    background-color: #131722;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#countrySelect:hover {
    border: 2px solid #ff9900;
}

/* 🔎 Barre de recherche */
input[type="text"] {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ffcc00;
    background-color: #1e2430;
    color: white;
    font-weight: bold;
    width: 250px;
    text-align: center;
    transition: border 0.3s ease;
}

input[type="text"]::placeholder {
    color: #cccccc;
}

input[type="text"]:focus {
    border: 2px solid #ff9900;
    outline: none;
}

/* 🔘 Boutons */
button {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #131722;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 10px rgba(255, 153, 0, 0.5);
}

button:active {
    transform: scale(0.98);
}

/* 🔄 Bouton "Rafraîchir" */
.refresh-btn {
    background: linear-gradient(135deg, #007BFF, #0056b3);
    color: white;
}

.refresh-btn:hover {
    box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.5);
}

/* 📊 Sélecteur de tri */
select {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ffcc00;
    background-color: #131722;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: border 0.3s ease;
}

select:hover {
    border: 2px solid #ff9900;
}

/* 🎁 Grille des cadeaux */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px; /* Espace entre les cartes */
    max-width: 1200px;
    margin: auto;
    padding-bottom: 20px;
}
/* 📦 Carte des cadeaux */
.card {
    background: #1e2430;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(255, 255, 255, 0.1);
    width: 260px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 12px rgba(255, 204, 0, 0.5);
}

/* 🏷️ Nom du cadeau */
.card h2 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 15px 0 5px 0; /* Ajoute de l’espace sous le titre */
    height: auto;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 🖼️ Image du cadeau */
.card img {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 10px auto;
}

/* 💎 Prix sous le nom (centré proprement) */
.diamond {
    font-size: 1rem;
    font-weight: bold;
    color: #ffcc00;
    background: rgba(0, 0, 0, 0.6); /* Fond légèrement transparent */
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 5px auto; /* Centrage horizontal */
    justify-content: center;
    max-width: fit-content; /* Ajuste la largeur au texte */
}

.diamond img {
    width: 16px;
    height: 16px;
}

/* 📥 Bouton de téléchargement */
.download-btn {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: bold;
    color: #131722;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 10px rgba(255, 153, 0, 0.5);
}

/* 📥 Icône de téléchargement */
.download-btn img {
    width: 16px;
    height: 16px;
}

/* 📥 Ajoute de l’espace sous les cartes */
.card:last-child {
    margin-bottom: 30px;
}

/* 🏆 Texte des téléchargements */
.download-count {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.download-count img {
    width: 14px;
    height: 14px;
}
