.header {
    position: absolute;
    left: 0px;
    right: 0px;
    z-index: 15;
    background-color: #161a1e;
    padding: 10px 0;
}

.header__container {
    max-width: 1360px;
    padding: 0 40px;
    margin: 0 auto;
}

.header__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header__logo {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}

.header__logo img {
    width: 36px;
    height: 36px;
    margin-right: 14px;
}

.header__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 186px;
}

.header__right {
    display: flex;
    align-items: center;
    column-gap: 31px;
}

.header__link {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 130%;
    transition: color .3s ease-in-out;
    white-space: nowrap;
    position: relative;
}

.header__link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.header__link-fire {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header__link-fire img {
    width: 16px;
    height: 16px;
    margin-top: -3px;
}

.header__link-zero {
    color: #FFF;
    font-size: 8px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    padding: 0 4px;
    border-radius: 1px;
    background: #FF5757;
    margin-left: 2px;
}

.header__link-new {
    color: #FFFFFF;
    font-size: 7px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
    padding: 1px 3px;
    border-radius: 1px;
    background: #207C55;
    margin-left: 2px;
}

.header__center {
    display: flex;
    column-gap: 40px;
    position: absolute;
    top: 50%;
    left: 46%;
    transform: translateX(-46%) translateY(-50%);
}

.header__button {
    color: #FFFFFF;
    font-size: 17px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    transition: background-color .3s ease-in-out, color .3s ease-in-out;
}

.header__button:hover {
    color: rgba(255, 255, 255, 0.7);
}

.header__button.sign-up {
    padding: 15px 32px;
    color: #FFF;
}

.header__nav-line {
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 12;
    transition: stroke-dasharray 800ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header__nav-line1 {
    stroke-dasharray: 60 207;
    stroke-width: 12;
}

.header__nav-line2 {
    stroke-dasharray: 60 60;
    stroke-width: 12;
}

.header__nav-line3 {
    stroke-dasharray: 60 207;
    stroke-width: 12;
}

.header__mobile-open .header__nav-line1 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 12;
}

.header__mobile-open .header__nav-line2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke-width: 12;
}

.header__mobile-open .header__nav-line3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 12;
}

.header__btn-mobile {
    display: none;
}

.header__btn-mobile svg {
    pointer-events: none;
}

@media (max-width: 1200px) {
    .header__wrapper {
        margin-left: 125px;
    }
}

@media (max-width: 1100px) {
    .header__wrapper {
        margin-left: 60px;
    }
}

@media (max-width: 1050px) {
    .header__wrapper {
        width: 100%;
        position: absolute;
        left: 0;
        top: -21px;
        margin-left: 0;
        background: rgba(15, 15, 15, 0.8);
        backdrop-filter: blur(5px);
        opacity: 98%;
        z-index: 20;
        padding: 80px 40px 24px 40px;
        transform: translateY(-300px);
        transition: transform .8s ease-in-out;
    }

    .header__wrapper.header__wrapper-active {
        transform: translateY(0);
    }

    .header__logo {
        position: relative;
        z-index: 21;
    }

    .header__container {
        justify-content: space-between;
    }

    .header__btn-mobile {
        display: flex;
        position: relative;
        z-index: 20;
    }
    .header__center{
        position: static;
        transform: translateX(0);
    }

    .header__box {
        position: static;
    }
}

@media (max-width: 840px) {
    .header__wrapper {
        flex-direction: column;
        padding: 80px 40px 20px 40px;
        row-gap: 10px;
    }

    .header__center {
        margin-bottom: 20px;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 30px;
    }
}

@media (max-width: 550px) {
    .header__container {
        padding: 0 16px;
    }
}

@media (max-width: 500px) {

    .header__wrapper {
        top: -25px;
        transform: translateY(-550px);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 16px 18px 16px;
    }

    .header__center {
        flex-direction: column;
        align-items: flex-start;
    }

    .header__right {
        display: flex;
        align-items: center;
        width: 100%;
        column-gap: 20px;
    }

    .header__link svg {
        left: auto;
        top: 9px;
        right: -20px;
        transform: rotate(270deg);
    }
}

body.webp .header {
    background: transparent;
    transition: background 0.3s ease;
}

/* Все остальные страницы — тёмный фон */
body:not(.webp) .header {
    background-color: #161a1e;
    transition: background 0.3s ease;
}

.Header_right_9945e {
    display: flex;
    gap: 1.94rem;
    align-items: center;
}


.Header_deposit_button_wrapper_a77c7 {
    .Button_button_4f729 {
        color: #fff;
        font-weight: 600;
        padding: 8px 18px;
        border-radius: 6px;
        text-decoration: none;
        transition: background-color 0.3s ease, transform 0.2s ease;

        &:hover {
            background-color: #27ae60;
            transform: translateY(-1px);
        }
    }
}

.Header_assets_button_86d27 {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: color 0.3s ease;

    &:hover {
        color: #00c6ff;
    }

    .Header_balance_8d121 {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;

        .Header_label_31432 {
            font-size: 12px;
            color: #9e9e9e;
        }

        .Header_sum_d541f {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            font-size: 14px;
            color: #ffffff;
        }

        .Header_sum_d541f > p {
            color: #ffffff;
        }

        svg {
            transition: transform 0.3s ease;
            stroke: #ccc;
        }
    }

    &:hover svg {
        transform: rotate(180deg);
    }
}

.Header_profile_button_c30bd {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.3s ease;

    &:hover {
        opacity: 0.8;
    }

    .Header_avatar_wrapper_f3972 {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #1e1e1e;
        border: 2px solid #333;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    svg {
        stroke: #ccc;
        transition: transform 0.3s ease;
    }

    &:hover svg {
        transform: rotate(180deg);
    }
}
