/* SoraKai — Логотип, навигация, поиск, закладки и профиль */

.site-header {
    height: 71px;
    border-bottom: 1px solid #20273c;
    background: rgba(7,11,21,.96);
    position: relative;
    z-index: 20;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 29px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.9px;
    flex-shrink: 0;
}

.brand img {
    filter: drop-shadow(0 0 9px #5d25ce55);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.nav-link {
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}

.nav-link:hover {
    background: #161c2c;
}

.nav-link.active {
    background: linear-gradient(115deg,#31156e,#2b166d);
    border-color: #5733a4;
}

.header-search {
    height: 41px;
    flex: 1;
    max-width: 414px;
    min-width: 150px;
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #1b2740;
    border-radius: 19px;
    background: #101625;
}

.header-search:focus-within {
    border-color: #6932b8;
}

.header-search input {
    background: none;
    border: 0;
    outline: 0 !important;
    color: #fff;
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0 17px;
    font-size: 12px;
}

.header-search input::placeholder {
    color: #737d9b;
}

.header-search input::-webkit-search-cancel-button {
    appearance: none;
}

.header-search>button {
    background: transparent;
    border: 0;
    color: #f5f4ff;
    padding: 9px 14px;
}

.header-search button svg {
    width: 20px;
    height: 20px;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 410px;
    overflow: auto;
    background: #121729;
    border: 1px solid #3c2e61;
    border-radius: 13px;
    box-shadow: 0 18px 48px #0009;
    padding: 8px;
    z-index: 90;
}

.search-dropdown[hidden] {
    display: none !important;
}

.search-result {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 7px;
    border-radius: 9px;
}

.search-result:hover {
    background: #22223d;
}

.search-result img {
    width: 42px;
    height: 49px;
    object-fit: cover;
    border-radius: 6px;
}

.search-result strong {
    font-size: 12px;
    line-height: 1.35;
    display: block;
}

.search-result small {
    color: #a38dcb;
}

.search-empty {
    padding: 12px;
    color: var(--muted);
    font-size: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 39px;
    margin-left: auto;
}

.icon-action {
    width: 30px;
    height: 39px;
    background: none;
    border: 0;
    color: #e5e0ff;
    display: grid;
    place-items: center;
    position: relative;
}

.icon-action svg {
    width: 24px;
    height: 24px;
}

.icon-action:hover,.profile-btn:hover {
    color: #b48dff;
}

.saved-count {
    position: absolute;
    right: -7px;
    top: 0;
    border-radius: 50%;
    padding: 0px 4px;
    min-width: 15px;
    font-size: 10px;
    color: #fff;
    background: #7337ff;
}

.notification-action::after {
    content: "";
    width: 6px;
    height: 6px;
    border: 2px solid #090d17;
    border-radius: 50%;
    position: absolute;
    right: 2px;
    top: 4px;
    background: #a945ff;
}

.profile-btn {
    border: 0;
    background: none;
    color: #e7e2fb;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.profile-btn svg {
    width: 16px;
    height: 16px;
}

.avatar {
    height: 46px;
    width: 46px;
    display: grid;
    place-items: center;
    border: 2px solid #9365e9;
    border-radius: 50%;
    font-size: 19px;
    color: #d4c3ff;
    background: radial-gradient(circle at 50% 15%,#564995,#10122f 71%);
}

/* SoraKai — фиксируем расположение шапки */

@media (min-width: 1051px) {

    .site-header .header-inner {
        position: relative;
    }

    /* Поиск всегда по центру */
    .site-header .header-search {
        position: absolute;

        left: 64%;
        transform: translateX(-50%);

        width: min(414px, calc(100% - 680px));
        max-width: none;
        min-width: 200px;

        margin-left: 0;
        flex: 0 0 auto;
    }

    /* Иконки и профиль прижимаем вправо */
    .site-header .header-actions {
        margin-left: auto;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    color: #fff;
    border: 0;
}
