:root {
    --bg-deep: #0d0415;
    --hdr-grad: linear-gradient(180deg, #1a0829 0%, #120422 100%);
    --accent: #bc13fe;
    --site-frame: 1040px;
    --pill-main: linear-gradient(135deg, #5a2ea6 0%, #8e24aa 100%);
    --pill-active: linear-gradient(135deg, #8e24aa 0%, #bc13fe 100%);
    --txt: #ffffff;
    --glass: rgba(255, 255, 255, 0.07);
}

body {
    margin: 0;
    background: var(--bg-deep);
    color: var(--txt);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--hdr-grad);
    border-bottom: 1px solid rgba(188, 19, 254, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.topbar__frame {
    width: 100%;
    max-width: var(--site-frame, 1040px);
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 1200px) {
    .topbar__frame {
        border-left: 1px solid rgba(188, 19, 254, 0.12);
        border-right: 1px solid rgba(188, 19, 254, 0.12);
    }
}

.topbar__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    box-sizing: border-box;
}

/* ── Logo ── */
.brand__logo {
    flex-shrink: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.brand__mark {
    flex-shrink: 0;
    font-size: clamp(18px, 2.8vw, 24px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(188, 19, 254, 0.45);
    white-space: nowrap;
}

.brand__accent {
    color: var(--accent);
}

.brand__logo-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid rgba(188, 19, 254, 0.22);
}

.brand__logo-main {
    display: block;
    font-size: clamp(15px, 2.4vw, 20px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(90deg, #fff 0%, #e9d5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand__logo-sub {
    display: block;
    font-size: clamp(9px, 1.6vw, 11px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(196, 181, 214, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Right actions ── */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(188, 19, 254, 0.4);
    background: linear-gradient(145deg, rgba(106, 27, 154, 0.65), rgba(188, 19, 254, 0.42));
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    font-family: inherit;
    box-shadow: 0 0 18px rgba(188, 19, 254, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search-btn i {
    font-size: 20px;
    line-height: 1;
}

.header-search-btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 0 22px rgba(188, 19, 254, 0.35);
}

.header-search-btn__label {
    display: none;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.header-nav__a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-width: 44px;
    padding: 0 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--txt);
    font-weight: 800;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.header-nav__a i {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.header-nav__a:hover {
    background: var(--pill-main);
    transform: translateY(-1px);
    border-color: rgba(188, 19, 254, 0.35);
}

.header-nav__a.is-active {
    background: var(--pill-active);
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(188, 19, 254, 0.28);
}

.header-nav__text {
    display: none;
}

.header-nav__a--notify {
    background: rgba(255, 215, 64, 0.1) !important;
    border-color: rgba(255, 215, 64, 0.28) !important;
    color: #ffe082 !important;
}

.header-nav__a--notify:hover,
.header-nav__a--notify.is-active {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.35), rgba(188, 19, 254, 0.35)) !important;
    border-color: rgba(255, 215, 64, 0.45) !important;
    color: #fff !important;
}

.header-nav__a--guests {
    background: rgba(34, 211, 238, 0.1) !important;
    border-color: rgba(34, 211, 238, 0.28) !important;
    color: #a5f3fc !important;
}

.header-nav__a--guests:hover,
.header-nav__a--guests.is-active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(6, 182, 212, 0.35)) !important;
    border-color: rgba(34, 211, 238, 0.45) !important;
    color: #ecfeff !important;
}

.header-nav__a--login {
    background: linear-gradient(135deg, #1565c0, #1e88e5) !important;
    border-color: rgba(66, 165, 245, 0.45) !important;
}

.header-nav__a--reg {
    background: var(--pill-main) !important;
    border-color: rgba(188, 19, 254, 0.35) !important;
}

.header-nav__a--cabinet {
    background: rgba(124, 77, 255, 0.12) !important;
    border-color: rgba(124, 77, 255, 0.28) !important;
}

.header-nav__a--cabinet:hover,
.header-nav__a--cabinet.is-active {
    background: var(--pill-main) !important;
    border-color: rgba(188, 19, 254, 0.35) !important;
}

.header-nav__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #120422;
    line-height: 1;
}

.header-nav__badge--notify {
    background: linear-gradient(135deg, #ff3355, #bc13fe);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 51, 85, 0.45);
}

.header-nav__badge--messages {
    background: #fff;
    color: #5a2ea6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-nav__badge--guests {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #042531;
    box-shadow: 0 2px 8px rgba(34, 211, 238, 0.45);
}

@media (min-width: 900px) {
    .header-search-btn__label {
        display: inline;
    }

    .header-nav__text {
        display: inline;
    }

    .topbar__in {
        padding: 10px 14px;
        gap: 12px;
    }

    .header-right {
        gap: 8px;
    }

    .header-nav {
        gap: 8px;
    }
}

@media (max-width: 899px) {
    .header-nav__a--desktop-only {
        display: none !important;
    }

    .topbar__in {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
    }

    .brand__logo {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .brand__logo-text {
        display: none;
    }

    .header-right {
        width: auto;
        margin-left: 0;
        flex-shrink: 0;
        gap: 6px;
    }

    .header-search-btn {
        flex: 0 0 auto;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 14px;
    }

    .header-search-btn i {
        font-size: 18px;
    }

    .header-nav {
        flex: 0 0 auto;
        min-width: 0;
        gap: 6px;
    }

    .header-nav__a {
        flex: 0 0 auto;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 14px;
    }

    .header-nav__a i {
        font-size: 18px;
    }

    .header-nav__a--login {
        width: auto;
        min-width: 44px;
        padding: 0 12px;
    }
}

@media (max-width: 599px) {
    .header-nav__a--reg {
        display: none;
    }
}
