/*
====================================
LEADERBOARD - 4eSport
Black & White Animated Theme
====================================
*/

:root {
    --black: #000000;
    --white: #FFFFFF;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --border-width: 3px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 1920px;
    height: 1080px;
    background-color: transparent;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ================== MAIN CONTAINER ================== */
.leaderboard-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    flex-direction: column;
    padding: 25px 50px;
}

/* ================== ANIMATED GRID BACKGROUND ================== */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.03) 40px,
            rgba(255, 255, 255, 0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.03) 40px,
            rgba(255, 255, 255, 0.03) 41px
        );
    animation: gridScroll 20s linear infinite;
    z-index: 1;
}

@keyframes gridScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* ================== HEADER ================== */
.leaderboard-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    animation: headerSlideIn 0.8s ease-out;
}

@keyframes headerSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-header {
    width: 70px;
    margin-left: 50px;
}

.header-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.leaderboard-title {
    flex: 1;
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 5px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
    }
}

.page-indicator {
    width: 100px;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

/* ================== CAMERA FRAME ================== */
.lb-camera-frame {
    position: relative;
    width: 320px;
    height: 180px;
    margin: 0 40px;
    border: 2px solid var(--white);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.lb-camera-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
}

.lb-corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.lb-corner-tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.lb-corner-bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.lb-corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.lb-camera-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--white) 50%, 
        transparent 100%
    );
    box-shadow: 0 0 10px var(--white);
    animation: cameraScan 3s ease-in-out infinite;
}

@keyframes cameraScan {
    0%, 100% {
        top: 0;
        opacity: 0.3;
    }
    50% {
        top: calc(100% - 2px);
        opacity: 0.8;
    }
}

/* ================== TABLE ================== */
.leaderboard-table {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.table-header {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    border-bottom: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    animation: tableHeaderSlide 0.8s ease-out 0.2s backwards;
}

@keyframes tableHeaderSlide {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.col-rank {
    width: 60px;
    text-align: center;
}

.col-team {
    flex: 1;
    padding-left: 15px;
}

.col-points {
    width: 120px;
    text-align: center;
}

.col-kills {
    width: 100px;
    text-align: center;
}

.col-games {
    width: 100px;
    text-align: center;
}

/* ================== TABLE BODY ================== */
.table-body {
    flex: 1;
    border: 2px solid var(--white);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    max-height: 750px;
}

.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================== TEAM ROW ================== */
.team-row {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: rowSlideIn 0.5s ease-out backwards;
}

.team-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.team-row:nth-child(1) { animation-delay: 0.1s; }
.team-row:nth-child(2) { animation-delay: 0.15s; }
.team-row:nth-child(3) { animation-delay: 0.2s; }
.team-row:nth-child(4) { animation-delay: 0.25s; }
.team-row:nth-child(5) { animation-delay: 0.3s; }
.team-row:nth-child(6) { animation-delay: 0.35s; }
.team-row:nth-child(7) { animation-delay: 0.4s; }
.team-row:nth-child(8) { animation-delay: 0.45s; }
.team-row:nth-child(9) { animation-delay: 0.5s; }
.team-row:nth-child(10) { animation-delay: 0.55s; }

@keyframes rowSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.rank-cell {
    width: 60px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
}

.rank-cell.rank-1 {
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold);
}

.rank-cell.rank-2 {
    color: var(--silver);
    text-shadow: 0 0 15px var(--silver);
}

.rank-cell.rank-3 {
    color: var(--bronze);
    text-shadow: 0 0 15px var(--bronze);
}

.team-cell {
    flex: 1;
    padding-left: 15px;
}

.team-members {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

.points-cell {
    width: 120px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.kills-cell {
    width: 100px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.games-cell {
    width: 100px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* ================== FOOTER ================== */
.leaderboard-footer {
    position: relative;
    z-index: 10;
    margin-top: 15px;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

/* ================== CORNER DECORATIONS ================== */
.corner-deco {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid var(--white);
    z-index: 5;
    animation: cornerPulse 3s ease-in-out infinite;
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

.corner-tl {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* ================== PARTICLES ================== */
.lb-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    animation: particleFloat 12s ease-in-out infinite;
    z-index: 2;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-1080px) translateX(50px);
    }
}

.particle-1 { left: 15%; bottom: 0; animation-delay: 0s; }
.particle-2 { left: 45%; bottom: 0; animation-delay: 3s; }
.particle-3 { left: 75%; bottom: 0; animation-delay: 6s; }
.particle-4 { left: 30%; bottom: 0; animation-delay: 9s; }

/* ================== PAGE TRANSITION ================== */
@keyframes pageTransition {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.page-transitioning .table-body {
    animation: pageTransition 0.8s ease-in-out;
}
