/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
    width: 100%;
    background: var(--blue);
    color: #ffffff;
}

.topbar__inner {
    min-height: 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* MESSAGE */

.topbar__message {
    display: flex;
    align-items: center;

    gap: 5px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    line-height: 1;

    white-space: nowrap;
}

.topbar__message-logo {
    display: inline-flex;
    align-items: center;

    height: 30px;
    max-width: 80px;

    overflow: hidden;
}

.topbar__message-logo img {
    display: block;

    height: 30px;
    width: auto;

    max-width: 80px;

    object-fit: contain;
}


/* SOCIALS */

.topbar__socials {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.topbar__social {
    width: 38px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    border-left: 1px solid rgba(255, 255, 255, 0.25);

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.topbar__social:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.topbar__social svg {
    width: 15px;
    height: 15px;

    display: block;

    fill: currentColor;
}

.topbar__social:hover {
    background: #ffffff;
    color: var(--blue);
}


/* =========================================================
   MAIN NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;

    z-index: 1000;

    width: 100%;

    background: var(--bg);

    border-bottom: 2px solid var(--border);
}

.navbar__inner {
    min-height: 82px;

    display: flex;
    align-items: center;

    gap: 40px;
}


/* =========================================================
   LOGO
   ========================================================= */

.navbar__logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.navbar__logo img {
    display: block;

    width: 150px;
    height: auto;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.navbar__links {
    display: flex;
    align-items: center;

    gap: 30px;

    margin-left: auto;
    margin-right: auto;
}

.navbar__link {
    position: relative;

    display: flex;
    align-items: center;

    height: 82px;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;

    transition: color 0.15s ease;
}

.navbar__link::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    height: 3px;

    background: var(--blue);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.15s ease;
}

.navbar__link:hover {
    color: var(--blue);
}

.navbar__link:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   ACTIONS
   ========================================================= */

.navbar__actions {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}


/* =========================================================
   SERVER IP
   ========================================================= */

.server-ip {
    width: 160px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 14px;

    background: transparent;

    border: 2px solid var(--border);
    border-radius: 0;

    color: var(--text);

    cursor: pointer;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;

    box-sizing: border-box;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.server-ip:hover {
    background: var(--blue);

    color: #ffffff;

    border-color: var(--blue);
}

.server-ip.copied {
    border-color: #35b86b;
}

.server-ip__text {
    display: block;
    flex: 1;
    min-width: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* STATUS */

.server-ip__status {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #999;

    transition: background 0.15s ease;
}

.server-ip__status.online {
    background: #35b86b;
}

.server-ip__status.offline {
    background: #e04b4b;
}

.server-ip__status.unknown {
    background: #999;
}

.server-ip:hover .server-ip__status {
    background: #ffffff;
}


/* =========================================================
   HAMBURGER
   ========================================================= */

.navbar__burger {
    display: none;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 2px solid var(--border);
    border-radius: 0;

    background: transparent;

    cursor: pointer;

    flex-shrink: 0;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;
}

.navbar__burger span {
    display: block;

    width: 18px;
    height: 2px;

    background: var(--text);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* OPEN STATE */

.navbar__burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar__burger.is-open span:nth-child(2) {
    opacity: 0;
}

.navbar__burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-menu {
    position: fixed;
    inset: 0;

    z-index: 999;

    display: flex;

    background: var(--bg);

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    overflow: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu__inner {
    width: 100%;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 50px 24px 40px;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* LINKS */

.mobile-menu__links {
    display: flex;
    flex-direction: column;
}

.mobile-menu__link {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 18px 0;

    border-bottom: 1px solid var(--border);

    font-size: 24px;
    font-weight: 800;

    text-transform: uppercase;

    transition:
        color 0.15s ease,
        padding-left 0.15s ease;
}

.mobile-menu__link span {
    width: 28px;

    color: var(--blue);

    font-size: 10px;
    font-weight: 700;

    flex-shrink: 0;
}

.mobile-menu__link:hover {
    color: var(--blue);

    padding-left: 8px;
}


/* SERVER */

.mobile-menu__server {
    padding: 28px 0;

    border-bottom: 1px solid var(--border);
}

.mobile-menu__server-label,
.mobile-menu__social-label {
    margin-bottom: 10px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.server-ip--mobile {
    width: 100%;
}


/* SOCIALS */

.mobile-menu__socials {
    padding-top: 28px;
    padding-bottom: 20px;
}

.mobile-menu__social-links {
    display: flex;
    gap: 24px;
}

.mobile-menu__social-links a {
    font-size: 14px;
    font-weight: 700;

    text-transform: uppercase;

    transition: color 0.15s ease;
}

.mobile-menu__social-links a:hover {
    color: var(--blue);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .navbar__inner {
        gap: 24px;
    }

    .navbar__links {
        gap: 20px;
    }

    .navbar__link {
        font-size: 12px;
    }

    .navbar__logo img {
        width: 130px;
    }

    .server-ip {
        width: 145px;
    }

}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 900px) {

    .navbar__inner {
        min-height: 72px;

        gap: 18px;
    }

    .navbar__links {
        gap: 15px;
    }

    .navbar__link {
        font-size: 11px;
        height: 72px;
    }

    .navbar__logo img {
        width: 120px;
    }

    .server-ip {
        width: 135px;
        height: 38px;

        font-size: 11px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .container {
        width: calc(100% - 32px);
    }


    /* TOPBAR */

    .topbar__inner {
        min-height: 32px;
    }

    .topbar__message {
        font-size: 9px;

        letter-spacing: 0.02em;

        gap: 4px;
    }

    .topbar__message-logo {
        height: 24px;
        max-width: 65px;
    }

    .topbar__message-logo img {
        height: 24px;
        max-width: 65px;
    }

    .topbar__social {
        width: 32px;
        height: 32px;
    }

    .topbar__social svg {
        width: 13px;
        height: 13px;
    }


    /* NAVBAR */

    .navbar__inner {
        min-height: 64px;

        gap: 12px;
    }

    .navbar__logo img {
        width: 115px;
    }


    /* HIDE DESKTOP NAV */

    .navbar__links,
    .navbar__actions {
        display: none;
    }


    /* HAMBURGER */

    .navbar__burger {
        display: flex;

        margin-left: auto;
    }


    /* MOBILE MENU */

    .mobile-menu {
        top: 64px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .container {
        width: calc(100% - 24px);
    }


    .topbar__message-text {
        display: none;
    }

    .topbar__message {
        margin-left: 0;
    }

    .topbar__message-logo {
        height: 22px;
        max-width: 60px;
    }

    .topbar__message-logo img {
        height: 22px;
        max-width: 60px;
    }


    .topbar__social {
        width: 30px;
        height: 32px;
    }


    .navbar__inner {
        min-height: 58px;
    }

    .navbar__logo img {
        width: 105px;
    }

    .navbar__burger {
        width: 40px;
        height: 40px;
    }


    .mobile-menu {
        top: 58px;
    }


    .mobile-menu__link {
        font-size: 21px;

        padding: 16px 0;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .container {
        width: calc(100% - 20px);
    }

    .topbar__social {
        width: 28px;
    }

    .navbar__logo img {
        width: 95px;
    }

    .navbar__burger {
        width: 38px;
        height: 38px;
    }

}