body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #000428, rgb(105, 127, 255));
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.binary-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: -1;
    pointer-events: none;
    overflow: visible;
}

.binary-digit {
    position: absolute;
    top: 0;
    color: rgb(105, 127, 255);
    font-size: 15px;
    animation: fall linear forwards;
    z-index: 0;
    animation-name: fall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes fall {
    to {
        transform: translateY(100dvh);
    }
}

.logo_titre {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
}

.titre-principal {
    color: whitesmoke;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-size: 30pt;
    font-weight: bolder;
    margin-top: 25px;
    z-index: 1;
}

.texte_description-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 80px;
    margin-bottom: 20px;
}

.texte_description-img {
    height: 50pt;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    z-index: 2;
}

.texte_description {
    color: whitesmoke;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 48pt;
    font-weight: bolder;
    line-height: 1;
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 2;
}

#icone {
    width: 60px;
    height: 60px;
    margin-left: 36px;
    margin-top: 25px;
    z-index: 1;
}

.logo_titre-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    width: auto;
    max-width: none;
}

.connexion-button {
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: absolute;
    top: 36px;
    right: 36px;
    padding: 10px 20px;
    background-color: rgb(105, 127, 255);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    text-decoration: none;
}

.connexion-button:hover {
    background-color: rgba(105, 127, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.deconnexion-button {
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: absolute;
    top: 36px;
    right: 36px;
    padding: 10px 20px;
    background-color: #ed4245;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    text-decoration: none;
}

.deconnexion-button:hover {
    background-color: #ff4447;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.footer {
    background-color: #0e0f11;
    color: whitesmoke;
    padding: 48px 0 32px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    z-index: 2;
    position: relative;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 48px;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-col {
    flex: 1;
    min-width: 220px;
}

.footer-brand {
    flex: 2;
    min-width: 320px;
}

.footer-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.footer-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
}

.footer-desc {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: #e0e0f0;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: whitesmoke;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #d1d1e0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: rgb(105, 127, 255);
}

.footer-bottom {
    margin-top: 20px;
    font-size: 14px;
    color: #888;
    text-align: center;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 32px;
        align-items: stretch;
    }

    .footer-col,
    .footer-brand {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .titre-principal {
        font-size: 22pt;
        margin-top: 20px;
    }

    .footer-title {
        font-size: 18px;
    }

    .footer-description {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .logo_titre {
        flex-direction: row;
        align-items: center;
        margin-left: 10px;
        margin-top: 20px;
        gap: 8px;
    }

    #icone {
        width: 40px;
        height: 40px;
        margin: 0;
    }

    .titre-principal {
        font-size: 18pt;
        margin: 0;
    }

    .connexion-button {
        top: 20px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .deconnexion-button {
        top: 20px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 20px;
    }

    .footer-title,
    .footer-desc,
    .footer-heading,
    .footer-links {
        text-align: left;
    }

    .footer-bottom {
        text-align: center;
    }
}

.classement-liste {
    list-style: none;
    padding: 20px;
    margin: 0 auto;
    max-width: 720px;
    width: 100%;
    box-sizing: border-box;
}

.classement-liste li {
    padding: 10px;
    color: white;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.username {
    font-weight: 600;
    font-size: 1.1rem;
}

.glass-square {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 16px;
    margin: 12px auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    justify-content: space-between;
    transition: background 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.rank-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.glass-square.gold {
    border: 2px solid gold;
    background: rgba(255, 215, 0, 0.1);
}

.glass-square.silver {
    border: 2px solid silver;
    background: rgba(192, 192, 192, 0.1);
}

.glass-square.bronze {
    border: 2px solid #cd7f32;
    background: rgba(205, 127, 50, 0.1);
}

.rubbys-count {
    margin-left: auto;
    font-weight: bold;
    white-space: nowrap;
    text-align: right;
}

@media (max-width: 768px) {
    .glass-square {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px;
        padding: 14px 10px;
        width: 85vw;
        max-width: 85vw;
        margin: 12px auto;
        box-sizing: border-box;
        overflow-wrap: break-word;
    }

    .rank-left {
        margin-bottom: 0;
    }

    .rubbys-count {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }
}

.classement-liste {
    margin-bottom: 0;
    padding-bottom: 0;
}

.tabs-bar {
    position: relative;
    background: none;
    padding: 0;
    border-bottom: none;
    display: flex;
    justify-content: center;
}

.tabs-list {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    width: auto;
}

.tab {
    color: #b9bbbe;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 18px 0 12px 0;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
    background: none;
    border: none;
    outline: none;
}

.tab.active {
    color: #fff;
}

.tab-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: #fff;
    border-radius: 2px;
    transition: left 0.3s cubic-bezier(.4, 0, .2, 1), width 0.3s cubic-bezier(.4, 0, .2, 1);
    z-index: 2;
}

.leaderboard-container {
    max-height: calc(80vh - 170px);
    overflow-y: auto;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 40px auto;
    width: 95%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    z-index: 0;
    box-sizing: border-box;
}

.leaderboard-container::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#load-trigger {
    height: 1px;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    min-height: 600px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid rgb(105, 127, 255);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.user-bar {
    position: sticky;
    bottom: 0;
    background: rgba(105, 127, 255, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow:
        0 0 40px 20px rgba(105, 127, 255, 0.8),
        0 0 20px rgba(0, 0, 0, 0.5);
    padding: 16px 20px; 
    margin: 12px auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 1;
    gap: 16px;
    text-align: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    text-align: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .leaderboard-container {
        width: 90vw;
        max-width: 85vw;
        margin: 20px auto;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    .classement-liste {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .glass-square,
    .user-bar {
        width: 96%;
        max-width: 96%;
        margin: 12px auto;
        box-sizing: border-box;
        padding-left: 0;
        padding-right: 0;
    }

    .glass-square {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px;
        padding-top: 14px;
        padding-bottom: 14px;
        overflow-wrap: break-word;
    }

    .user-bar {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 8px;
        border-radius: 16px;
        background: rgba(105, 127, 255, 0.8);
        box-shadow: 0 0 16px 4px rgba(105, 127, 255, 0.25);
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .rubbys-count {
        text-align: center;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        justify-content: center;
        display: flex;
    }

    .texte_description-img {
        height: 40pt;
    }

    .texte_description-container {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .texte_description {
        font-size: 28pt;
    }

}

@media (max-width: 768px) {

    .tabs-list,
    .tab-underline {
        display: none !important;
    }

    .tabs-dropdown {
        display: block !important;
        width: 90%;
        margin: 0 auto 16px auto;
        font-size: 1.1rem;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #b9bbbe;
        background: #18191c;
        color: #fff;
    }
}

@media (min-width: 601px) {
    .tabs-dropdown {
        display: none !important;
    }
}

.tabs-dropdown {
    display: none;
    width: 50%;
    margin: 0 auto 16px auto;
    font-size: 1.1rem;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1.5px solid #b9bbbe;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    cursor: pointer;
    position: relative;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.tabs-dropdown:focus {
    border-color: rgb(105, 127, 255);
    box-shadow: 0 0 0 2px rgba(105, 127, 255, 0.2);
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 8.293a1 1 0 011.414 0L10 9.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 40px;
}

.tabs-dropdown option {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tabs-dropdown {
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 8.293a1 1 0 011.414 0L10 9.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    padding-right: 40px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-square {
    animation: fadeInUp 0.6s cubic-bezier(.4,0,.2,1);
}

.user-bar {
    animation: fadeInUp 0.8s cubic-bezier(.4,0,.2,1);
}

.classement-liste .glass-square {
    animation: fadeInUp 0.6s cubic-bezier(.4,0,.2,1);
    opacity: 0;
    animation-fill-mode: forwards;
}

.classement-liste .glass-square:nth-child(1) { animation-delay: 0.05s; }
.classement-liste .glass-square:nth-child(2) { animation-delay: 0.10s; }
.classement-liste .glass-square:nth-child(3) { animation-delay: 0.15s; }
.classement-liste .glass-square:nth-child(4) { animation-delay: 0.20s; }
.classement-liste .glass-square:nth-child(5) { animation-delay: 0.25s; }
.classement-liste .glass-square:nth-child(6) { animation-delay: 0.30s; }
.classement-liste .glass-square:nth-child(7) { animation-delay: 0.35s; }
.classement-liste .glass-square:nth-child(8) { animation-delay: 0.40s; }
.classement-liste .glass-square:nth-child(9) { animation-delay: 0.45s; }
.classement-liste .glass-square:nth-child(10) { animation-delay: 0.50s; }

.user-bar {
    animation: fadeInUp 0.8s cubic-bezier(.4,0,.2,1);
    opacity: 0;
    animation-fill-mode: forwards;
    animation-delay: 0.7s; 
}

.error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.error-overlay.hidden {
  display: none;
}

.error-modal {
  background: rgba(40, 40, 40, 0.95);
  border-radius: 12px;
  padding: 30px;
  color: white;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  width: 400px;
}


.error-modal button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #faa61a;
  border: none;
  border-radius: 8px;
  color: black;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.error-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

#error-modal-img,
.error-modal-img {
  width: 70px;
  height: 70px;
  margin: 0;
}

.error-modal-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #faa61a;
  border-radius: 8px;
  color: black;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}