.highcharts-figure,
.highcharts-data-table table {
    min-width: 310px;
    max-width: 800px;
    margin: 1em auto;
}

#comparison-container,
#line-container,
#h-container {
    height: 600px;
}

#line-container text.highcharts-title,
#h-container text.highcharts-title,
#comparison-container text.highcharts-title {
    display: inline;
}

#line-container .highcharts-legend,
#h-container .highcharts-legend,
#comparison-container .highcharts-legend {
    display: block;
}

.highcharts-data-table table {
    font-family: Verdana, sans-serif;
    border-collapse: collapse;
    border: 1px solid #ebebeb;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: 600;
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.highcharts-description {
    margin: 0.3rem 10px;
}

.rank-column {
    font-size: 1.2em;
    text-align: center;
    min-width: 100px;
}

.medal-icon {
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

.profile-image-column {
    width: 120px;
    text-align: center;
    padding: 5px;
}

.user-profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    aspect-ratio: 1;
}

@media screen and (max-width: 480px) {
  .user-profile-image {
    width: 30px;
    height: 30px;
  }
}

.anonymous-user-icon {
    font-size: 2em;
    color: #666;
}

.star-rating-column {
    text-align: center;
    min-width: 100px;
}

.star-rating {
    color: #ffd700;  /* Gold color for stars */
    font-size: 1.2em;
    letter-spacing: 2px;
}

.star-rating .fas,
.star-rating .far {
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

/* Optional hover effect to show percentage */
.star-rating:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

/* Title styling */
.game-summary-title {
    text-align: center;
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    margin: 20px 0 40px;
    font-family: 'Poppins', sans-serif;
}

.last-quiz-title {
    font-size: 14px;
    font-weight: 700;
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
    color: #6DC0FC;
}

/* Table styling */
#leaderboard-table-main,
[id^="leaderboard-table-"] {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 20px 0;
    border-radius: 15px;
    border: 3px solid #4652FA;
    overflow: hidden;
    position: relative;
    background: transparent;
    font-size: 1.2em;
    font-weight: 700;
    color: #ffffff;
}


/* Remove default table borders and set transparent background */
#leaderboard-table-main td,
#leaderboard-table-main th,
[id^="leaderboard-table-"] td,
[id^="leaderboard-table-"] th {
    border: none;
    padding: 15px;
    background: transparent;
    vertical-align: middle;
}

/* Remove header styling completely */
#leaderboard-table-main thead,
[id^="leaderboard-table-"] thead {
    display: none;
}

/* Remove zebra striping */
#leaderboard-table-main tr:nth-child(even),
[id^="leaderboard-table-"] tr:nth-child(even) {
    background: transparent;
}

/* Hover effect */
#leaderboard-table-main tr:hover,
[id^="leaderboard-table-"] tr:hover {
    background: rgba(109, 192, 252, 0.05);
}

/* Marked user row styling */
#leaderboard-table-main .marked,
[id^="leaderboard-table-"] .marked {
    background: rgba(109, 192, 252, 0.1);
}

.leaderboard-callout {
    font-size: 0.9em;
    margin: 15px 0;
    padding: 10px 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: center;
}

.leaderboard-callout a {
    text-decoration: underline;
    color: #6DC0FC;
}

.leaderboard-callout a:hover {
    color: #ffffff;
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    .star-rating-column {
        display: none;
    }
    
    /* Adjust other columns for better mobile layout */
    .rank-column {
        min-width: 60px;
    }
    
    .profile-image-column {
        width: 80px;
    }
    
    .medal-icon {
        width: 32px;
        height: 32px;
    }
    
    #leaderboard-table-main td,
    [id^="leaderboard-table-"] td {
        padding: 10px;
    }
}

/* Leaderboard Tabs */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 0 20px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4652FA;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 150px;
}

.tab-button:hover {
    background: rgba(109, 192, 252, 0.2);
    border-color: #6DC0FC;
}

.tab-button.active {
    background: #4652FA;
    border-color: #4652FA;
    color: white;
    box-shadow: 0 0 15px rgba(70, 82, 250, 0.3);
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    .leaderboard-tabs {
        gap: 5px;
        padding: 0 10px;
    }

    .tab-button {
        padding: 8px 16px;
        font-size: 1em;
        min-width: 120px;
    }
}