/* =========================================================
   PROFILE
========================================================= */

.profile-page {

    max-width:
        1300px;

    margin:
        auto;

    padding:
        145px 7% 100px;
}


/* HERO */

.profile-hero {

    display:
        grid;

    grid-template-columns:
        1fr 320px;

    gap:
        18px;
}

.profile-card {

    position:
        relative;

    min-height:
        310px;

    display:
        flex;

    align-items:
        center;

    gap:
        28px;

    padding:
        35px;

    border:
        1px solid
        var(--border);

    border-radius:
        24px;

    background:
        linear-gradient(
            145deg,
            rgba(17,26,46,.97),
            rgba(8,13,26,.97)
        );

    box-shadow:
        var(--shadow);

    overflow:
        hidden;
}

body.light-theme .profile-card {

    background:
        rgba(255,255,255,.94);
}

.profile-avatar {

    width:
        120px;

    height:
        120px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        linear-gradient(
            145deg,
            var(--primary),
            var(--primary-dark)
        );

    color:
        #fff;

    font-size:
        42px;

    font-weight:
        800;

    box-shadow:
        0 20px 45px
        rgba(37,99,235,.25);
}

.profile-information {

    display:
        flex;

    flex-direction:
        column;
}

.profile-badge {

    width:
        fit-content;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        6px;

    padding:
        5px 9px;

    margin-bottom:
        9px;

    border-radius:
        7px;

    color:
        var(--primary-light);

    background:
        rgba(59,130,246,.08);

    font-size:
        10px;
}

.profile-badge svg {

    width:
        13px;

    height:
        13px;
}

.profile-information h1 {

    font-size:
        36px;

    line-height:
        1.3;
}

.profile-username {

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        12px;
}

.profile-favorite {

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    margin-top:
        19px;

    color:
        var(--muted);

    font-size:
        11px;
}

.profile-favorite svg {

    width:
        16px;

    height:
        16px;

    color:
        #ef4444;
}

.profile-favorite strong {

    color:
        var(--primary-light);
}


/* EDIT */

.edit-profile-button {

    position:
        absolute;

    top:
        24px;

    left:
        24px;

    min-height:
        42px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    padding:
        0 14px;

    border:
        1px solid
        var(--border-strong);

    border-radius:
        10px;

    background:
        rgba(59,130,246,.05);

    color:
        var(--primary-light);

    cursor:
        pointer;

    font-size:
        10px;

    transition:
        all var(--transition);
}

.edit-profile-button:hover {

    color:
        #fff;

    background:
        var(--primary);

    border-color:
        var(--primary);

    transform:
        translateY(-2px);
}


/* STATS */

.profile-stats {

    display:
        grid;

    grid-template-columns:
        1fr;

    gap:
        12px;
}

.profile-stat {

    display:
        flex;

    align-items:
        center;

    gap:
        14px;

    padding:
        20px;

    border:
        1px solid
        var(--border);

    border-radius:
        17px;

    background:
        var(--card);

    transition:
        all var(--transition);
}

body.light-theme .profile-stat {

    background:
        rgba(255,255,255,.94);
}

.profile-stat:hover {

    transform:
        translateY(-3px);

    border-color:
        var(--border-strong);
}

.profile-stat > svg {

    width:
        21px;

    height:
        21px;

    color:
        var(--primary-light);
}

.profile-stat div {

    display:
        flex;

    flex-direction:
        column;
}

.profile-stat strong {

    font-size:
        20px;
}

.profile-stat span {

    color:
        var(--muted);

    font-size:
        9px;
}


/* SECTION */

.profile-section {

    padding-top:
        100px;
}

.profile-section-heading {

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        30px;
}

.profile-section-heading > div > span {

    color:
        var(--primary-light);

    font-size:
        10px;
}

.profile-section-heading h2 {

    margin-top:
        7px;

    font-size:
        32px;
}

.profile-section-heading h2 strong {

    color:
        var(--primary-light);
}


/* BUTTON */

.section-small-button {

    min-height:
        38px;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        0 13px;

    border:
        1px solid
        var(--border);

    border-radius:
        9px;

    color:
        var(--primary-light);

    background:
        rgba(59,130,246,.04);

    font-size:
        10px;
}

.section-small-button:hover {

    border-color:
        var(--border-strong);

    background:
        rgba(59,130,246,.08);
}


/* FAVORITE */

.favorite-teams-grid {

    display:
        grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:
        15px;
}

.favorite-team-card {

    display:
        flex;

    align-items:
        center;

    gap:
        13px;

    padding:
        20px;

    border:
        1px solid
        var(--border);

    border-radius:
        16px;

    background:
        var(--card);

    transition:
        all var(--transition);
}

body.light-theme .favorite-team-card {

    background:
        rgba(255,255,255,.94);
}

.favorite-team-card:hover {

    transform:
        translateY(-4px);

    border-color:
        var(--border-strong);
}

.favorite-team-logo {

    width:
        50px;

    height:
        50px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        rgba(59,130,246,.08);

    color:
        var(--primary-light);

    font-size:
        9px;

    font-weight:
        800;
}

.favorite-team-info {

    display:
        flex;

    flex-direction:
        column;

    min-width:
        0;
}

.favorite-team-info strong {

    font-size:
        11px;
}

.favorite-team-info span {

    color:
        var(--muted);

    font-size:
        8px;
}


/* EMPTY FAVORITES */

.favorite-empty {

    grid-column:
        1 / -1;

    min-height:
        160px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    gap:
        10px;

    padding:
        30px;

    border:
        1px dashed
        var(--border);

    border-radius:
        16px;

    color:
        var(--muted);

    text-align:
        center;
}

.favorite-empty strong {

    color:
        var(--white);

    font-size:
        13px;
}

.favorite-empty span {

    font-size:
        10px;
}


/* ACTIVITY */

.activity-card {

    overflow:
        hidden;

    border:
        1px solid
        var(--border);

    border-radius:
        18px;

    background:
        var(--card);
}

body.light-theme .activity-card {

    background:
        rgba(255,255,255,.94);
}

.activity-item {

    display:
        flex;

    align-items:
        center;

    gap:
        14px;

    padding:
        19px 20px;

    border-bottom:
        1px solid
        rgba(255,255,255,.05);
}

.activity-item:last-child {

    border-bottom:
        0;
}

.activity-icon {

    width:
        39px;

    height:
        39px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        10px;

    color:
        var(--primary-light);

    background:
        rgba(59,130,246,.08);
}

.activity-item > div:last-child {

    display:
        flex;

    flex-direction:
        column;
}

.activity-item strong {

    font-size:
        11px;
}

.activity-item span {

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        9px;
}


/* MODAL */

.profile-modal {

    position:
        fixed;

    inset:
        0;

    z-index:
        7000;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        20px;

    opacity:
        0;

    visibility:
        hidden;

    transition:
        all .25s ease;
}

.profile-modal.open {

    opacity:
        1;

    visibility:
        visible;
}

.profile-modal-overlay {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(0,0,0,.72);

    backdrop-filter:
        blur(12px);
}

.profile-modal-box {

    position:
        relative;

    z-index:
        2;

    width:
        100%;

    max-width:
        450px;

    padding:
        30px;

    border:
        1px solid
        var(--border-strong);

    border-radius:
        20px;

    background:
        #0d1424;

    box-shadow:
        var(--shadow);

    transform:
        translateY(20px);

    transition:
        transform .25s ease;
}

.profile-modal.open .profile-modal-box {

    transform:
        translateY(0);
}

body.light-theme .profile-modal-box {

    background:
        #fff;
}

.modal-close {

    position:
        absolute;

    top:
        18px;

    left:
        18px;

    width:
        36px;

    height:
        36px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid
        var(--border);

    border-radius:
        9px;

    background:
        transparent;

    color:
        var(--muted);

    cursor:
        pointer;
}

.modal-label {

    color:
        var(--primary-light);

    font-size:
        10px;
}

.profile-modal-box h2 {

    margin:
        5px 0 25px;

    font-size:
        24px;
}


/* FORM */

.profile-form {

    display:
        flex;

    flex-direction:
        column;

    gap:
        15px;
}

.profile-form label {

    display:
        flex;

    flex-direction:
        column;

    gap:
        7px;

    color:
        var(--muted);

    font-size:
        10px;
}

.profile-form input,
.profile-form select {

    width:
        100%;

    min-height:
        44px;

    padding:
        0 13px;

    border:
        1px solid
        var(--border);

    border-radius:
        10px;

    outline:
        none;

    background:
        #080e1b;

    color:
        var(--white);

    font-size:
        11px;
}

body.light-theme .profile-form input,
body.light-theme .profile-form select {

    background:
        #f8fafc;

    color:
        #0f172a;
}

.username-input {

    display:
        flex;

    align-items:
        center;

    overflow:
        hidden;

    min-height:
        44px;

    border:
        1px solid
        var(--border);

    border-radius:
        10px;

    background:
        #080e1b;
}

body.light-theme .username-input {

    background:
        #f8fafc;
}

.username-input b {

    padding:
        0 12px;

    color:
        var(--primary-light);
}

.username-input input {

    min-height:
        42px;

    border:
        0;

    background:
        transparent;
}

.save-profile-button {

    min-height:
        45px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    border:
        0;

    border-radius:
        10px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color:
        #fff;

    cursor:
        pointer;

    font-size:
        11px;

    font-weight:
        700;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .profile-hero {

        grid-template-columns:
            1fr;
    }

    .profile-stats {

        grid-template-columns:
            repeat(4,1fr);
    }

    .favorite-teams-grid {

        grid-template-columns:
            repeat(2,1fr);
    }
}

@media (max-width: 700px) {

    .profile-page {

        padding:
            110px 6% 80px;
    }

    .profile-card {

        flex-direction:
            column;

        align-items:
            center;

        text-align:
            center;

        padding:
            30px 20px;
    }

    .profile-information {

        align-items:
            center;
    }

    .profile-avatar {

        width:
            95px;

        height:
            95px;

        font-size:
            32px;
    }

    .edit-profile-button {

        position:
            static;

        width:
            100%;

        max-width:
            230px;
    }

    .profile-stats {

        grid-template-columns:
            repeat(2,1fr);
    }
}

@media (max-width: 500px) {

    .favorite-teams-grid {

        grid-template-columns:
            1fr;
    }

    .profile-section-heading {

        flex-direction:
            column;

        align-items:
            flex-start;
    }

    .section-small-button {

        width:
            100%;

        justify-content:
            center;
    }
}

@media (max-width: 400px) {

    .profile-stats {

        grid-template-columns:
            1fr;
    }
}