/* Leaderboard Banner Styles */
.leaderboard {
    max-width: 1200px;
    margin: 2rem auto;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.leaderboard-banner {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f5dc 0%, #e6d9b7 100%);
    border-radius: 10px;
    border: 2px solid #d6b98a;
    position: relative;
    overflow: hidden;
}

.banner-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.banner-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.banner-x {
    font-size: 4rem;
    color: var(--clr-orange-dark);
    font-weight: bold;
    margin: 0 0.5rem;
}

.banner-title {
    color: var(--clr-text-primary);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.coin-icon {
    width: 1em;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.banner-period {
    color: var(--clr-text-dark);
    font-size: 1.4rem;
    font-weight: 500;
}

.period-dates {
    color: var(--clr-orange-dark);
    font-weight: bold;
}

/* Podium Styles */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.podium-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 300px;
    position: relative;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.podium-card.first {
    order: 2;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffc800 100%);
    z-index: 3;
    animation-delay: 0.2s;
}

.podium-card.second {
    order: 1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #c0c0c0 0%, #b0b0b0 100%);
    z-index: 2;
    animation-delay: 0.4s;
}

.podium-card.third {
    order: 3;
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    z-index: 1;
    animation-delay: 0.6s;
}

.rank {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.2rem;
    color: #2c2c2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.stats {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
    color: #2c2c2c;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.stat:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: 600;
    font-size: 1.1rem;
}

.value {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.3rem;
}

.value-coin {
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: middle;
}


/* Countdown Timer Styles */
.countdown-container {
    margin-top: 3rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.countdown-title {
    color: var(--clr-orange-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Arial', sans-serif;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-item span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--clr-orange-main);
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--clr-text-dark);
    margin-top: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: bold;
    color: var(--clr-orange-main);
    margin: 0 0.5rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Leaderboard Table Style */
.leaderboard-container {
    max-width: 900px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.leaderboard-header {
    background: var(--clr-orange-main);
    padding: 1rem;
    text-align: center;
}

.leaderboard-header h3 {
    color: white;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: 70px 1.5fr 140px 120px;
    gap: 1px;
    background: #f0f0f0;
    font-size: 1.1rem;
}

.grid-header {
    background: var(--clr-orange-dark);
    color: white;
    padding: 1.1rem 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-cell {
    background: white;
    padding: 1rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.2s ease;
}

.grid-cell.rank {
    font-weight: 700;
    color: var(--clr-orange-dark);
    font-size: 1.2rem;
}

.grid-cell.user {
    justify-content: flex-start;
    padding-left: 1.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    object-fit: cover;
    border: 2px solid var(--clr-orange-main);
}

.value-coin {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.leaderboard-grid > :nth-child(8n+5),
.leaderboard-grid > :nth-child(8n+6),
.leaderboard-grid > :nth-child(8n+7),
.leaderboard-grid > :nth-child(8n+8) {
    background-color: #f9f9f9;
}

.leaderboard-grid > div:not(.grid-header):hover {
    background-color: #fff8f0 !important;
    transform: scale(1.01);
    z-index: 1;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .countdown-container {
        padding: 0.8rem;
        margin: 2rem 1rem;
        max-width: 100%;
    }

    .countdown-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .countdown {
        gap: 0.3rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .countdown-item span:first-child {
        font-size: 2rem;
        padding: 0.4rem 0.8rem;
        min-width: 60px;
    }

    .countdown-label {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
        margin: 0 0.3rem;
    }
}

@media (max-width: 480px) {
    .countdown {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 45%;
        margin-bottom: 0.5rem;
    }

    .countdown-item span:first-child {
        font-size: 1.8rem;
        min-width: 50px;
    }

    .countdown-separator {
        display: none;
    }

    .countdown-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .leaderboard-container {
        margin: 1.5rem;
        border-radius: 10px;
    }
    
    .leaderboard-grid {
        grid-template-columns: 50px 1.5fr 100px 90px;
        font-size: 1rem;
    }
    
    .grid-header {
        font-size: 0.9rem;
        padding: 0.9rem 0.5rem;
    }
    
    .grid-cell {
        padding: 0.9rem 0.5rem;
        font-size: 1rem;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .grid-cell.user {
        padding-left: 0.8rem;
    }
    
    .value-coin {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .banner-header {
        flex-direction: row;
        gap: 0.5rem;
    }

    .banner-logo {
        height: 60px;
    }
    
    .banner-title {
        font-size: 1.6rem;
    }
    
    .banner-period {
        font-size: 1.1rem;
    }
    
    .banner-logo[src*="csgowin.png"] {
        content: url("../images/ava-basic.webp");
        height: 80px;
    }

    .banner-x {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .podium {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .podium-card {
        max-width: 100%;
        margin-bottom: 0 !important;
        order: 2; 
    }
    
    .podium-card.first {
        order: 1; 
    }
    
    .podium-card.second {
        order: 2;
    }
    
    .podium-card.third {
        order: 3;
    }

    /* Leaderboard container responsive */
    .leaderboard-container {
        margin: 1rem;
        padding: 1rem;
        overflow-x: auto;
    }

    .leaderboard-grid {
        min-width: 600px;
    }

    .grid-header,
    .grid-cell {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .user-avatar {
        width: 24px;
        height: 24px;
    }

    .banner-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .banner-period {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .leaderboard-container {
        margin: 0.5rem;
        padding: 0.5rem;
    }

    .leaderboard-header h3 {
        font-size: 1.1rem;
        padding: 0.5rem;
    }

    .grid-header,
    .grid-cell {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }

    .user-avatar {
        width: 20px;
        height: 20px;
    }

    .value-coin {
        width: 14px;
        height: 14px;
    }

    .banner-title {
        font-size: 1.2rem;
    }

    .banner-period {
        font-size: 0.8rem;
    }
}

/* Socials Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.modal[aria-hidden="false"] { display: block; }
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.modal-dialog {
    position: relative;
    width: 420px;
    max-width: calc(100% - 32px);
    margin: 6vh auto;
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem 1.4rem 1.6rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 1;
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
}
.socials-grid {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 0.6rem;
}
.social-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    background: #f7f7f7;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.social-link:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.social-svg { width: 20px; height: 20px; fill: currentColor; }

