/* Prefix: gh-lb- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Oxanium:wght@400;600;700&display=swap');

:root {
    --gh-lb-primary: #0c30ce;
    --gh-lb-secondary: #008cff;
    --gh-lb-dark: #0A0A23;
    --gh-lb-gold: #FFD700;
    --gh-lb-silver: #C0C0C0;
    --gh-lb-bronze: #CD7F32;
    --gh-lb-success: #00ff88;
}

.gh-lb-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0A0A23 0%, #1a1a3d 100%);
    padding: 140px 0 80px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow-x: hidden;
    color: #fff;
}

/* Background Particles */
.gh-lb-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gh-lb-particle {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 140, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: gh-lb-float 6s ease-in-out infinite;
}

@keyframes gh-lb-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Header Alignment */
.gh-lb-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gh-lb-trophy {
    margin-bottom: 15px;
}

.gh-lb-title {
    font-family: 'Oxanium';
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--gh-lb-secondary), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 140, 255, 0.4);
    margin: 10px 0;
    line-height: 1.1;
}

.gh-lb-trophy-animate {
    font-size: 4rem;
    animation: gh-lb-rotate 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes gh-lb-rotate {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

/* Stats Grid - Fully Responsive */
.gh-lb-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3.5rem;
    padding: 0 20px;
}

.gh-lb-stat-card {
    background: linear-gradient(145deg, #13132E, #0D0D21);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: 0.3s;
}

.gh-lb-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--gh-lb-secondary);
}

.gh-lb-stat-icon {
    font-size: 2.2rem;
    min-width: 55px;
    height: 55px;
    background: rgba(0, 140, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gh-lb-stat-info h3 {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gh-lb-stat-value {
    font-family: 'Oxanium';
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gh-lb-stat-label {
    font-size: 0.8rem;
    color: var(--gh-lb-secondary);
}

/* Table Section */
.gh-lb-table-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gh-lb-table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}

.gh-lb-table-header h2 {
    font-family: 'Oxanium';
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
}

.gh-lb-table-count {
    font-size: 0.9rem;
    color: #718096;
}

/* Table Wrapper for Mobile Scroll */
.gh-lb-table-wrapper {
    background: #0D0D21;
    border-radius: 15px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    overflow-x: auto;
    /* Enables horizontal scroll on small screens */
    scrollbar-width: thin;
    scrollbar-color: var(--gh-lb-secondary) transparent;
}

/* Custom Scrollbar for Chrome/Safari */
.gh-lb-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.gh-lb-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--gh-lb-secondary);
    border-radius: 10px;
}

.gh-lb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    /* Ensures content doesn't squeeze */
}

.gh-lb-table th {
    background: linear-gradient(90deg, var(--gh-lb-primary), var(--gh-lb-secondary));
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-family: 'Oxanium';
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
}

.gh-lb-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Rank Column */
.gh-lb-rank-badge {
    font-family: 'Oxanium';
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Player Info */
.gh-lb-player-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-width: 200px;
}

.gh-lb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gh-lb-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    position: relative;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.gh-lb-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid #0D0D21;
}

.gh-lb-status-dot.online {
    background: var(--gh-lb-success);
    box-shadow: 0 0 10px var(--gh-lb-success);
}

.gh-lb-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gh-lb-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
}

.gh-lb-game {
    font-size: 0.75rem;
    color: #718096;
    white-space: nowrap;
}

/* Progress Bars */
.gh-lb-score-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
}

.gh-lb-score-val {
    font-family: 'Oxanium';
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 50px;
}

.gh-lb-score-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.gh-lb-progress {
    height: 100%;
    background: linear-gradient(to right, var(--gh-lb-primary), var(--gh-lb-secondary));
}

.gh-lb-winrate {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 140px;
}

.gh-lb-win-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.gh-lb-win-bar div {
    height: 100%;
    background: var(--gh-lb-success);
}

.gh-lb-earnings {
    color: var(--gh-lb-success);
    font-weight: 700;
    font-family: 'Oxanium';
    font-size: 1rem;
    white-space: nowrap;
}

.gh-lb-status-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(0, 255, 136, 0.1);
    color: var(--gh-lb-success);
    border: 1px solid rgba(0, 255, 136, 0.2);
    display: inline-block;
}

/* Pagination */
.gh-lb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    padding: 0 20px;
}

/* MEDIA QUERIES FOR RESPONSIVENESS */

/* Large Tablets & Small Desktops */
@media (max-width: 1200px) {
    .gh-lb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 992px) {
    .gh-lb-page {
        padding-top: 100px;
    }

    .gh-lb-title {
        font-size: 3rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .gh-lb-title {
        font-size: 2.2rem;
    }

    .gh-lb-trophy-animate {
        font-size: 3rem;
    }

    .gh-lb-stats-grid {
        grid-template-columns: 1fr;
        /* Single column stats on mobile */
        gap: 1rem;
    }

    .gh-lb-stat-card {
        padding: 1.2rem;
    }

    .gh-lb-header p {
        font-size: 0.9rem;
        padding: 0 20px;
    }

    .gh-lb-table-header h2 {
        font-size: 1.4rem;
    }

    /* Pagination adjustments for small screens */
    .gh-lb-pagination .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .gh-lb-page {
        padding-top: 80px;
    }

    .gh-lb-title {
        font-size: 1.8rem;
    }

    .gh-lb-stat-icon {
        font-size: 1.8rem;
        min-width: 45px;
        height: 45px;
    }
}