html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #C9B79C;
    color: #333;
}

/* Header */
.site-header {
    background-color: #71816D;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Container */
.leaderboard-container {
    max-width: 80%;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    font-size: 2.5rem;
    color: #4a5448;
    margin-bottom: 30px;
    text-align: center;
}

/* Search and Dropdown Button */
.search-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#searchBar {
    flex: 1;
    max-width: 400px;
    padding: 14px 20px;
    background-color: #F1E0C5;
    border: 2px solid #71816D;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

#searchBar:focus {
    background-color: #ffedd0;
    box-shadow: 0 4px 12px rgba(113, 129, 109, 0.2);
}

.dropbtn {
    background-color: #71816D;
    color: white;
    padding: 14px 25px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropbtn:hover { background-color: #5a6657; }
.dropdown-content {
    background-color: #F1E0C5;
    border: 2px solid #71816D;
    border-radius: 20px;
    max-width: 400px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease;
    padding: 0 20px; 
}

.dropdown-content.show {
    max-height: 800px;
    opacity: 1;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Filter Sections */
.filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(113, 129, 109, 0.2);
}

.filter-section:last-child { border-bottom: none; }

.filter-label {
    display: block;
    font-weight: bold;
    color: #4a5448;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.SchoolCheck {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
   
}

.SchoolCheck input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #71816D;
    cursor: pointer;
}

.GradeCheck {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.GradeCheck input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #71816D;
    cursor: pointer;
}

/* Range Sliders */
#rating-container {
    width: 100%;
    padding: 10px 0;
}

.values {
    text-align: center;
    font-weight: bold;
    color: #71816D;
    margin-bottom: 15px;
    font-size: 1.1rem;
}


.slider-wrapper {
    position: relative;
    width: 100%; 
    height: 8px;
    background: #C9B79C;
    border-radius: 5px;
}

input[type="range"] {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    pointer-events: none;
    appearance: none;
    margin: 0;
}


input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #71816D;
    cursor: pointer;
    pointer-events: auto;

    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #71816D;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #F1E0C5;
}
.leaderboard {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.leaderboard thead th {
    background-color: #71816D;
    color: white;
    padding: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-family: Roboto, Helvetica, Arial, sans-serif;
    
}



.leaderboard thead th:first-child { border-radius: 8px 0 0 0; }
.leaderboard thead th:last-child { border-radius: 0 8px 0 0; }

.leaderboard td {
    padding: 16px;
    background-color: #F1E0C5;
    text-align: center;
}

.Player td {
    padding: 6px 10px;
}

.Player:hover td {
    background-color: #ffedd0;
}

.Player td:first-child { 
    border-radius: 4px 0 0 4px;
    font-weight: bold;
    color: #71816D;
}

.Player:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.Player {
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}


.Player td:last-child { border-radius: 0 4px 4px 0; }

.RatingSort {
    cursor: pointer;
    transition: transform 0.2s;
}

.RatingSort:hover {
    transition-property: all;
    background-color: #5a6657;
}

.dropbtn.active {
    background-color: #5a6657;
}

.RatingSort.active {
    background-color: #5a6657;
}

.live-rating {
    white-space: nowrap;
}

.delta {
    margin-left: 6px;
    font-size: 0.85em;
}

.delta-up {
    color: #2ecc71; /* green */
}

.delta-down {
    color: #e74c3c; /* red */
}

.delta-neutral {
    color: #999;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    font-family: inherit;
}

/* Buttons */
.pagination button {
    background-color: #71816D;        /* same as header */
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Hover */
.pagination button:hover:not(:disabled) {
    background-color: #5f6f5b;
    transform: translateY(-1px);
}

/* Disabled */
.pagination button:disabled {
    background-color: #a3a99e;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media screen and (max-width: 900px) {
  .site-header {
    background-color: #71816D;
    color: white;
    padding: 1rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header h1 {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Container */
.leaderboard-container {
    max-width: 90%;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    font-size: 2.5rem;
    color: #4a5448;
    margin-bottom: 30px;
    text-align: center;
}

/* Search and Dropdown Button */
.search-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#searchBar {
    flex: 1;
    max-width: 400px;
    padding: 14px 20px;
    background-color: #F1E0C5;
    border: 2px solid #71816D;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

#searchBar:focus {
    background-color: #ffedd0;
    box-shadow: 0 4px 12px rgba(113, 129, 109, 0.2);
}

.dropbtn {
    background-color: #71816D;
    color: white;
    padding: 14px 25px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropbtn:hover { background-color: #5a6657; }
.dropdown-content {
    background-color: #F1E0C5;
    border: 2px solid #71816D;
    border-radius: 20px;
    max-width: 400px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease;
    padding: 0 20px; 
}

.dropdown-content.show {
    max-height: 800px;
    opacity: 1;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Filter Sections */
.filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(113, 129, 109, 0.2);
}

.filter-section:last-child { border-bottom: none; }

.filter-label {
    display: block;
    font-weight: bold;
    color: #4a5448;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.SchoolCheck {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
   
}

.SchoolCheck input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #71816D;
    cursor: pointer;
}

.GradeCheck {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.GradeCheck input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #71816D;
    cursor: pointer;
}

/* Range Sliders */
#rating-container {
    width: 100%;
    padding: 10px 0;
}

.values {
    text-align: center;
    font-weight: bold;
    color: #71816D;
    margin-bottom: 15px;
    font-size: 1.1rem;
}


.slider-wrapper {
    position: relative;
    width: 100%; 
    height: 8px;
    background: #C9B79C;
    border-radius: 5px;
}

input[type="range"] {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    pointer-events: none;
    appearance: none;
    margin: 0;
}


input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #71816D;
    cursor: pointer;
    pointer-events: auto;

    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #71816D;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #F1E0C5;
}
.leaderboard {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 4px;
}



.leaderboard thead th {
    background-color: #71816D;
    color: white;
    padding: 15px;
    font-size: 0.6rem;
    text-transform: uppercase;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}




.leaderboard thead th:first-child { 
    width: 2.5%;
    border-radius: 8px 0 0 0; 

}
.leaderboard thead th:last-child { border-radius: 0 8px 0 0; }
.leaderboard thead th:nth-child(4) { display: none;}

.leaderboard td {
    padding: 16px;
    text-align: center;

}

.Player td {
    padding: 6px 10px;
}

.Player:hover td {
    background-color: #ffedd0;
}
.Player td:nth-child(4) { display: none; }

.Player td:first-child { 
    border-radius: 4px 0 0 4px;
    font-weight: bold;
    color: #71816D;
}

.Player:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.Player {
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    font-size: 0.75rem;
}


.Player td:last-child { border-radius: 0 4px 4px 0; }

.RatingSort {
    cursor: pointer;
    transition: transform 0.2s;
}

.RatingSort:hover {
    transition-property: all;
    background-color: #5a6657;
}

.dropbtn.active {
    background-color: #5a6657;
}

.RatingSort.active {
    background-color: #5a6657;
}

.live-rating {
    white-space: nowrap;
}

.delta {
    margin-left: 6px;
    font-size: 0.85em;
}

.delta-up {
    color: #2ecc71; /* green */
}

.delta-down {
    color: #e74c3c; /* red */
}

.delta-neutral {
    color: #999;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    font-family: inherit;
}

/* Buttons */
.pagination button {
    background-color: #71816D;        /* same as header */
    color: white;
    border: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Hover */
.pagination button:hover:not(:disabled) {
    background-color: #5f6f5b;
    transform: translateY(-1px);
}

/* Disabled */
.pagination button:disabled {
    background-color: #a3a99e;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
}