/* ===== Cube Game Sidebar (top bar) ===== */

.cg-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    font-family: Arial, sans-serif;
}

.cg-logo {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.cg-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cg-nav-links li {
    position: relative;
}

.cg-nav-links a,
.cg-nav-links button {
    all: unset;
    box-sizing: border-box;
    color: #fff;
    padding: 8px 14px;
    display: block;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: 0.2s;
    white-space: nowrap;
}

.cg-nav-links a:hover,
.cg-nav-links button:hover {
    background: #00c8ff;
    color: #111;
}

.cg-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #262626;
    min-width: 160px;
    display: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.cg-dropdown-menu a,
.cg-dropdown-menu button {
    border-radius: 0;
    width: 100%;
    text-align: left;
}

.cg-dropdown:hover .cg-dropdown-menu {
    display: block;
}

.cg-sidebar-toggle {
    display: none;
}

/* The Progress / Missions floating buttons now live inside the sidebar
   (see sidebar.js, which forwards clicks to these) — hide the originals
   that progression-menu.js / mission-ui.js append to <body>, so they don't
   show up twice. The panels/pages they open are untouched. */
#prog-menu-toggle,
#prog-mission-toggle {
    display: none !important;
}

/* Profile widget now sits inside the bar, pushed to the far right */
.cg-sidebar .pa-wrap {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-left: auto;
}

@media (max-width: 768px) {
    .cg-sidebar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 16px;
    }

    .cg-nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        order: 3;
    }

    .cg-dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
    }

    .cg-sidebar .pa-wrap {
        margin-left: 0;
        order: 2;
    }
}
