.scene-hierarchy {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

.scene-hierarchy.outliner {
    font-size: 12px;
}

/* ==================== Toolbar ==================== */
.outliner-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #333;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.outliner-toolbar-left {
    display: flex;
    align-items: center;
}

.outliner-filter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.15s ease;
}

.outliner-filter-btn:hover {
    background: #444;
    border-color: #555;
}

.outliner-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
}

.outliner-search svg {
    color: #888;
    flex-shrink: 0;
}

.outliner-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e0e0e0;
    font-size: 12px;
}

.outliner-search input::placeholder {
    color: #666;
}

.outliner-search .search-dropdown {
    color: #666;
    cursor: pointer;
}

.outliner-toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.outliner-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.15s ease;
}

.outliner-action-btn:hover {
    background: #444;
    border-color: #555;
    color: #fff;
}

/* ==================== Column Header ==================== */
.outliner-header {
    display: flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    background: #333;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
    font-size: 11px;
    color: #999;
}

.outliner-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
    border-right: 1px solid #444;
    margin-right: 8px;
}

.header-icon {
    color: #666;
    cursor: pointer;
    transition: color 0.15s ease;
}

.header-icon:hover {
    color: #999;
}

.outliner-header-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.outliner-header-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.outliner-header-label.sorted {
    color: #e0e0e0;
}

.outliner-header-type {
    width: 140px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.outliner-header-type:hover {
    background: rgba(255, 255, 255, 0.05);
}

.outliner-header-type.sorted {
    color: #e0e0e0;
}

.sort-indicator {
    font-size: 8px;
    color: #888;
}

/* ==================== Content Area ==================== */
.outliner-content {
    flex: 1;
    overflow: auto;
}

.outliner-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.outliner-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.outliner-content::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 5px;
    border: 2px solid #2a2a2a;
}

.outliner-content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

.outliner-list {
    padding: 0;
    margin: 0;
}

/* ==================== Item Styles ==================== */
.outliner-item {
    display: flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    cursor: pointer;
    transition: background 0.1s ease;
    border-bottom: 1px solid transparent;
}

.outliner-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.outliner-item.selected {
    background: #3d5a80;
}

.outliner-item.selected:hover {
    background: #4a6a90;
}

.outliner-item.world-item {
    background: #333;
    border-bottom: 1px solid #1a1a1a;
}

.outliner-item.dragging {
    opacity: 0.5;
}

.outliner-item.drop-target {
    border-top: 2px solid #4a9eff;
}

.outliner-item.disabled {
    opacity: 0.5;
}

.outliner-item-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
    margin-right: 4px;
}

.item-icon {
    color: #666;
    cursor: pointer;
    transition: color 0.15s ease;
}

.item-icon:hover {
    color: #999;
}

.item-icon.visibility {
    color: #888;
}

.outliner-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.outliner-item-expand {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    flex-shrink: 0;
}

.outliner-item-expand:hover {
    color: #ccc;
}

.outliner-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e0e0e0;
}

.outliner-item.selected .outliner-item-name {
    color: #fff;
}

.outliner-item-type {
    width: 140px;
    color: #888;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Entity Type Icons */
.entity-type-icon {
    flex-shrink: 0;
}

.entity-type-icon.world {
    color: #4a9eff;
}

.entity-type-icon.folder {
    color: #dcb67a;
}

.entity-type-icon.light {
    color: #ffd700;
}

.entity-type-icon.atmosphere,
.entity-type-icon.cloud,
.entity-type-icon.fog {
    color: #87ceeb;
}

.entity-type-icon.mesh {
    color: #9966ff;
}

.entity-type-icon.player {
    color: #4ade80;
}

.entity-type-icon.default {
    color: #888;
}

/* ==================== Status Bar ==================== */
.outliner-status {
    display: flex;
    align-items: center;
    height: 22px;
    padding: 0 12px;
    background: #2d2d2d;
    border-top: 1px solid #1a1a1a;
    flex-shrink: 0;
    font-size: 11px;
    color: #888;
}

/* ==================== Empty State ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    height: 100%;
}

.empty-icon {
    color: #444;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-hint {
    font-size: 12px;
    color: #555;
}

/* ==================== View Mode Toggle ==================== */
.view-mode-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
    margin-left: 8px;
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 2px;
    color: #888;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.mode-btn.active {
    background: #4a9eff;
    color: #fff;
}

.remote-indicator {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 3px;
    color: rgb(16, 185, 129);
    animation: pulse-green 1.5s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ==================== Context Menu ==================== */
.context-menu {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 4px;
    min-width: 180px;
}

.context-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.context-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-divider {
    height: 1px;
    background: #444;
    margin: 4px 0;
}

.context-menu-item-with-submenu {
    position: relative;
}

.context-menu-item-with-submenu .submenu-arrow {
    margin-left: auto;
    color: #666;
}

.context-submenu {
    position: fixed;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 4px;
    min-width: 180px;
    z-index: 1001;
}

.context-submenu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.context-submenu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-danger {
    color: #f87171 !important;
}

.context-menu-danger:hover {
    background: rgba(248, 113, 113, 0.15) !important;
}
