/*
=========================================================
BPD GAMING NETWORK
ROCKET LEAGUE HOME
=========================================================
*/

.rocket-league-page {
    --rl-background: #070812;
    --rl-panel: rgba(13, 15, 27, 0.9);
    --rl-card: rgba(18, 20, 34, 0.88);
    --rl-card-hover: rgba(25, 27, 45, 0.94);
    --rl-border: rgba(255, 255, 255, 0.09);
    --rl-border-bright: rgba(124, 92, 255, 0.48);
    --rl-text: #f5f7ff;
    --rl-text-muted: #9ba3b8;
    --rl-accent: #7c5cff;
    --rl-accent-light: #a998ff;
    --rl-accent-secondary: #58b6ff;
    --rl-accent-soft: rgba(124, 92, 255, 0.14);
    --rl-accent-glow: rgba(124, 92, 255, 0.32);

    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 60vh;
    margin: 0;
    padding: clamp(8px, 1vw, 16px);
    overflow: hidden;
    background: transparent;
    color: var(--rl-text);
}

/*
=========================================================
BACKGROUND
=========================================================
*/

.rocket-league-background-waves {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 82% 10%,
            rgba(88, 182, 255, 0.12),
            transparent 34%
        ),
        radial-gradient(
            circle at 20% 78%,
            rgba(124, 92, 255, 0.16),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #070812,
            #0a0c18 52%,
            #080916
        );
}

.rocket-league-background-waves::before,
.rocket-league-background-waves::after {
    position: absolute;
    width: 55vw;
    height: 55vw;
    border:
        1px solid
        rgba(124, 92, 255, 0.12);
    border-radius: 45%;
    content: "";
    filter: blur(2px);
}

.rocket-league-background-waves::before {
    top: -30vw;
    right: -18vw;
    transform: rotate(22deg);
}

.rocket-league-background-waves::after {
    bottom: -36vw;
    left: -20vw;
    transform: rotate(-18deg);
}

/*
=========================================================
PAGE PANEL
=========================================================
*/

.rocket-league-panel {
    position: relative;
    z-index: 1;
    width: 98%;
    max-width: 1500px;
    min-width: 0;
    min-height: 60vh;
    overflow: hidden;
    border: 1px solid var(--rl-border);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(16, 18, 31, 0.92),
            rgba(9, 11, 21, 0.88)
        );
    box-shadow:
        0 22px 60px
        rgba(0, 0, 0, 0.42),
        0 0 28px
        rgba(124, 92, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.rocket-league-page-content {
    position: relative;
    width: 100%;
    min-width: 0;
}

/*
=========================================================
HERO
=========================================================
*/

.rocket-league-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 48px 28px;
    overflow: hidden;
    border-bottom: 1px solid var(--rl-border);
    text-align: center;
    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.14),
            rgba(88, 182, 255, 0.06),
            transparent
        );
}

.rocket-league-hero::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            115deg,
            transparent 20%,
            rgba(124, 92, 255, 0.08) 48%,
            transparent 72%
        );
    content: "";
    pointer-events: none;
}

.rocket-league-page
.hero-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1000px);
}

.rocket-league-page
.hero-eyebrow {
    margin: 0;
    color: var(--rl-accent-light);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.24em;
}

.rocket-league-hero h1 {
    margin: 10px 0 0;
    font-size:
        clamp(
            2.5rem,
            7vw,
            5.4rem
        );
    line-height: 0.95;
    letter-spacing: -0.055em;
    text-shadow:
        0 0 28px
        rgba(124, 92, 255, 0.22);
}

.rocket-league-page
.hero-subtitle {
    margin: 18px 0 0;
    color: var(--rl-text-muted);
    font-size:
        clamp(
            0.95rem,
            2vw,
            1.15rem
        );
    font-weight: 600;
    letter-spacing: 0.08em;
}

/*
=========================================================
PLAYER PROFILE
=========================================================
*/

.rocket-league-page
.hero-player-profile {
    width: min(100%, 820px);
    margin: 28px auto 0;
}

.rocket-league-page
.hero-player-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.rocket-league-page
.hero-player-kicker {
    color: var(--rl-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.rocket-league-page
#rocketLeaguePlayerName {
    color: #ffffff;
    font-size:
        clamp(
            1.2rem,
            3vw,
            1.8rem
        );
}

.rocket-league-page
.rank-row {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 10px;
    margin-top: 18px;
}

.rocket-league-page
.rank-badge {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    border:
        1px solid
        var(--rank-color, var(--rl-border));
    border-radius: 12px;
    background:
        rgba(8, 10, 20, 0.62);
    box-shadow:
        inset 0 0 20px
        color-mix(
            in srgb,
            var(--rank-color, #7c5cff) 9%,
            transparent
        );
}

.rocket-league-page
.rank-playlist {
    color: var(--rl-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.rocket-league-page
.rank-name {
    color:
        var(
            --rank-color,
            var(--rl-text)
        );
    font-size: 0.9rem;
}

.rocket-league-page
.rank-mmr {
    color: var(--rl-text-muted);
    font-size: 0.75rem;
}

.rocket-league-page
.rank-status {
    margin: 12px 0 0;
    color: var(--rl-text-muted);
    font-size: 0.76rem;
}

.rocket-league-page
.rank-status[data-state="error"] {
    color: #ff9ba8;
}

.rocket-league-page
.rank-loading,
.rocket-league-page
.rank-unranked {
    --rank-color: #7f8799;
}

.rocket-league-page
.rank-bronze {
    --rank-color: #c58b9b;
}

.rocket-league-page
.rank-silver {
    --rank-color: #c4cad8;
}

.rocket-league-page
.rank-gold {
    --rank-color: #f1d784;
}

.rocket-league-page
.rank-platinum {
    --rank-color: #75d9e8;
}

.rocket-league-page
.rank-diamond {
    --rank-color: #58b6ff;
}

.rocket-league-page
.rank-champion {
    --rank-color: #a998ff;
}

.rocket-league-page
.rank-grand-champion {
    --rank-color: #ff8ebd;
}

.rocket-league-page
.rank-supersonic {
    --rank-color: #e8ecff;
}

/*
=========================================================
CONTENT
=========================================================
*/

.rocket-league-content {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
    padding: 42px 0 70px;
}

.rocket-league-page
.content-card,
.rocket-league-dashboard {
    position: relative;
    padding:
        clamp(
            22px,
            4vw,
            38px
        );
    overflow: hidden;
    border: 1px solid var(--rl-border);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(20, 22, 37, 0.92),
            rgba(11, 13, 24, 0.88)
        );
    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.28);
}

.rocket-league-page
.content-card::before,
.rocket-league-dashboard::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background:
        linear-gradient(
            180deg,
            var(--rl-accent),
            var(--rl-accent-secondary)
        );
    content: "";
}

.rocket-league-page
.card-label {
    color: var(--rl-accent-light);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.rocket-league-page
.content-card h2,
.rocket-league-dashboard h2 {
    margin: 10px 0 0;
    font-size:
        clamp(
            1.55rem,
            4vw,
            2rem
        );
}

.rocket-league-page
.content-card p,
.rocket-league-dashboard p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--rl-text-muted);
    line-height: 1.7;
}

/*
=========================================================
LOGIN
=========================================================
*/

.rocket-league-page
.auth-login-card {
    margin-top: 20px;
}

.rocket-league-page
.guest-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.rocket-league-page
.auth-login-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    overflow: hidden;
    border:
        1px solid
        var(--rl-border-bright);
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.2),
            rgba(88, 182, 255, 0.12)
        );
    color: var(--rl-accent-light);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    appearance: none;
    cursor: pointer;
    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, 0.24),
        0 0 16px
        rgba(124, 92, 255, 0.14);
    transition:
        color 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
    animation:
        pageLoginPulse
        2.4s
        ease-in-out
        infinite;
}

.rocket-league-page
.auth-login-button::before {
    position: absolute;
    top: -50%;
    bottom: -50%;
    left: -45%;
    width: 30%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.22),
            transparent
        );
    content: "";
    pointer-events: none;
    transform:
        rotate(18deg)
        translateX(-200%);
    transition:
        transform 0.55s ease;
}

.rocket-league-page
.auth-login-button:hover::before,
.rocket-league-page
.auth-login-button:focus-visible::before {
    transform:
        rotate(18deg)
        translateX(650%);
}

.rocket-league-page
.auth-login-button:hover,
.rocket-league-page
.auth-login-button:focus-visible {
    border-color:
        var(--rl-accent-light);
    background:
        linear-gradient(
            135deg,
            rgba(124, 92, 255, 0.32),
            rgba(88, 182, 255, 0.2)
        );
    color: #ffffff;
    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.3),
        0 0 24px
        var(--rl-accent-glow);
    outline: none;
    transform:
        translateY(-2px)
        scale(1.02);
    animation-play-state: paused;
}

.rocket-league-page
.auth-login-button:focus-visible {
    outline:
        2px solid
        var(--rl-accent-light);
    outline-offset: 3px;
}

.rocket-league-page
.auth-login-button:active {
    transform:
        translateY(0)
        scale(0.98);
}

.rocket-league-page
.auth-login-button-icon {
    font-size: 1.1rem;
    text-shadow:
        0 0 10px
        var(--rl-accent-glow);
}

/*
=========================================================
ADVERTISEMENT SLOTS
=========================================================
*/

.rocket-league-page
.ad-slot {
    width: 100%;
    min-height: 0;
}

.rocket-league-page
.ad-slot:not(:empty) {
    margin-top: 20px;
}

/*
=========================================================
DASHBOARD
=========================================================
*/

.rocket-league-dashboard {
    margin-top: 20px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-history-link,
.dashboard-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border:
        1px solid
        var(--rl-border-bright);
    border-radius: 9px;
    background: var(--rl-accent-soft);
    color: var(--rl-accent-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-history-link:hover,
.dashboard-history-link:focus-visible,
.dashboard-primary-link:hover,
.dashboard-primary-link:focus-visible {
    color: #ffffff;
    border-color: var(--rl-accent-light);
    background:
        rgba(124, 92, 255, 0.24);
    box-shadow:
        0 0 18px
        var(--rl-accent-glow);
    outline: none;
    transform: translateY(-1px);
}

/*
=========================================================
MATCH TABLE
=========================================================
*/

.matches-table-wrapper {
    width: 100%;
    margin-top: 26px;
    overflow-x: auto;
    border: 1px solid var(--rl-border);
    border-radius: 13px;
    background:
        rgba(7, 8, 18, 0.48);
}

.matches-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.matches-table th,
.matches-table td {
    padding: 14px 16px;
    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.07);
    text-align: left;
    vertical-align: middle;
}

.matches-table th {
    background:
        rgba(124, 92, 255, 0.09);
    color: #c8cee0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.matches-table td {
    color: #dce1ee;
    font-size: 0.82rem;
}

.matches-table tbody tr:last-child td {
    border-bottom: 0;
}

.matches-table tbody tr {
    transition:
        background 0.2s ease;
}

.matches-table tbody tr:hover {
    background:
        rgba(124, 92, 255, 0.07);
}

/*
=========================================================
EMPTY DASHBOARD
=========================================================
*/

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 32px 20px;
    text-align: center;
}

.dashboard-empty-state[hidden] {
    display: none;
}

.empty-state-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border:
        1px solid
        var(--rl-border-bright);
    border-radius: 50%;
    background: var(--rl-accent-soft);
    color: var(--rl-accent-light);
    font-size: 1.4rem;
    box-shadow:
        0 0 18px
        rgba(124, 92, 255, 0.18);
}

.dashboard-empty-state h3 {
    margin: 16px 0 0;
    font-size: 1.2rem;
}

.dashboard-empty-state p {
    margin-top: 8px;
}

.dashboard-primary-link {
    margin-top: 18px;
}

/*
=========================================================
VISIBILITY
=========================================================
*/

.rocket-league-page
[hidden] {
    display: none !important;
}

/*
=========================================================
ANIMATIONS
=========================================================
*/

@keyframes pageLoginPulse {
    0%,
    100% {
        box-shadow:
            0 8px 24px
            rgba(0, 0, 0, 0.24),
            0 0 10px
            rgba(124, 92, 255, 0.14);
    }

    50% {
        box-shadow:
            0 10px 28px
            rgba(0, 0, 0, 0.28),
            0 0 22px
            rgba(124, 92, 255, 0.4);
    }
}

/*
=========================================================
RESPONSIVE
=========================================================
*/

@media (max-width: 900px) {
    .rocket-league-page
    .rank-row {
        grid-template-columns: 1fr;
    }

    .dashboard-heading {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .rocket-league-page {
        padding: 8px;
    }

    .rocket-league-panel {
        width: 100%;
        border-radius: 15px;
    }

    .rocket-league-hero {
        min-height: 230px;
        padding: 36px 18px;
    }

    .rocket-league-content {
        width:
            calc(
                100%
                - 24px
            );
        padding: 24px 0 42px;
    }

    .rocket-league-page
    .content-card,
    .rocket-league-dashboard {
        border-radius: 14px;
    }

    .rocket-league-page
    .auth-login-button {
        width: 100%;
        padding: 0 16px;
    }

    .dashboard-history-link {
        width: 100%;
    }
}

/*
=========================================================
REDUCED MOTION
=========================================================
*/

@media (prefers-reduced-motion: reduce) {
    .rocket-league-page
    .auth-login-button {
        animation: none;
    }

    .rocket-league-page
    .auth-login-button::before {
        display: none;
    }

    .rocket-league-page *,
    .rocket-league-page *::before,
    .rocket-league-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

body[data-animations="off"]
.rocket-league-page
.auth-login-button {
    animation: none;
}