body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #000;
    color: #FFD700;
    text-align: center;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

header img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}

h1 {
    font-size: 1.8em;
    margin: 10px 0;
    color: #FFD700;
}

.form-section {
    margin: 30px auto;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: white;
    padding: 0 20px;
    box-sizing: border-box;
}

select, input, button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
}

select, input {
    background: #111;
    color: white;
    border: 1px solid #FFD700;
}

button {
    background: #FFD700;
    color: black;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #e6c200;
}

button:disabled {
    background: #555;
    color: #bbb;
    cursor: not-allowed;
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

#country-code {
    background: #111;
    padding: 10px;
    border: 1px solid #FFD700;
    border-radius: 8px;
    color: white;
    white-space: nowrap;
}

#phone {
    flex-grow: 1;
}

.progress-section {
    margin-top: 30px;
    padding: 0 20px;
    box-sizing: border-box;
}

.progress-bar {
    width: 80%;
    height: 30px;
    background: #333;
    margin: auto;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

#progress-fill {
    background: linear-gradient(90deg, #FFD700, #c49a00);
    width: 0%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.4s ease-out;
}

#progress-percent {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 5px;
    left: 0;
    color: black;
    font-weight: bold;
    z-index: 1;
}

#withdrawBtn {
    margin-top: 20px;
}

/* Styles pour les Pop-ups */
.popup {
    display: none; /* Caché par défaut */
    position: fixed; /* Reste en place même en défilant */
    z-index: 1000; /* Plus haut que tout le reste */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permet le défilement si le contenu est trop grand */
    background-color: rgba(0,0,0,0.8); /* Fond noir semi-transparent */
    display: flex; /* Utilise flexbox pour centrer */
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    padding: 20px; /* Padding pour les bords sur mobile */
    box-sizing: border-box;
}

.popup-content {
    background-color: #1a1a1a;
    margin: auto;
    padding: 30px;
    border: 1px solid #FFD700;
    border-radius: 10px;
    width: 90%; /* Largeur par défaut */
    max-width: 500px; /* Largeur maximale */
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    text-align: left;
    color: white;
    position: relative;
    max-height: 90vh; /* Limite la hauteur de la pop-up */
    overflow-y: auto; /* Ajoute un défilement interne si le contenu dépasse */
}

.popup-content.large {
    max-width: 700px; /* Plus large pour les conditions d'utilisation */
}

.popup-content h2 {
    color: #FFD700;
    margin-top: 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-content p, .popup-content ul {
    font-size: 0.95em;
    line-height: 1.6;
}

.popup-content a {
    color: #FFD700;
    text-decoration: underline;
    cursor: pointer;
}

.popup-content ul {
    padding-left: 20px;
}

.popup-content ul li {
    margin-bottom: 5px;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 18px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: white;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #333;
    border: 1px solid #FFD700;
    border-radius: 4px;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #FFD700;
}

.checkbox-container .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.popup-content button {
    width: auto;
    padding: 10px 20px;
    margin-top: 20px;
    display: block; /* S'assure que le bouton prend toute la largeur disponible */
    margin-left: auto; /* Centre le bouton */
    margin-right: auto; /* Centre le bouton */
}

.popup-content .close-popup-btn {
    position: sticky; /* ou absolute pour une position fixe */
    bottom: 0px; /* Position en bas de la pop-up défilable */
    width: 100%;
    left: 0;
    right: 0;
    background: #FFD700;
    color: black;
    border-top: 1px solid #e6c200;
    padding: 15px 0;
    border-radius: 0 0 10px 10px; /* Coins arrondis seulement en bas */
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3); /* Ombre pour donner un effet flottant */
    z-index: 10; /* Assure qu'il est au-dessus du contenu */
}

/* Ajustements pour les petits écrans */
@media (max-width: 600px) {
    .popup-content {
        width: 95%;
        padding: 20px;
    }
    .popup-content.large {
        width: 95%;
    }
    h1 {
        font-size: 1.5em;
    }
}