:root {
    --accent: #00bfcf;
    --accent1: #00bfcf;
    --accent2: #dfdfdf;
    --accent-hover: #33d4e2;
    --line: rgba(255, 255, 255, 0.08);
    --muted: #a6b0bd;
    --glass: rgba(255, 255, 255, 0.03);
}

.auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12);
}

.top-left-button {
    color: #b8c2cf;
    font-weight: 500;
    background: transparent;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.82rem;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    min-height: 32px;
    letter-spacing: 0.001em;
    white-space: nowrap;
    line-height: 1;
}

.top-left-button:hover {
    color: #eef5ff;
    background: rgba(8, 13, 20, 0.45);
    border-color: rgba(255, 255, 255, 0.06);
}

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

.lang-switcher {
    position: relative;
    margin-right: 6px;
}

.changelog-nav-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    border: none;
    border-radius: 6px;
    background: transparent;
    flex: 0 0 auto;
}

.changelog-nav-button svg {
    width: 20px;
    height: 20px;
    display: block;
}

.changelog-nav-button:hover {
    color: var(--accent, var(--accent1, #00bfcf));
    background: transparent;
}

.lang-current {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.lang-current::-webkit-details-marker {
    display: none;
}

.lang-current:hover {
    opacity: 0.8;
}

.lang-switcher[open] .lang-current {
    opacity: 0.8;
}

.lang-current .flag-emoji svg {
    width: 24px;
    height: 16px;
}

.lang-current .flag-emoji img,
.lang-option-flag .flag-emoji img {
    width: 24px;
    height: 16px;
    display: block;
    border-radius: 3px;
    object-fit: cover;
}

.lang-caret {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

.lang-switcher[open] .lang-caret {
    transform: rotate(180deg);
}

.site-header {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1260px, calc(100% - 32px));
    z-index: 13100;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 9px 16px;
    min-height: 54px;
    border-radius: 16px;
    backdrop-filter: blur(14px);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
        linear-gradient(105deg, rgba(12, 17, 26, 0.62), rgba(9, 14, 22, 0.58));
    background-size: 28px 28px, 100% 100%;
    background-position: 7px 0, 0 0;
    background-attachment: fixed, scroll;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
    gap: 14px;
}

.site-header::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 25%;
    right: 25%;
    height: 56px;
    background: radial-gradient(ellipse 60% 100% at 50% 0%, color-mix(in srgb, var(--accent, var(--accent1, #00bfcf)) 6%, transparent) 0%, color-mix(in srgb, var(--accent, var(--accent1, #00bfcf)) 2%, transparent) 50%, transparent 85%);
    pointer-events: none;
    z-index: -1;
}

.site-header::after {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
}

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

.home-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.home-icon::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: url('/_dk5c788191e2e79525ff24a892/_dk355787e35fa2861c48b2d6a7.png') center/contain no-repeat;
}

.home-icon:hover {
    transform: scale(1.05);
    border-color: transparent;
    background: transparent;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.brand-link:hover,
.brand-link:focus-visible {
    color: #ffffff;
}

.brand-link:hover .home-icon,
.brand-link:focus-visible .home-icon {
    transform: scale(1.05);
}

.brand-link:focus-visible {
    outline: 2px solid var(--accent1);
    outline-offset: 3px;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    color: #fff;
    transition: filter 0.2s ease;
}

.brand-link:hover .brand-name,
.brand-link:focus-visible .brand-name {
    filter: brightness(1.15);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: center;
    justify-content: center;
}

.report-action-field-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.lang-option-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-option-flag .lang-label {
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.lang-option-flag:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.lang-option-flag.active {
    color: var(--accent1);
    background: color-mix(in srgb, var(--accent1, #00bfcf) 10%, transparent);
}

.lang-option-flag .flag-emoji {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.lang-option-flag .flag-emoji svg,
.lang-current .flag-emoji svg,
.lang-option-flag .flag-emoji img,
.lang-current .flag-emoji img {
    display: block;
    border-radius: 3px;
}

.lang-menu-flags {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(520px, calc(100vh - 92px));
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 10, 16, 0.97);
    z-index: 95;
    backdrop-filter: blur(16px);
    white-space: nowrap;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent1, #00bfcf) 42%, transparent) rgba(255, 255, 255, 0.05);
}

.lang-switcher[open] .lang-menu-flags {
    display: flex;
}

.lang-menu-flags::-webkit-scrollbar {
    width: 7px;
}

.lang-menu-flags::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.lang-menu-flags::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--accent1, #00bfcf) 42%, transparent);
    border-radius: 999px;
}

.nav-user-menu {
    position: relative;
    z-index: 905;
}

.nav-avatar-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.nav-avatar-btn:hover,
.nav-avatar-btn.open {
    border-color: color-mix(in srgb, var(--accent1, #00bfcf) 50%, transparent);
}

.nav-avatar-btn > img {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
}

.nav-avatar-btn.has-rank-outline {
    border: 2px solid var(--rank-outline-color, transparent);
    position: relative;
    overflow: visible;
}

.nav-avatar-btn.has-rank-outline:not([data-rank-ready]):not([class*="nav-avatar-rank-"]) {
    border-color: transparent !important;
}

.nav-avatar-btn.has-rank-outline:not([data-rank-ready]):not([class*="nav-avatar-rank-"])::before {
    display: none !important;
}

.nav-avatar-btn.has-rank-outline:hover,
.nav-avatar-btn.has-rank-outline.open {
    border-color: var(--rank-outline-color, transparent);
    filter: brightness(1.12);
}

.nav-avatar-btn.has-rank-outline > img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    position: relative;
    z-index: 1;
}

.nav-avatar-btn.has-rank-outline::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 34%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.1) 66%,
        transparent 100%
    );
    background-size: 230% 100%;
    background-position: -140% 0;
    animation: premiumShine 3.2s linear infinite;
    pointer-events: none;
    z-index: 2;
    -webkit-mask: radial-gradient(circle, transparent calc(50% - 2.5px), #000 calc(50% - 2px));
    mask: radial-gradient(circle, transparent calc(50% - 2.5px), #000 calc(50% - 2px));
}

.nav-ud-avatar.has-rank-outline {
    border: 2px solid var(--rank-outline-color, transparent);
}

.nav-ud-avatar.has-rank-outline:not([data-rank-ready]):not([class*="nav-avatar-rank-"]) {
    border-color: transparent !important;
}

.nav-avatar-rank-owner { --rank-outline-color: #e74c3c; }

.nav-avatar-rank-admin { --rank-outline-color: #e67e22; }

.nav-avatar-rank-developer { --rank-outline-color: #9b59b6; }

.nav-avatar-rank-moderator { --rank-outline-color: #2ecc71; }

.nav-avatar-rank-support { --rank-outline-color: #3498db; }

.nav-avatar-rank-reviewer { --rank-outline-color: #1abc9c; }

.nav-avatar-rank-editor { --rank-outline-color: #f1c40f; }

.nav-avatar-rank-premium { --rank-outline-color: var(--accent1, #00bfcf); }

.nav-avatar-rank-team { --rank-outline-color: #e74c3c; }

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 215px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: rgba(10, 14, 22, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 1px;
    z-index: 13110;
    animation: navDropSlide 0.15s ease;
}

.nav-user-dropdown.open {
    display: flex;
}

.nav-ud-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 2px;
}

.nav-ud-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.nav-ud-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    gap: 1px;
}

.nav-ud-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.nav-ud-rank {
    font-size: 10px;
    color: var(--rank-outline-color, rgba(255, 255, 255, 0.7));
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.nav-ud-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 3px 0;
}

.nav-ud-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #c4cdd8;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    line-height: 1;
}

.nav-ud-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-ud-item-icon {
    width: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.nav-ud-item-danger {
    color: #ed4245;
}

.nav-ud-item-danger:hover {
    color: #ff6b6b;
    background: rgba(237, 66, 69, 0.08);
}

.nav-ud-item-disabled {
    opacity: 0.38;
    cursor: not-allowed;
    color: #64748b;
    user-select: none;
}

.nav-ud-item-disabled:hover {
    color: #64748b;
    background: transparent;
}

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #e6eef6;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: color-mix(in srgb, var(--accent1, #00bfcf) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent1, #00bfcf) 40%, transparent);
}

@media (max-width: 900px) {
    .header-links {
            display: none;
        }

    .header-links.open {
            display: flex;
            position: fixed;
            top: 84px;
            left: 13px;
            right: 13px;
            background: rgba(15,20,28,0.98);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.09);
            border-radius: 16px;
            padding: 10px;
            flex-direction: column;
            gap: 6px;
            z-index: 50;
            animation: slideDown 0.2s ease;
        }

    .mobile-menu-btn {
            display: inline-flex;
        }
}

@media (max-width: 640px) {
    .site-header {
            top: 8px;
            width: calc(100% - 14px);
            height: 56px;
            border-radius: 16px;
            padding: 0 10px;
        }

    .top-left-button {
            min-height: 34px;
        }

    .user-info {
            gap: 6px;
            flex-wrap: wrap;
        }

    .user-info .user {
            display: none;
        }
}

@media (max-width: 900px) {
    .site-header {
            width: min(100% - 18px, 100%);
            top: 8px;
            grid-template-columns: auto minmax(0, 1fr) auto;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 12px;
        }

    .header-center {
            min-width: 0;
            overflow-x: auto;
            scrollbar-width: none;
        }

    .header-center::-webkit-scrollbar {
            display: none;
        }

    .header-links {
            justify-content: flex-start;
            white-space: nowrap;
        }

    .lang-menu-flags {
            position: fixed;
            top: 58px;
            right: 10px;
            max-height: calc(100dvh - 72px);
        }
}

@media (max-width: 560px) {
    .site-header {
            min-height: 48px;
        }

    .brand-name {
            max-width: 38vw;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .lang-current {
            padding: 3px;
        }

    .lang-current .flag-emoji img,
        .lang-option-flag .flag-emoji img {
            width: 22px;
            height: 15px;
        }

    .lang-menu-flags {
            top: 54px;
            right: 8px;
            left: auto;
            min-width: min(216px, calc(100vw - 16px));
            max-width: calc(100vw - 16px);
            max-height: calc(100dvh - 64px);
        }
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    min-width: 0;
}

.brand-sub {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}

.di-has-topbar {
    padding-top: var(--di-topbar-offset, 84px);
}

.top-left-button.is-active,
.top-left-button[aria-current="page"] {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 640px) {
    .nav .login_button {
        padding: 7px 10px;
    }

    .nav .login_button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

.login_button {
    background: var(--accent1);
    color: #071019;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.login_button svg {
    flex-shrink: 0;
}

.login_button:hover {
    background: #33d4e2;
    color: #071019;
    transform: translateY(-1px);
}

.di-flag-icon {
    width: 24px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.di-flag-img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
}

@keyframes navDropSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-user-menu {
    display: flex;
    align-items: center;
}

@keyframes premiumShine {
    0% {
        background-position: -140% 0;
    }
    100% {
        background-position: 150% 0;
    }
}

@media (max-width: 900px) {
    .header-links.open {
        justify-self: stretch;
        width: auto;
    }
}
