/* Resetting defaults */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(145deg, #0c0f21, #1a1e34);
    /* Darker blues/purples */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    padding: 20px;
    /* Added padding for better spacing on small screens */
    overflow-x: hidden;
    /* Prevent horizontal overflow but allow vertical scrolling */
}


/* Floating Background Images */

.background-image {
    position: absolute;
    opacity: 0.1;
    animation: float 15s infinite;
    max-width: 200px;
    max-height: 200px;
    z-index: 1;
}

.background-image-1 {
    top: 10%;
    left: 5%;
}

.background-image-2 {
    bottom: 15%;
    right: 10%;
}

.background-image-3 {
    top: 30%;
    right: 5%;
}

.background-image-4 {
    bottom: 5%;
    left: 20%;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

.leaderboard-container {
    padding: 40px;
    border-radius: 15px;
    width: 100%;
    max-width: 900px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

.leaderboard-title {
    color: #e5b800;
    font-family: 'Montserrat', sans-serif;
    /* Bold headline font */
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.leaderboard-subtitle {
    font-size: 16px;
    color: #bbbbbb;
    margin-bottom: 20px;
}


/* Button Styles */

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cta-button,
.learn-more-button {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.cta-button {
    background: linear-gradient(145deg, #e5b800, #f4c300);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    background: linear-gradient(145deg, #e5b800, #f4c300);
}

.learn-more-button {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.learn-more-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

header p {
    margin: 10px 0;
    font-size: 1.2rem;
}

header .subtext {
    color: #ffcc00;
    /* Accent yellow */
    font-size: 1rem;
}

.top-three {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.user {
    background: rgba(34, 37, 63, 0.95);
    /* Darker purple background */
    padding: 20px;
    border-radius: 10px;
    width: 30%;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease;
}

.user:hover {
    transform: translateY(-10px);
}

.user .avatar {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.user p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.first {
    border: 3px solid #ffcc00;
    /* Gold for the first place */
}

.second {
    border: 3px solid silver;
}

.third {
    border: 3px solid #cd7f32;
    /* Bronze for third place */
}

table.leaderboard {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table.leaderboard th,
table.leaderboard td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #28314a;
    /* Dark border */
    transition: background-color 0.3s ease;
}

table.leaderboard th {
    background-color: rgba(38, 45, 75, 0.9);
    /* Darker purple/blue */
    font-weight: bold;
    color: #ffffff;
}

table.leaderboard tr:nth-child(even) {
    background-color: rgba(44, 52, 88, 0.9);
    /* Dark purple */
}

table.leaderboard tr:hover td {
    background-color: rgba(50, 59, 99, 0.9);
    /* Slightly lighter on hover */
}

footer {
    margin-top: 20px;
    font-size: 1rem;
    color: #ffcc00;
    /* Accent yellow */
}


/* Responsive Design */

@media screen and (max-width: 768px) {
    .top-three {
        flex-direction: column;
        align-items: center;
    }
    .user {
        width: 80%;
        margin-bottom: 20px;
    }
    .leaderboard-title {
        font-size: 28px;
    }
    .cta-button,
    .learn-more-button {
        font-size: 14px;
        padding: 8px 16px;
    }
    .background-image {
        max-width: 120px;
        max-height: 120px;
    }
}

@media screen and (max-width: 480px) {
    .leaderboard-container {
        padding: 20px;
    }
    .leaderboard-title {
        font-size: 24px;
    }
    header p {
        font-size: 1rem;
    }
    .user .avatar {
        width: 60px;
        height: 60px;
    }
    table.leaderboard th,
    table.leaderboard td {
        padding: 10px;
    }
}