/* ============================================
   Sidebar + Top Bar (Stake-style layout)
   ============================================ */

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 33, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.logo-icon {
    font-size: 26px;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.logo-highlight {
    color: var(--accent);
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-label {
    padding: 12px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    white-space: nowrap;
}

.nav-btn .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-btn.active .nav-icon {
    filter: drop-shadow(0 0 4px rgba(255, 107, 0, 0.5));
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-footer-text {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    letter-spacing: 0.5px;
}

/* === TOP BAR === */
.topbar {
    height: var(--header-height);
    background: rgba(15, 33, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-right: auto;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Balance */
.balance-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 25, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: var(--radius-round);
    height: 40px;
}

.balance-icon {
    font-size: 18px;
    line-height: 1;
}

.balance-amount {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 70px;
    text-align: right;
    transition: all 0.3s;
}

.balance-amount.win { animation: balancePop 0.4s ease; }
.balance-amount.lose { animation: balanceShake 0.4s ease; }

@keyframes balancePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.15); color: var(--green); }
    100% { transform: scale(1); }
}

@keyframes balanceShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); color: var(--red-bright); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

.balance-currency {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-deposit {
    background: var(--green);
    border: none;
    color: var(--bg-darkest);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    padding: 0 20px;
    height: 40px;
    border-radius: var(--radius-round);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.3px;
}

.btn-deposit:hover {
    filter: brightness(1.15);
}

.btn-deposit:active {
    transform: scale(0.97);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
}

.sidebar-overlay.active {
    display: block;
}
