/* ---- Mobile header (hides on scroll) ---- */
.panel-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    min-height: 56px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, opacity 0.4s ease, pointer-events 0s;
    transform: translateY(0);
    opacity: 1;
}

.panel-header-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.panel-header-hidden.panel-header-hidden-fully {
    display: none;
}

.panel-header-mini-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.panel-header-mini-block {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile header: balance (tap → Profile) */
.panel-header-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    margin: 0 8px 0 auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.panel-header-balance:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 1);
}
.panel-header-balance:active {
    background: rgba(255, 255, 255, 0.12);
}
.panel-header-balance-value {
    display: block;
    white-space: nowrap;
}

.panel-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

.panel-header-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    margin-right: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
}

.panel-header-menu-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.panel-header-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.panel-header-lang-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 1000px) {
    .panel-header {
        display: none;
    }