.hdv2-accent-bar {
    display: block;
    width: 100%;
    height: 3px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #0ea5e9, #2563eb, #1d4ed8);
}

:root[data-hdv2-theme="dark"] .hdv2-accent-bar {
    background: linear-gradient(90deg, #38bdf8, #2563eb, #6366f1);
}

.hdv2-topbar {
    position: relative;
    z-index: 9995;
    background: transparent;
}

.hdv2-topbar__shell {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 2px 18px 0;
    min-height: 34px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    overflow: visible;
}

.hdv2-topbar__track {
    display: inline-flex;
    align-items: stretch;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: visible;
}

.hdv2-topbar__track--left {
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow: hidden;
}

.hdv2-topbar__track--right {
    flex: 0 0 auto;
    justify-content: flex-end;
    overflow: visible;
}

.hdv2-topbar__item,
.hdv2-topbar__chip,
.hdv2-topbar__dropdown {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #3f4654;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: color .16s ease, background-color .16s ease;
    flex-shrink: 0;
}

.hdv2-topbar__item:hover,
.hdv2-topbar__dropdown-trigger:hover {
    color: #1f2937;
    background: transparent;
}

.hdv2-topbar__icon {
    width: 14px;
    height: 14px;
    stroke: #2563eb;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.hdv2-topbar__icon--muted {
    stroke: #64748b;
}

.hdv2-topbar__item-text {
    display: inline-block;
}

.hdv2-topbar__swap {
    width: 12px;
    height: 12px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.hdv2-topbar__chevron {
    width: 11px;
    height: 11px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform .16s ease;
}

.hdv2-topbar__sep {
    width: 1px;
    align-self: stretch;
    margin: 7px 6px;
    background: #dfe3ea;
    flex-shrink: 0;
}

.hdv2-topbar__chip {
    gap: 4px;
    padding: 0 8px;
    margin: 5px 0;
    min-height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
}

.hdv2-topbar__chip:hover {
    background: transparent;
    color: #1f2937;
}

.hdv2-topbar__theme {
    padding: 0;
    width: 28px;
    justify-content: center;
}

.hdv2-topbar__theme .hdv2-header__theme-icon svg {
    width: 14px;
    height: 14px;
}

.hdv2-topbar__theme .hdv2-header__theme-icon {
    display: none;
}

:root[data-hdv2-theme="light"] .hdv2-topbar__theme .hdv2-header__theme-icon--dark,
:root[data-hdv2-theme="dark"] .hdv2-topbar__theme .hdv2-header__theme-icon--light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hdv2-topbar__lang-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}

.hdv2-topbar__lang-flag {
    width: 15px;
    height: 10px;
    border-radius: 2px;
    border: 0;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    flex-shrink: 0;
}

.hdv2-topbar__lang-flag.is-empty {
    opacity: .45;
}

.hdv2-topbar__dropdown {
    position: relative;
    padding: 0;
}

.hdv2-topbar__dropdown-trigger {
    height: 100%;
    width: 100%;
    padding: 0 12px;
}

.hdv2-topbar__dropdown.is-open .hdv2-topbar__chevron {
    transform: rotate(180deg);
}

.hdv2-topbar__dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 240px;
    max-width: min(320px, 92vw);
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    z-index: 10000;
}

.hdv2-topbar__dropdown-menu[hidden] {
    display: none;
}

.hdv2-topbar__dropdown-link {
    display: block;
    padding: 8px 10px;
    border-radius: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    white-space: normal;
    transition: background-color .15s ease, color .15s ease;
}

.hdv2-topbar__dropdown-link:hover {
    background: #f8fafc;
    color: #0f172a;
}

.hdv2-topbar__lang-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hdv2-topbar__lang-modal[hidden] {
    display: none;
}

.hdv2-topbar__lang-modal.is-open {
    display: flex;
}

.hdv2-topbar__lang-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}

.hdv2-topbar__lang-panel {
    position: relative;
    width: min(360px, 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
    overflow: hidden;
}

.hdv2-topbar__lang-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
}

.hdv2-topbar__lang-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.hdv2-topbar__lang-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hdv2-topbar__lang-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdv2-topbar__lang-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hdv2-topbar__lang-list {
    max-height: 280px;
    overflow: auto;
    padding: 8px;
}

.hdv2-topbar__lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.hdv2-topbar__lang-option:hover,
.hdv2-topbar__lang-option:focus-visible {
    background: #f8fafc;
    color: #0f172a;
}

.hdv2-topbar__lang-option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.hdv2-topbar__lang-option-name {
    flex: 1;
}

.hdv2-topbar__lang-check {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.hdv2-topbar__lang-check svg {
    width: 12px;
    height: 12px;
    stroke: #2563eb;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdv2-topbar__lang-option.is-active .hdv2-topbar__lang-check {
    opacity: 1;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__icon {
    stroke: #60a5fa;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__item,
:root[data-hdv2-theme="dark"] .hdv2-topbar__dropdown-trigger {
    color: #cbd5e1;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__item:hover,
:root[data-hdv2-theme="dark"] .hdv2-topbar__dropdown-trigger:hover {
    color: #f8fafc;
    background: transparent;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__sep {
    background: #3d4450;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__chip {
    background: transparent;
    color: #e2e8f0;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__chip:hover {
    background: transparent;
    color: #ffffff;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__dropdown-menu {
    background: #1f2228;
    border-color: #3d4450;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__dropdown-link {
    color: #cbd5e1;
}

:root[data-hdv2-theme="dark"] .hdv2-topbar__dropdown-link:hover {
    background: #2a2d33;
    color: #ffffff;
}

@media (max-width: 840px) {
    .hdv2-topbar {
        display: none;
    }
}
