body.rustmagic-body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)), url('../images/rustmagic-body.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Leaderboard Banner */
.leaderboard-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 100px auto 40px;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.leaderboard-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53, #ff6b6b);
    background-size: 200% auto;
    animation: gradient 3s linear infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.leaderboard-banner h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.sponsor-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Leaderboard Header */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 32, 54, 0.8);
    border-radius: 10px;
    padding: 20px 30px;
    margin: 0 auto 30px;
    max-width: 1200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.leaderboard-logo {
    height: 40px;
    width: auto;
}

.subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    background: rgba(0, 247, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 247, 255, 0.3);
}

.coin-icon {
    width: 20px;
    height: 20px;
}

.countdown-timer {
    text-align: right;
}

.countdown-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00f7ff;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.time-block span:first-child {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 45px;
    text-align: center;
}

.time-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: 1px;
}

.time-separator {
    font-size: 2rem;
    font-weight: 700;
    color: #00f7ff;
    margin: 0 2px;
    position: relative;
    top: -5px;
}

.sponsor-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    backdrop-filter: blur(5px);
}

.sponsor-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #ff6b6b;
}

.sponsor-btn img {
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(0.5) brightness(1.2);
    transition: all 0.3s ease;
}

.sponsor-btn:hover img {
    filter: grayscale(0) brightness(1.5);
    transform: scale(1.05);
}

.sponsor-btn.active {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.sponsor-btn.active img {
    filter: grayscale(0) brightness(1.5);
}

.sponsor-btn.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

.sponsor-btn.coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .leaderboard-banner {
        margin: 100px 15px 20px;
        padding: 30px 15px;
    }
    
    .leaderboard-banner h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .sponsor-selector {
        gap: 10px;
    }
    
    .sponsor-btn {
        padding: 10px 15px;
        min-width: 140px;
    }
    
    .sponsor-btn img {
        max-height: 30px;
    }
    
    /* Responsive styles for leaderboard header */
    .leaderboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 15px;
        margin: 0 15px 20px;
    }
    
    .leaderboard-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .subtitle {
        font-size: 1.1rem;
        padding: 6px 12px;
        width: 100%;
        justify-content: center;
    }
    
    .countdown-timer {
        width: 100%;
        text-align: left;
    }
    
    .countdown-display {
        justify-content: space-between;
        width: 100%;
    }
    
    .time-block {
        min-width: auto;
        flex: 1;
    }
    
    .time-block span:first-child {
        font-size: 1.5rem;
        min-width: 35px;
    }
    
    .time-separator {
        font-size: 1.5rem;
        top: -2px;
    }
}

/* Podium Styles */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 50px;
    padding: 0 20px;
    position: relative;
    height: 400px;
}

.podium-card {
    background: rgba(26, 32, 54, 0.8);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 280px;
}

.podium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* First Place */
.first-place {
    height: 380px;
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
    border: 2px solid #ffd700;
    z-index: 3;
    margin-bottom: 20px;
}

.first-place .rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    color: #1a1a2e;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Second Place */
.second-place {
    height: 320px;
    background: linear-gradient(135deg, #3a3a5a 0%, #2a2a4a 100%);
    border: 2px solid #c0c0c0;
    z-index: 2;
    margin-bottom: 60px;
}

.second-place .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    color: #1a1a2e;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
}

/* Third Place */
.third-place {
    height: 320px;
    background: linear-gradient(135deg, #4a3a2a 0%, #3a2a1a 100%);
    border: 2px solid #cd7f32;
    z-index: 1;
    margin-bottom: 60px;
}

.third-place .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    color: #fff;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.4);
}

.rank-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.prize-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    margin: 10px 0 20px;
    padding: 10px 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.prize-amount .label,
.wager-amount .label {
    font-size: 1rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 5px;
    font-weight: 500;
}

.wager-amount .label {
    font-size: 0.9rem;
}

.prize-amount img {
    width: 24px;
    height: 24px;
}

.user-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.first-place .user-avatar {
    width: 140px;
    height: 140px;
    border: 4px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wager-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    margin-top: 10px;
}

.wager-amount img {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .podium-container {
        gap: 20px;
        height: auto;
        flex-direction: column;
        align-items: center;
        padding-bottom: 20px;
    }
    
    .podium-card {
        width: 80%;
        height: auto !important;
        margin-bottom: 30px !important;
        padding: 20px;
        order: 0;
    }
    
    /* Reorder cards for mobile: 1st, 2nd, 3rd */
    .first-place {
        order: 1;
        margin-bottom: 20px !important;
    }
    
    .second-place {
        order: 2;
    }
    
    .third-place {
        order: 3;
    }
    
    .user-avatar {
        width: 100px !important;
        height: 100px !important;
    }
}

@media (max-width: 768px) {
    .podium-card {
        width: 90%;
    }
    
    .prize-amount {
        font-size: 1.5rem;
    }
    
    .user-info h3 {
        font-size: 1.4rem;
    }
    
    .podium-container {
        padding: 0 15px 20px;
    }
}

/* Leaderboard Table Styles */
.leaderboard-section {
    max-width: 1200px;
    margin: 10px auto 60px;
    padding: 20px;
}

.lb-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.lb-header-row h2 {
    font-family: 'Orbitron', sans-serif;
    color: #e6f7ff;
    font-size: 1.6rem;
    margin: 0;
}

.lb-note {
    font-family: 'Roboto', sans-serif;
    color: #94a3b8;
    font-size: 0.95rem;
    background: rgba(0,0,0,0.25);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.04);
}

.leaderboard-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(180deg, rgba(26,32,54,0.6), rgba(17,24,39,0.6));
}

.leaderboard-table thead th {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #00f7ff;
    padding: 16px 20px;
    text-align: left;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.02);
    border-bottom: none;
}

.leaderboard-table tbody td {
    padding: 16px 20px;
    color: #dbeafe;
    font-family: 'Roboto', sans-serif;
    vertical-align: middle;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.leaderboard-table tbody tr:nth-child(odd) {
    background: rgba(255,255,255,0.01);
}

.leaderboard-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(255,107,107,0.06), rgba(0,247,255,0.03));
    transform: translateX(2px);
}

.leaderboard-table .rank {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #fff;
    width: 90px;
    min-width: 90px;
}

.leaderboard-table .username .user {
    font-family: 'orbitron', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.leaderboard-table .username img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.06);
}

.leaderboard-table .username span {
    color: #e6f7ff;
    font-weight: 500;
}

.leaderboard-table .wager {
    color: #c7f9ff;
    font-weight: 600;
}

.leaderboard-table td.wager .coin-icon,
.leaderboard-table td.prize .coin-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 4px;
}


.leaderboard-table td.wager,
.leaderboard-table td.prize {
    white-space: nowrap;
}

.leaderboard-table .prize {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
}

.leaderboard-table .prize .coin-icon {
    width: 18px;
    height: 18px;
}


.leaderboard-table td.wager {
    text-align: right;
    padding-right: 20px;
    min-width: 120px;
}

.leaderboard-table td.prize {
    text-align: right;
    padding-right: 20px;
    min-width: 120px;
}

.leaderboard-table .prize {
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 768px) {
    .lb-header-row { flex-direction: column; align-items: flex-start; }
    .leaderboard-table { min-width: 700px; }
    .leaderboard-section { padding: 12px; }
    .leaderboard-table thead th {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
    .leaderboard-table tbody td {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    .leaderboard-table .rank {
        width: 70px;
        min-width: 70px;
    }
    .leaderboard-table .username .user {
        min-width: 180px;
    }
    .leaderboard-table td.wager,
    .leaderboard-table td.prize {
        min-width: 100px;
    }
}

.leaderboard-table thead th:nth-child(3) {
    text-align: right;
    padding-right: 20px;
}

.leaderboard-table thead th:nth-child(4) {
    text-align: right;
    padding-right: 20px;
}