/* --- Reset basique --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: #0a0a0a;
    color: #f1f1f1;
    min-height: 100vh;
}

/* --- Upload boxes améliorées --- */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, #111, #1a1a1a);
    border: 2px solid #00ffff44;
    border-radius: 15px;
    padding: 15px 20px;
    min-width: 280px;
    box-shadow: 0 0 15px #00ffff22;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #00ffff;
    box-shadow: 0 0 25px #00ffff55;
    transform: translateY(-2px);
}

.upload-box label {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff66;
    font-size: 0.95rem;
    text-align: center;
}

.upload-box input[type="file"] {
    border: 2px solid #00ffff44;
    background: #0f0f0f;
    color: #00ffffcc;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
    width: 100%;
    text-align: center;
}

.upload-box input[type="file"]:hover {
    background: #111;
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff55;
}

.upload-box input[type="file"]::-webkit-file-upload-button {
    background: #00ffff;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.upload-box input[type="file"]::-webkit-file-upload-button:hover {
    background: #00cccc;
    box-shadow: 0 0 10px #00ffff55;
}

/* --- Message d'information sous upload save --- */
.upload-info {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #00ffffcc;
    text-align: center;
    font-style: italic;
    transition: opacity 0.3s ease;
}

.upload-info.processing {
    color: #ffaa00;
    text-shadow: 0 0 8px #ffaa0066;
    font-weight: bold;
}

.upload-info.done {
    color: #00ff88;
    text-shadow: 0 0 8px #00ff8866;
}

#mainTitle {
    display: flex;
    align-items: center;
    gap: 10px;
}

#mainTitle img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
}

#supportContainer {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #111;
    /* même style que ton header */
    border: 2px solid #00ffff44;
    border-radius: 15px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    box-shadow: 0 0 15px #00ffff33;
    z-index: 1000;
    max-width: 220px;
}

.copy-id-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff55;
    border-radius: 8px;
    color: #00ffff;
    font-weight: bold;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: 6px;
    transition: 0.3s;
}

.copy-id-btn:hover {
    background: #00ffff33;
    box-shadow: 0 0 10px #00ffff55;
}

.copy-id-btn:active {
    transform: scale(0.9);
}

#supportContainer p {
    font-size: 0.9rem;
    color: #00ffff;
}

#supportContainer button {
    padding: 6px 12px;
    border-radius: 10px;
    background: #00ffff;
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#supportContainer button:hover {
    background: #00cccc;
    box-shadow: 0 0 10px #00ffff66;
}

#discordBtn {
    padding: 6px 12px;
    border-radius: 10px;
    background: #5865F2;
    /* Couleur Discord */
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#discordBtn:hover {
    background: #4752C4;
    box-shadow: 0 0 10px #5865F277;
}

#discordLogo {
    height: 20px;
    width: 20px;
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 20px;
    font-weight: bold;
}

.custom-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Style du bouton comme un input file par défaut */
.file-btn {
    padding: 4px 12px;
    border: 1px solid #ccc;
    background: #f4f4f4;
    color: #000;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.file-btn:hover {
    background: #e6e6e6;
}

/* Style du texte du fichier */
.file-name {
    color: #888;
    font-size: 14px;
    font-style: italic;
}

#langSelect {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
}

.credits {
    text-align: center;
    /* centre tout le contenu */
}

.credits-title {
    font-size: 125%;
    /* plus gros que le reste */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    /* espace avant les lignes suivantes */
}

/* --- Crédits en haut à droite --- */
.credits {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid #00ffff55;
    color: #00ffff;
    font-size: 14px;
    backdrop-filter: blur(4px);
    text-shadow: 0 0 6px #00ffff55;
    box-shadow: 0 0 10px #00ffff22;
}

.credits strong {
    color: #ffffff;
    text-shadow: 0 0 6px #ffffff66;
}

/* --- Header --- */
header {
    padding: 15px 20px;
    background: linear-gradient(90deg, #0f0f0f, #111111);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    margin: 0 0 10px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff66;
}

.user-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 5px;
}

.user-bar span {
    font-weight: bold;
    color: #0ff;
}

.user-bar button {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: #00ffff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.user-bar button:hover {
    background: #00cccc;
}

/* --- Main --- */
main {
    width: 95%;
    margin: 20px auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* --- Upload Section --- */
.upload-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.upload-section input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #00ffff44;
    background: #111;
    color: #fff;
}

.upload-section input[type="file"] {
    cursor: pointer;
}

/* --- Upload boxes améliorées --- */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, #111, #1a1a1a);
    border: 2px solid #00ffff44;
    border-radius: 15px;
    padding: 15px 20px;
    min-width: 280px;
    box-shadow: 0 0 15px #00ffff22;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #00ffff;
    box-shadow: 0 0 25px #00ffff55;
    transform: translateY(-2px);
}

.upload-box label {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff66;
    font-size: 0.95rem;
    text-align: center;
}

.upload-box input[type="file"] {
    border: 2px solid #00ffff44;
    background: #0f0f0f;
    color: #00ffffcc;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
    width: 100%;
    text-align: center;
}

.upload-box input[type="file"]:hover {
    background: #111;
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff55;
}

.upload-box input[type="file"]::-webkit-file-upload-button {
    background: #00ffff;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.upload-box input[type="file"]::-webkit-file-upload-button:hover {
    background: #00cccc;
    box-shadow: 0 0 10px #00ffff55;
}

.upload-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.upload-section input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #00ffff44;
    background: #111;
    color: #fff;
}

.upload-section input[type="file"] {
    cursor: pointer;
}

.upload-box input[type="file"] {
    border: 2px solid #00ffff44;
    background: #0f0f0f;
    color: #00ffffcc;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
    width: 100%;
    text-align: center;
}

video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    /* centrer */
}

/* --- Filters --- */
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #00ffff44;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.filter-btn img {
    width: 20px;
    height: 20px;
}

.filter-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px #00ffff66;
}

.filter-btn.active {
    background: #00ffff;
    color: #000;
    border-color: #00ffff;
    box-shadow: 0 0 15px #00ffffaa, 0 0 30px #00ffff55;
}

/* --- Level Count --- */
#levelCount {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

/* --- Level List --- */
#levelList {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    justify-content: center;
    width: 100%;
    min-height: 100px;
}

#loadingMessage {
    grid-column: 1 / -1;
    text-align: center;
    color: #00ffffcc;
    font-style: italic;
    font-size: 1rem;
}

/* --- Level Card --- */
.level-card {
    background: linear-gradient(145deg, #111, #222);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 5px 15px #00ffff22;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    position: relative;
    animation: fadeIn 0.3s ease-in;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px #00ffff44;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.level-item img {
    width: 22px;
    height: 22px;
}

.level-id img {
    width: 24px;
    height: 24px;
}

.level-coins {
    color: #00ff88;
    font-weight: bold;
}

.level-stars {
    font-weight: bold;
}

.level-checked {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.level-checked input {
    accent-color: #00ffff;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* --- Pagination --- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* Style du champ de texte pour la page */
#pageInput {
    width: 60px;
    /* largeur compacte */
    padding: 5px 8px;
    /* padding confortable */
    font-size: 14px;
    /* taille lisible */
    text-align: center;
    /* texte centré */
    border: 1px solid #ccc;
    /* bordure légère */
    border-radius: 5px;
    /* coins arrondis */
    margin-left: 8px;
    /* petit espace à gauche */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#pageInput:focus {
    border-color: #4CAF50;
    /* bordure verte au focus */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    /* légère ombre verte */
    outline: none;
}

.pagination button,
.pagination input {
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff55;
    color: #00ffff;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.pagination button:hover {
    background: #00ffff33;
    color: #000;
    box-shadow: 0 0 10px #00ffff55;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination input {
    width: 80px;
    text-align: center;
    background: #111;
    border: 1px solid #00ffff55;
    color: #fff;
}

.pagination span {
    font-weight: bold;
    color: #0ff;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff55;
    color: #00ffff;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.page-btn:hover {
    background: #00ffff33;
    box-shadow: 0 0 10px #00ffff55;
}

.page-btn.active {
    background: #00ffff;
    color: #000;
    border-color: #00ffff;
    box-shadow: 0 0 15px #00ffffaa;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Animation --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Auth Pages --- */
.auth-container {
    background: #111;
    padding: 40px 30px;
    border-radius: 20px;
    width: 350px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 20px #00ffff66, 0 0 40px #00ffff33 inset;
    margin: 60px auto;
}

.auth-container h1 {
    margin-bottom: 25px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff77;
    font-size: 1.8rem;
}

.auth-container input {
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 2px solid #00ffff44;
    background: #111;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.auth-container input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff66;
    outline: none;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: #00ffff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: #00cccc;
    box-shadow: 0 0 15px #00ffff88;
}

.btn-secondary {
    margin-top: 10px;
    background: #111;
    border: 2px solid #00ffff;
    color: #00ffff;
}

.btn-secondary:hover {
    background: #00ffff;
    color: #000;
}

#message {
    margin-bottom: 10px;
    color: #ff5555;
    min-height: 20px;
}

/* --- Responsive --- */

@media screen and (max-width: 600px) {

    /* Le conteneur de support passe en haut centré */
    #supportContainer {
        position: static;
        max-width: 100%;
        width: 90%;
        margin: 10px auto;
        align-items: center;
        text-align: center;
    }

    /* Les boutons dans supportContainer deviennent centrés */
    #supportContainer button {
        width: 100%;
        text-align: center;
    }

    /* Crédits */
    .credits {
        position: static;
        margin-top: 10px;
        text-align: center;
        width: 100%;
    }

    /* Le header s'adapte mieux */
    header {
        padding-top: 80px;
    }

    /* Le titre + logo réduits */
    #mainTitle img {
        width: 50px;
        height: 50px;
    }

    #mainTitle {
        font-size: 1.4rem;
        text-align: center;
        flex-wrap: wrap;
    }
}