.custom-nav-box {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-box-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#new-site-url {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#add-site-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#add-site-btn:hover {
    background: #135e96;
}

.nav-sites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
}

.nav-site-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: move;
}

.nav-site-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-site-item img {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.nav-site-item span {
    display: block;
    font-size: 12px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-site-item a {
    text-decoration: none;
    color: inherit;
}

.remove-site {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.nav-site-item:hover .remove-site {
    display: block;
}

.nav-site-item.ui-sortable-helper {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.nav-site-item.ui-sortable-placeholder {
    visibility: visible !important;
    background: #f0f0f0;
    border: 2px dashed #ccc;
}

/* 拖拽提示样式 */
.drag-hover {
    border: 2px dashed #2271b1;
    background: rgba(34, 113, 177, 0.1);
} 