/* Custom styles */
body {
    padding: 50px 10px;
}

.container {
    max-width: 800px;
}

.quiz-option:hover {
    background-color: #e5e7eb;
}

.correct {
    background-color: #10b981 !important;
    color: white !important;
}

.incorrect {
    background-color: #ef4444 !important;
    color: white !important;
}

.slider-container {
    position: relative;
    width: 100%;
}
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 15px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 1;
    transition: opacity .2s;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #1D428A;
    cursor: pointer;
}
.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: black;
    cursor: pointer;
}
.slider-fill {
    position: absolute;
    top: 3px;
    left: 0;
    width: 0%;
    height: 15px;
    background-color: #1D428A;
    border-radius: 5px;
    pointer-events: none;
}

#top-quiz-btn, #full-quiz-btn, #show-leaderboard-btn {
    width: 162px;
}

#top-quiz-btn:hover, #full-quiz-btn:hover, #show-leaderboard-btn:hover {
    opacity: 0.82;
}

.player-image {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.player-image.color {
    filter: grayscale(0%);
}

#quiz {
    max-width: 500px;
    margin: auto;
}

.quiz-option {
    display: block;
    width: 100%;
}

.border {
    border: 2px solid #1D428A;
}

#username {
    padding-top: .5rem;
    padding-bottom: .5em;
}

#progress-bar {
    margin-top: 25px;
}

#progress {
    margin-top: 1.2rem;
}

/* Leaderboard styles */
#leaderboard {
    max-width: 800px;
    margin: auto;
}

#leaderboard table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#leaderboard th, #leaderboard td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

#leaderboard th {
    background-color: #f8fafc;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

#leaderboard th.cursor-pointer:hover {
    background-color: #edf2f7;
}

#leaderboard tr:nth-child(even) {
    background-color: #f8fafc;
}

#leaderboard tr:hover {
    background-color: #edf2f7;
}

/* Leaderboard tabs */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.leaderboard-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.leaderboard-tab:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.leaderboard-tab:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.leaderboard-tab.active {
    background-color: #1D428A;
    color: white;
    border-color: #1D428A;
}

/* Question amount filter */
.question-amount-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.question-amount-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 0.25rem;
}

.question-amount-btn:hover {
    background-color: #edf2f7;
}

.question-amount-btn.active {
    background-color: #1D428A;
    color: white;
    border-color: #1D428A;
}

/* Responsive design */
@media (max-width: 650px) {
    #leaderboard {
        overflow-x: auto;
    }

    #leaderboard table {
        min-width: 500px;
        font-size: 14px;
    }

    #leaderboard th, #leaderboard td {
        padding: 8px;
        white-space: nowrap;
    }

    .question-amount-filter {
        display: none;
    }

    #question-amount-dropdown {
        display: block;
    }
}

@media (max-width: 480px) {
    #leaderboard table {
        min-width: 400px;
        font-size: 12px;
    }

    #leaderboard th, #leaderboard td {
        padding: 6px;
    }
}

/* Remove the horizontal scroll indicator */
.table-scroll-container {
    position: relative;
    overflow: hidden;
}

#question-amount-dropdown {
    max-width: 200px;
    margin: auto;
}

#try-again-btn {
    margin-top: 25px;
}
