  /* Tab Buttons Styling */
  .tab-btn-container {
    margin-top: 24px;
    /* margin-bottom: 24px; */
}
.nav-tabs {
    display: flex;
    gap: 16px;
    justify-content: center;
    border-bottom: none;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
    color: #fff;
    cursor: default;
    background-color: #5D5D5D !important;
    opacity: 1;
    border: none;
   
}
.nav-tabs>li>a {
    background-color: #5D5D5D;
    opacity: 0.5;
    color: #d1d5db;
    border: none;
    padding: 8px 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 300px;
}
.nav-tabs>li>a:hover {
    background-color: #5D5D5D;
    opacity: 0.7;
    color: white;
    border: none;
}


li a{
    font-size: 17px;
    text-align: center;
}


.btn-tab-icon {
    margin-right: 8px;
}

@media (max-width: 767px) {
    .nav-tabs>li>a {
        padding: 12px 16px;
        font-size: 9px;
        min-width: 130px;
    }
}
@media (min-width: 768px) {
    .nav-tabs>li>a {
        padding: 16px 24px;
    }
}


.leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%; /* Ensure content takes full width */
}
.leaderboard-row {
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 12px;
    opacity: 0; /* Hidden by default for animation */
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.leaderboard-row.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dynamically highlight the top 3 rows */
.leaderboard-content .leaderboard-row:nth-child(1),
.leaderboard-content .leaderboard-row:nth-child(2),
.leaderboard-content .leaderboard-row:nth-child(3) {
    background-color: rgba(255, 255, 255, 0.2);
}

.rank-circle, .user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: normal;
}



.rank-circle {
    margin-right: 24px;
}
.user-avatar-small {
    background-color: #4b5563;
    border: 2px solid white;
    margin-right: 16px;
}
.user-avatar-small i {
    color: white;
    font-size: 24px;
}
.player-info {
    flex-grow: 1;
    font-weight: normal;
    font-size: 18px;
}

@media (max-width: 767px) {
    .player-info {
        font-size: 13px;
    }
}



.player-score {
    font-weight: normal;
    font-style: italic;
    font-size: 18px;
    color: white;
}

/* Start Button Styling */
.start-btn-container {
    margin-top: 32px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
}
.btn-start-trivia {
    background-color: #BF1622;
    color: white;
    font-weight: 400;
    padding: 12px;
    border-radius: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 400px;
    border-color: #BF1622;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    padding-bottom: 9px;
    margin-bottom: 34px;
}



.btn-start-trivia:hover {
    background-color: #BF1622;
    transform: scale(1.05);
    border-color: #BF1622;
}

@media (max-width: 767px) {
    .btn-start-trivia {
         margin-bottom: 0px;
    }
    .btn-start-trivia:hover {
        transform: scale(1);
    }
}

.btn-start-trivia:active, .btn-start-trivia:focus, .btn-start-trivia.active {
    outline: none !important;
    background-image: none !important;
    box-shadow: none !important;
    background-color: #BF1622 !important;
}

.btn-start-trivia i {
    font-size: 24px;
}

@media (max-width: 767px) {
    .start-btn-container {
        padding-left: 0;
        padding-right: 0;
    }
    .btn-start-trivia {
        max-width: 100%;
        border-radius: 0;
    }
}

/* Dynamically apply inner glows to the top 3 ranks */
.leaderboard-content .leaderboard-row:nth-child(1) .rank-circle {
    box-shadow: inset 0 0 9px 0px rgba(255, 255, 0, 0.8) !important;
}
.leaderboard-content .leaderboard-row:nth-child(2) .rank-circle {
    box-shadow: inset 0 0 9px 0px rgba(0, 255, 0, 0.8) !important;
}
.leaderboard-content .leaderboard-row:nth-child(3) .rank-circle {
    box-shadow: inset 0 0 9px 0px rgba(255, 0, 0, 0.8) !important;
}
.leaderboard-content .leaderboard-row:nth-child(n+4) .rank-circle {
    box-shadow: inset 0 0 9px 0px rgba(59, 130, 246, 0.8) !important;
}

.tab-pane { display: none; }
.tab-pane.active { display: flex; flex-direction: column; width: 100%; }
.tab-pane.active .leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* New: Loader styles */
.loader-container {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.loader {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

a {
    color: #337ab7;
    text-decoration: none;
    display: contents;
}




@media (max-width: 767px) {

    .rank-circle, .user-avatar-small {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .user-avatar-small i {
    
        font-size: 17px !important;
    }
    
    .player-score {
        font-size: 14px;
    }
    
    }


    @media (max-width: 767px) {
        .nav-tabs>li>a {
            padding: 12px 16px;
            font-size: 8px;
            min-width: 130px;
        }
    }


    .btn-start-trivia {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0px;
    }    

    .start-btn-container {
        padding-left: 0px;
        padding-right: 0px;
        width: 100%;
        display: flex
    ;
        justify-content: center;
        position: fixed;
        bottom: 0px;
        margin-bottom: 0;
        width: 100%;
    }
    .leaderboard-container{
        margin-bottom: 75px;
    }

    .btn-start-trivia:hover {
        transform: scale(1) !important;
    }

    

.start-btn-container i {
    margin-right: 8px;
}