.sidebar {
    width: 350px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.sidebar-header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #d4af37;
    margin-left: 10px;
    margin-right: 10px;
}

.sidebar-header h1 {
    font-size: 1.1rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.map-switcher-panel {
    padding: 0.5rem;
    border-bottom: 1px solid #d4af37;
    margin-left: 10px;
    margin-right: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
}

.map-link {
    padding: 0.35rem 0.25rem;
    color: #999;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.map-link:hover {
    color: #fff;
    border-color: #444;
}

.map-link.selected {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
}

#sidebar-categories-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#left-sidebar-search-container {
    padding: 1rem .5rem;
    border-bottom: 1px solid #d4af37;
    margin-left: 10px;
    margin-right: 10px;
}

#search-input-wrapper {
    width: 100%;
}

#search-input-wrapper input {
    width: 100%;
    padding: 0.6rem;
    background: #262626;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
}

#search-input-wrapper input::placeholder {
    color: #666;
}

.visibility-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
}

.visibility-controls button {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #999;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visibility-controls button:hover {
    color: #fff;
    border-color: #444;
}

#categories-wrapper {
    flex: 1;
    overflow-y: auto;
}

#categories {
    list-style: none;
}

.header {
    padding: .25rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.group-categories {
    padding: 0.5rem 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-width: 0;
    color: #fff;
    opacity: 1;
    border-radius: 4px;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Hidden category styles */
.category-item:not(.category-visible) {
    color: #666;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.category-item:not(.category-visible) .icon {
    opacity: 0.3;
    filter: grayscale(1);
}

.category-item:not(.category-visible) .bubble {
    background: rgba(0, 0, 0, 0.3);
    color: #666;
}

.category-item:not(.category-visible):hover {
    background: rgba(0, 0, 0, 0.6);
    opacity: 0.8;
}

.category-item .icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-right: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-item .icon .path1,
.category-item .icon .path2,
.category-item .icon .path3 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.icon-important .path1 { background: #e74c3c; }
.icon-poi .path1 { background: #2ecc71; }
.icon-resource .path1 { background: #f1c40f; }
.icon-npc .path1 { background: #9b59b6; }

.category-item .title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    color: #fff;
    min-width: 0;
}

.category-item .bubble {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    min-width: 1.2rem;
    text-align: center;
}

/* Search functionality styles */
.search-hidden {
    display: none !important;
}

#search {
    background: #262626;
    border: 1px solid #333;
    color: #fff;
    padding: 0.5rem;
    width: 100%;
    border-radius: 4px;
    font-size: 0.9rem;
}

#search:focus {
    outline: none;
    border-color: #d4af37;
}

#search::placeholder {
    color: #666;
}
