/* Panel index: black, diverse light spots that change size and position */

/* ---- Sidebar (desktop) ---- */
.panel-sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(var(--panel-blur-header));
    -webkit-backdrop-filter: blur(var(--panel-blur-header));
    border-right: 1px solid var(--panel-border-subtle);
    flex-direction: column;
    padding: 0;
}

@media (min-width: 1000px) {
    .panel-sidebar {
        display: flex;
    }
}

.panel-sidebar-logo {
    display: none;
    flex-shrink: 0;
    padding: 16px 20px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

@media (min-width: 1000px) {
    .panel-sidebar-logo {
        display: flex;
    }
}

.panel-sidebar-logo-img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

@media (min-width: 1000px) {
    .panel-sidebar-logo:hover .panel-sidebar-logo-img {
        opacity: 1;
        transform: scale(1.08) rotate(4deg);
    }
}

.panel-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    text-decoration: none;
}

.panel-header-logo-img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.9;
}

.panel-sidebar-mini-wrap {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0;
    flex-shrink: 0;
}

.panel-sidebar-mini-block {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.panel-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
}

.panel-sidebar-btn-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(0, 0, 0, 0.2);
}

.panel-sidebar-btn-scroll::-webkit-scrollbar {
    width: 6px;
}

.panel-sidebar-btn-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.panel-sidebar-btn-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    min-height: 28px;
}

.panel-sidebar-btn-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.panel-sidebar-btn-scroll::-webkit-scrollbar-button,
.panel-sidebar-btn-scroll::-webkit-scrollbar-button:vertical:start,
.panel-sidebar-btn-scroll::-webkit-scrollbar-button:vertical:end {
    display: block;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
}

.panel-sidebar-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--panel-text-primary);
    text-align: left;
    border: 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid var(--panel-border-subtle);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
    text-decoration: none;
}

.panel-sidebar-btn-text {
    text-decoration: none;
}

.panel-sidebar-wallet-wrap {
    display: none;
}

@media (min-width: 1000px) {
    .panel-sidebar-nav {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }

    .panel-sidebar-btn-scroll {
        overflow-y: auto;
        max-height: 1000px;
    }

    .panel-sidebar-wallet-wrap {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 10px 12px;
        margin: 16px 12px 12px;
        border: 1px solid var(--panel-border-muted);
        border-radius: var(--panel-radius-btn);
        background: var(--panel-bg-overlay-strong);
    }

    .panel-sidebar-wallet-balance {
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--panel-border-subtle);
    }

    .panel-sidebar-wallet-balance-label {
        font-size: 11px;
        color: var(--panel-text-placeholder);
        font-family: neue-haas-grot-text-roman, sans-serif;
        margin-bottom: 4px;
    }

    .panel-sidebar-wallet-balance-wrap {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin-bottom: 6px;
    }

    .panel-sidebar-wallet-balance-value {
        font-size: 18px;
        font-weight: 700;
        color: var(--panel-text-primary);
        font-family: pp-neue-machina-plain-regular, sans-serif;
    }

    .panel-sidebar-wallet-balance-usd {
        font-size: 11px;
        color: var(--panel-text-placeholder);
        font-family: neue-haas-grot-text-roman, sans-serif;
    }

    .panel-sidebar-wallet-btns {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 0;
    }

    .panel-sidebar-wallet-btns .panel-sidebar-deposit-btn,
    .panel-sidebar-wallet-btns .panel-sidebar-withdraw-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
        gap: 6px;
        font-size: 12px;
        justify-content: center;
    }

    .panel-sidebar-wallet-btns .panel-sidebar-deposit-btn .panel-sidebar-btn-icon svg,
    .panel-sidebar-wallet-btns .panel-sidebar-withdraw-btn .panel-sidebar-btn-icon svg {
        width: 14px;
        height: 14px;
    }

    .panel-sidebar-wallet-btns .panel-sidebar-deposit-btn { 
        border-radius: var(--panel-radius-xs) 0 0 8px;
    }

    .panel-sidebar-wallet-btns .panel-sidebar-withdraw-btn {
        border: 1px solid rgba(255, 255, 255, 0.9);
        border-radius: 0 8px 8px 0;
    }

    .panel-sidebar-deposit-btn,
    .panel-sidebar-withdraw-btn {
        background: transparent;
        color: var(--panel-text);
        border: 1px solid rgba(255, 255, 255, 0.9);
        border-top: 1px solid rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    }

    .panel-sidebar-deposit-btn::before,
    .panel-sidebar-withdraw-btn::before {
        display: none;
    }

    .panel-sidebar-deposit-btn .panel-sidebar-btn-icon svg,
    .panel-sidebar-withdraw-btn .panel-sidebar-btn-icon svg {
        stroke: #fff;
        fill: none;
    }

    .panel-sidebar-deposit-btn:hover,
    .panel-sidebar-withdraw-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.9);
    }

    .panel-sidebar-wallet-btns .panel-sidebar-deposit-btn:hover,
    .panel-sidebar-wallet-btns .panel-sidebar-withdraw-btn:hover {
        border-color: rgba(255, 255, 255, 0.95);
    }

    .panel-sidebar-deposit-btn:active,
    .panel-sidebar-withdraw-btn:active {
        background: rgba(255, 255, 255, 0.12);
    }

    .panel-sidebar-deposit-btn.is-active,
    .panel-sidebar-withdraw-btn.is-active {
        background: #fff;
        color: #111;
        border-color: #fff;
    }

    .panel-sidebar-deposit-btn.is-active .panel-sidebar-btn-icon svg,
    .panel-sidebar-withdraw-btn.is-active .panel-sidebar-btn-icon svg {
        stroke: #111;
    }
}

@keyframes panel-deposit-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

@keyframes panel-deposit-gradient {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.panel-sidebar-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: transparent;
    transition: background-color 0.18s ease, opacity 0.18s ease;
}

.panel-sidebar-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-sidebar-btn-icon svg {
    display: block;
}
 

.panel-sidebar-btn.is-active {
    border-color: var(--panel-border-strong) !important;
    color: var(--panel-text-inverse);
}

.panel-sidebar-btn.is-active::before {
    background: var(--panel-bg-white-soft);
}

.panel-sidebar-btn.is-active .panel-sidebar-btn-icon svg {
    stroke: currentColor;
}

.panel-sidebar-lang {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-sidebar-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--panel-radius-sm);
    color: var(--panel-text);
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.panel-sidebar-lang-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}