/* ================================================================
   BASIC LAYOUT
================================================================ */
* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top, #111 0%, #000 100%);
    color: #fff;
    font-family: "Poppins", sans-serif;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* ================================================================
   MONTH DISPLAY
================================================================ */
#monthDisplay {
    font-size: 1.5rem;
    color: yellow;
    margin-bottom: 25px;
    font-weight: bold;
}

/* ================================================================
   HEADER
================================================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    background: rgba(25, 25, 25, 0.95);
    padding: 5px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

#logo {
    display: flex;
    gap: 8px;
}

#logo-img {
    width: 50px;
}

#logo-txt {
    font-size: 1.2rem;
    width: 98px;
    align-self: flex-end;
    text-align: left;
}

#links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.social {
    width: 30px;
    border-radius: 10px;
}

.social:hover {
    border: white 2px solid;
}

/* ================================================================
   MAIN CONTENT AREA
================================================================ */
#main {
    flex: 1 1 auto;
    overflow-y: auto;

    /* space for fixed header & footer */
    margin-top: 90px;
    /* adjust if header height changes */
    margin-bottom: 60px;
    /* adjust if footer height changes */
    padding: 0 20px;
}

/* ================================================================
   LEADERBOARD BOX
================================================================ */
#leaderboard {
    margin: 0 auto;
    width: 35vw;
    background: rgba(25, 25, 25, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    width: 100%;
}

.entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.entry:last-child {
    border-bottom: none;
}

/* --- Columns inside each row --- */
.rank {
    width: 30px;
    text-align: left;
    font-weight: bold;
}

.name {
    min-width: 50px;
    flex: 1 0 40%;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;

}

.score {
    width: 50px;
    text-align: center;
    font-weight: 600;
}

.time {
    flex: 0 1 auto;
    min-width: 70px;
    font-size: 0.8rem;
    color: #bbb;
    text-align: right;

}

/* ================================================================
   TOP 3 COLORS
================================================================ */
/* --- TOP 3 COLORS (Shiny Metallic Text) --- */
.top1 .rank,
.top1 .name,
.top1 .score {
  font-weight: 900;
  background: linear-gradient(90deg, #b6862c, #ffecb3, #d4af37, #b6862c);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 3s linear infinite;
}

.top2 .rank,
.top2 .name,
.top2 .score {
  font-weight: 900;
  background: linear-gradient(90deg, #b8b8b8, #ffffff, #c0c0c0, #8c8c8c);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 3s linear infinite;
}

.top3 .rank,
.top3 .name,
.top3 .score {
  font-weight: 900;
  background: linear-gradient(90deg, #7c3f00, #b87333, #d27d2d, #ffb07c, #7c3f00);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 3s linear infinite;
}

/* shared shine animation */
@keyframes shine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ================================================================
   FOOTER
================================================================ */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background: rgba(25, 25, 25, 0.95);
    padding: 5px 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.4);
}

#lastUpdated {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
}

/* ================================================================
   REFRESH ANIMATION
================================================================ */
.spin {
    animation: spin 0.8s linear;
}

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

    100% {
        transform: rotate(360deg);
    }
}


/* ================================================================
   MOBILE RESPONSIVE STYLES
================================================================ */
@media (max-width: 800px) {
    #leaderboard {
        width: 85vw;
    }

    .time {
        width: 80px;
    }
    
    #logo {
        display: flex;
        gap: 5px;
    }

    #logo-img {
        width: 40px;
    }

    #logo-txt {
        font-size: 1rem;
        width: 85px;
        align-self: flex-end;
        text-align: left;
    }

    #links {
        display: flex;
        gap: 10px;
        list-style: none;
    }

    .social {
        width: 24px;
        border-radius: 8px;
    }
}